From: Pradeep Nayak Date: Wed, 27 Jan 2016 22:22:31 +0000 (+0530) Subject: --CRM-16259, allow status to be changed from pending to partialy paid X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=8084abdd7746a1e3f59d5fa3a77cdf70de18b2f6;p=civicrm-core.git --CRM-16259, allow status to be changed from pending to partialy paid Conflicts: CRM/Contribute/BAO/Contribution.php --- 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'),