Skip to content

Commit

Permalink
Merge pull request #18714 from MegaphoneJon/financial-111
Browse files Browse the repository at this point in the history
Financial#111: Contribution tokens always display amount with default…
  • Loading branch information
seamuslee001 authored Oct 9, 2020
2 parents 8e49992 + 2aa6450 commit 0d193d5
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion CRM/Utils/Token.php
Original file line number Diff line number Diff line change
Expand Up @@ -1801,7 +1801,10 @@ public static function getContributionTokenReplacement($token, &$contribution, $
case 'net_amount':
case 'fee_amount':
case 'non_deductible_amount':
$value = CRM_Utils_Money::format(CRM_Utils_Array::retrieveValueRecursive($contribution, $token));
// FIXME: Is this ever a multi-dimensional array? Why use retrieveValueRecursive()?
$amount = CRM_Utils_Array::retrieveValueRecursive($contribution, $token);
$currency = CRM_Utils_Array::retrieveValueRecursive($contribution, 'currency');
$value = CRM_Utils_Money::format($amount, $currency);
break;

case 'receive_date':
Expand Down

0 comments on commit 0d193d5

Please sign in to comment.