From 24cf745846d074d18385077d368c9a533324cda8 Mon Sep 17 00:00:00 2001 From: jitendrapurohit Date: Tue, 13 Dec 2016 16:08:47 +0530 Subject: [PATCH] Additional fixes for CRM-19263 --- CRM/Contribute/Form/ContributionBase.php | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/CRM/Contribute/Form/ContributionBase.php b/CRM/Contribute/Form/ContributionBase.php index 7bdec1a478de..ab112e2a8d91 100644 --- a/CRM/Contribute/Form/ContributionBase.php +++ b/CRM/Contribute/Form/ContributionBase.php @@ -292,9 +292,15 @@ public function preProcess() { // check for is_monetary status $isMonetary = CRM_Utils_Array::value('is_monetary', $this->_values); $isPayLater = CRM_Utils_Array::value('is_pay_later', $this->_values); - if (!empty($this->_ccid) && $isPayLater) { - $isPayLater = FALSE; - $this->_values['is_pay_later'] = FALSE; + if (!empty($this->_ccid)) { + $this->_values['financial_type_id'] = CRM_Core_DAO::getFieldValue('CRM_Contribute_DAO_Contribution', + $this->_ccid, + 'financial_type_id' + ); + if ($isPayLater) { + $isPayLater = FALSE; + $this->_values['is_pay_later'] = FALSE; + } } if ($isMonetary &&