--CRM-16259, allow status to be changed from pending to partialy paid
authorPradeep Nayak <pradpnayak@gmail.com>
Wed, 27 Jan 2016 22:22:31 +0000 (03:52 +0530)
committerPradeep Nayak <pradpnayak@gmail.com>
Wed, 17 Feb 2016 12:33:28 +0000 (18:03 +0530)
Conflicts:

CRM/Contribute/BAO/Contribution.php

CRM/Contribute/BAO/Contribution.php

index 5e630c3e09ab3c97a8aac7f69f91eb070500ae7e..0bd3e8d37fa74fe71f2bd193d462e2390876d45e 100644 (file)
@@ -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'),