Refer to correct field name.

This commit is contained in:
James Cole
2018-12-21 06:51:21 +01:00
parent a7585e3040
commit 8ede404b8a
7 changed files with 21 additions and 21 deletions

View File

@@ -104,7 +104,7 @@ class Transaction extends Twig_Extension
// first display amount:
$amount = (string)$transaction['amount'];
$fakeCurrency = new TransactionCurrency;
$fakeCurrency->decimal_places = $transaction['currency_dp'];
$fakeCurrency->decimal_places = $transaction['currency_decimal_places'];
$fakeCurrency->symbol = $transaction['currency_symbol'];
$string = app('amount')->formatAnything($fakeCurrency, $amount, true);
@@ -112,7 +112,7 @@ class Transaction extends Twig_Extension
if (null !== $transaction['foreign_amount']) {
$amount = (string)$transaction['foreign_amount'];
$fakeCurrency = new TransactionCurrency;
$fakeCurrency->decimal_places = $transaction['foreign_currency_dp'];
$fakeCurrency->decimal_places = $transaction['foreign_currency_decimal_places'];
$fakeCurrency->symbol = $transaction['foreign_currency_symbol'];
$string .= ' (' . app('amount')->formatAnything($fakeCurrency, $amount, true) . ')';
}