Skip to content

Commit

Permalink
Merge pull request #23076 from eileenmcnaughton/cont_status
Browse files Browse the repository at this point in the history
dev/financial#186 Do not display partially paid & partially refunded for selection on edit
  • Loading branch information
monishdeb authored Apr 6, 2022
2 parents 66a5e28 + 81a49da commit 6b8634c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions CRM/Contribute/Form/Contribution.php
Original file line number Diff line number Diff line change
Expand Up @@ -2052,23 +2052,23 @@ protected function getAvailableContributionStatuses(): array {
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
// in conjunction with a ContributionRecur record, and should have their
// 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;

Expand Down

0 comments on commit 6b8634c

Please sign in to comment.