From 81a49da235d22b92201db7d10438d4e0a100af13 Mon Sep 17 00:00:00 2001 From: Eileen McNaughton Date: Fri, 1 Apr 2022 11:52:30 +1300 Subject: [PATCH] dev/financial#186 Do not display partially paid & partially refunded for selection on edit I'm pretty sure these were actually removed at one point and got over-added back because the original fix over-removed them - ie it took them out when the contribution's current status was 'Partially paid' etc, making a no-save change impossible --- CRM/Contribute/Form/Contribution.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/CRM/Contribute/Form/Contribution.php b/CRM/Contribute/Form/Contribution.php index 694b6b346c..de2930d2a7 100644 --- a/CRM/Contribute/Form/Contribution.php +++ b/CRM/Contribute/Form/Contribution.php @@ -2052,7 +2052,7 @@ class CRM_Contribute_Form_Contribution extends CRM_Contribute_Form_AbstractEditP return CRM_Contribute_BAO_Contribution_Utils::getPendingCompleteFailedAndCancelledStatuses(); } $statusNames = CRM_Contribute_BAO_Contribution::buildOptions('contribution_status_id', 'validate'); - $statusNamesToUnset = [ + $statusNamesToUnset = array_diff([ // For records which represent a data template for a recurring // contribution that may not yet have a payment. This status should not // be available from forms. 'Template' contributions should only be created @@ -2060,15 +2060,15 @@ class CRM_Contribute_Form_Contribution extends CRM_Contribute_Form_AbstractEditP // is_template field set to 1. This status excludes them from reports // that are still ignorant of the is_template field. 'Template', - ]; + 'Partially paid', + 'Pending refund', + ], [$this->getPreviousContributionStatus()]); switch ($this->getPreviousContributionStatus()) { case 'Completed': // [CRM-17498] Removing unsupported status change options. $statusNamesToUnset = array_merge($statusNamesToUnset, [ 'Pending', 'Failed', - 'Partially paid', - 'Pending refund', ]); break; -- 2.25.1