'isDefault' => TRUE,
);
- $buttons[] = array(
- 'type' => 'upload',
- 'name' => ts('Save and Record Payment'),
- 'subName' => 'new'
- );
-
+ if (CRM_Event_BAO_Participant::isPrimaryParticipant($this->_participantId)) {
+ $buttons[] = array(
+ 'type' => 'upload',
+ 'name' => ts('Save and Record Payment'),
+ 'subName' => 'new'
+ );
+ }
$buttons[] = array(
'type' => 'cancel',
'name' => ts('Cancel'),
$this->addFormRule(array('CRM_Event_Form_ParticipantFeeSelection', 'formRule'), $this);
}
+ /**
+ * @param $fields
+ * @param $files
+ * @param $self
+ *
+ * @return array
+ */
static function formRule($fields, $files, $self) {
$errors = array();
return $errors;
}
}
+ /**
+ * @param $params
+ *
+ * @return mixed
+ */
function emailReceipt(&$params) {
$updatedLineItem = CRM_Price_BAO_LineItem::getLineItems($this->_participantId, 'participant', NULL, FALSE);
$lineItem = array();