From fcdf24a4862de93759d3e4a30d0ded5636b73bae Mon Sep 17 00:00:00 2001 From: Sudha Bisht Date: Wed, 25 Nov 2015 14:31:20 +0530 Subject: [PATCH] Pledge update issue fix --- CRM/Contribute/BAO/Contribution.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/CRM/Contribute/BAO/Contribution.php b/CRM/Contribute/BAO/Contribution.php index 8af434153b..adae0522da 100644 --- a/CRM/Contribute/BAO/Contribution.php +++ b/CRM/Contribute/BAO/Contribution.php @@ -3991,10 +3991,6 @@ WHERE con.id = {$contributionId} $contribution_status_id, $original_contribution_status_id ) { - if (!$pledgePaymentID || $action & CRM_Core_Action::ADD && !$contributionID) { - return; - } - if ($pledgePaymentID) { //store contribution id in payment record. CRM_Core_DAO::setFieldValue('CRM_Pledge_DAO_PledgePayment', $pledgePaymentID, 'contribution_id', $contributionID); @@ -4006,6 +4002,10 @@ WHERE con.id = {$contributionId} 'contribution_id' ); } + + if (!$pledgePaymentID || $action & CRM_Core_Action::ADD && !$contributionID) { + return; + } $pledgeID = CRM_Core_DAO::getFieldValue('CRM_Pledge_DAO_PledgePayment', $contributionID, 'pledge_id', -- 2.25.1