}
}
$allPanes = array();
- $recurJs = NULL;
+
//tax rate from financialType
$this->assign('taxRates', json_encode(CRM_Core_PseudoConstant::getTaxRates()));
$this->assign('currencies', json_encode(CRM_Core_OptionGroup::values('currencies_enabled')));
$invoicing = CRM_Utils_Array::value('invoicing', $invoiceSettings);
$this->assign('invoicing', $invoicing);
+ $buildRecurBlock = FALSE;
+
// display tax amount on edit contribution page
if ($invoicing && $this->_action & CRM_Core_Action::UPDATE && isset($this->_values['tax_amount'])) {
$this->assign('totalTaxAmount', $this->_values['tax_amount']);
}
if ($this->_noteID &&
- isset($this->_values['note'])
+ !CRM_Utils_System::isNull($this->_values['note'])
) {
$defaults['hidden_AdditionalDetail'] = 1;
}
CRM_Contribute_Form_Contribution_Main::buildRecur($this);
$this->setDefaults(array('is_recur' => 0));
$this->assign('buildRecurBlock', TRUE);
- $recurJs = array('onChange' => "buildRecurBlock( this.value ); return false;");
}
}
}
+ $this->addPaymentProcessorSelect(FALSE, $buildRecurBlock);
foreach ($paneNames as $name => $type) {
$allPanes[$name] = $this->generatePane($type, $defaults);
$this->add('select', 'from_email_address', ts('Receipt From'), $this->_fromEmails);
- $isUpdate = FALSE;
$component = 'contribution';
if ($this->_id) {
- $isUpdate = TRUE;
$componentDetails = CRM_Contribute_BAO_Contribution::getComponentDetails($this->_id);
if (CRM_Utils_Array::value('membership', $componentDetails)) {
$component = 'membership';
$this->addDateTime('cancel_date', ts('Cancelled / Refunded Date'), FALSE, array('formatType' => 'activityDateTime'));
$this->add('textarea', 'cancel_reason', ts('Cancellation / Refund Reason'), $attributes['cancel_reason']);
- $this->add('text', 'refund_trxn_id', ts('Transaction ID for the refund payment'));
- $element = $this->add('select',
- 'payment_processor_id',
- ts('Payment Processor'),
- $this->_processors,
- NULL,
- $recurJs
- );
-
- if ($this->_online) {
- $element->freeze();
- }
$totalAmount = NULL;
if (empty($this->_lineItems)) {
),
array(
'type' => 'cancel',
- 'name' => ts('Close'),
+ 'name' => ts('Cancel'),
),
)
);
);
}
- if ($contribution->id && !empty($submittedValues['note'])) {
+ if ($contribution->id && array_key_exists('note', $submittedValues)) {
CRM_Contribute_Form_AdditionalInfo::processNote($submittedValues, $this->_contactID, $contribution->id, $this->_noteID);
}