From 8084abdd7746a1e3f59d5fa3a77cdf70de18b2f6 Mon Sep 17 00:00:00 2001 From: Pradeep Nayak Date: Thu, 28 Jan 2016 03:52:31 +0530 Subject: [PATCH] --CRM-16259, allow status to be changed from pending to partialy paid Conflicts: CRM/Contribute/BAO/Contribution.php --- CRM/Contribute/BAO/Contribution.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/CRM/Contribute/BAO/Contribution.php b/CRM/Contribute/BAO/Contribution.php index 5e630c3e09..0bd3e8d37f 100644 --- a/CRM/Contribute/BAO/Contribution.php +++ b/CRM/Contribute/BAO/Contribution.php @@ -3356,8 +3356,10 @@ INNER JOIN civicrm_activity ON civicrm_activity_contact.activity_id = civicrm_ac ) { return; } - if (($previousContributionStatus == 'Partially paid') - && $params['contribution']->contribution_status_id == array_search('Completed', $contributionStatus) + if ((($previousContributionStatus == 'Partially paid' + && $params['contribution']->contribution_status_id == array_search('Completed', $contributionStatus)) + || ($previousContributionStatus == 'Pending' + && $params['contribution']->contribution_status_id == array_search('Partially paid', $contributionStatus))) && $context == 'changedStatus' ) { return; @@ -3567,7 +3569,7 @@ INNER JOIN civicrm_activity ON civicrm_activity_contact.activity_id = civicrm_ac $checkStatus = array( 'Cancelled' => array('Completed', 'Refunded'), 'Completed' => array('Cancelled', 'Refunded', 'Chargeback'), - 'Pending' => array('Cancelled', 'Completed', 'Failed'), + 'Pending' => array('Cancelled', 'Completed', 'Failed', 'Partially paid'), 'In Progress' => array('Cancelled', 'Completed', 'Failed'), 'Refunded' => array('Cancelled', 'Completed'), 'Partially paid' => array('Completed'), -- 2.25.1