From: eileen Date: Sun, 15 Nov 2015 21:47:32 +0000 (-0800) Subject: CRM-17539 fix enotice on zero dollar receipt X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=a8cb9a0bae4f6fa47b74565d351527527d4b6db5;p=civicrm-core.git CRM-17539 fix enotice on zero dollar receipt --- diff --git a/CRM/Contribute/Form/Contribution/Main.php b/CRM/Contribute/Form/Contribution/Main.php index ad8dc2ad35..5950346dab 100644 --- a/CRM/Contribute/Form/Contribution/Main.php +++ b/CRM/Contribute/Form/Contribution/Main.php @@ -1046,11 +1046,14 @@ class CRM_Contribute_Form_Contribution_Main extends CRM_Contribute_Form_Contribu } } } + // from here on down, $params['amount'] holds a monetary value (or null) rather than an option ID + $params['amount'] = self::computeAmount($params, $this->_values); if (($this->_values['is_pay_later'] && empty($this->_paymentProcessor) && !array_key_exists('hidden_processor', $params)) || (CRM_Utils_Array::value('payment_processor_id', $params) == 0) + && $params['amount'] != 0 ) { $params['is_pay_later'] = 1; } @@ -1068,8 +1071,6 @@ class CRM_Contribute_Form_Contribution_Main extends CRM_Contribute_Form_Contribu $this->assign('pay_later_receipt', $this->_values['pay_later_receipt']); } - // from here on down, $params['amount'] holds a monetary value (or null) rather than an option ID - $params['amount'] = self::computeAmount($params, $this->_values); $params['separate_amount'] = $params['amount']; $memFee = NULL; if (!empty($params['selectMembership'])) {