Skip to content

Commit

Permalink
CRM-20946, use line total of line itme to store in financial item table
Browse files Browse the repository at this point in the history
----------------------------------------
* CRM-20946: Wrong entries in financial table when contribution is cancelled
  https://issues.civicrm.org/jira/browse/CRM-20946
  • Loading branch information
pradpnayak committed Jul 23, 2017
1 parent f889275 commit 6a73597
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion CRM/Contribute/BAO/Contribution.php
Original file line number Diff line number Diff line change
Expand Up @@ -5329,7 +5329,7 @@ protected static function getFinancialItemAmountFromParams($params, $context, $l
if ($isARefund) {
$cancelledTaxAmount = CRM_Utils_Array::value('tax_amount', $params, '0.00');
}
return self::getMultiplier($params['contribution']->contribution_status_id, $context) * ($params['trxnParams']['total_amount'] + $cancelledTaxAmount);
return self::getMultiplier($params['contribution']->contribution_status_id, $context) * ($lineItemDetails['line_total'] + $cancelledTaxAmount);
}
elseif ($context === NULL) {
// erm, yes because? but, hey, it's tested.
Expand Down

0 comments on commit 6a73597

Please sign in to comment.