From: Pratik Joshi Date: Thu, 10 Apr 2014 13:24:22 +0000 (+0530) Subject: CRM-13973-comment : handled 'Refunded' status logic during Status edit of a contribution X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=e8d37d0a72952a8e3b2b656c9646828bb31e2ce7;p=civicrm-core.git CRM-13973-comment : handled 'Refunded' status logic during Status edit of a contribution --- diff --git a/CRM/Contribute/BAO/Contribution.php b/CRM/Contribute/BAO/Contribution.php index 7c8607942a..a98ca8d477 100644 --- a/CRM/Contribute/BAO/Contribution.php +++ b/CRM/Contribute/BAO/Contribution.php @@ -2866,7 +2866,8 @@ WHERE contribution_id = %1 "; } else { $diff = 1; - if ($context == 'changeFinancialType' || $params['contribution']->contribution_status_id == array_search('Cancelled', $contributionStatus)) { + if ($context == 'changeFinancialType' || $params['contribution']->contribution_status_id == array_search('Cancelled', $contributionStatus) + || $params['contribution']->contribution_status_id == array_search('Refunded', $contributionStatus)) { $diff = -1; } $amount = $diff * $fieldValues['line_total'];