From a8cb9a0bae4f6fa47b74565d351527527d4b6db5 Mon Sep 17 00:00:00 2001 From: eileen Date: Sun, 15 Nov 2015 13:47:32 -0800 Subject: [PATCH] CRM-17539 fix enotice on zero dollar receipt --- CRM/Contribute/Form/Contribution/Main.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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'])) { -- 2.25.1