--CRM-16259, added check for is pay later for pending contribution
authorPradeep Nayak <pradpnayak@gmail.com>
Sat, 13 Feb 2016 13:41:34 +0000 (19:11 +0530)
committerPradeep Nayak <pradpnayak@gmail.com>
Wed, 17 Feb 2016 12:33:28 +0000 (18:03 +0530)
CRM/Contribute/BAO/Contribution.php

index fab631fbaec21b1fbc1891cf674c6c8c7636e1d4..292f6484759c3dd66c94615d343a5400f30b98e6 100644 (file)
@@ -3358,7 +3358,7 @@ INNER JOIN civicrm_activity ON civicrm_activity_contact.activity_id = civicrm_ac
     }
     if ((($previousContributionStatus == 'Partially paid'
       && $params['contribution']->contribution_status_id == array_search('Completed', $contributionStatus))
-      || ($previousContributionStatus == 'Pending'
+      || ($previousContributionStatus == 'Pending' && $params['prevContribution']->is_pay_later == TRUE
       && $params['contribution']->contribution_status_id == array_search('Partially paid', $contributionStatus)))
       && $context == 'changedStatus'
     ) {