From 8ede404b8a9e089b153e7ba847353ec2e20b625a Mon Sep 17 00:00:00 2001 From: James Cole Date: Fri, 21 Dec 2018 06:51:21 +0100 Subject: [PATCH] Refer to correct field name. --- app/Support/Twig/Extension/Transaction.php | 4 ++-- resources/views/v1/list/piggy-banks.twig | 8 ++++---- resources/views/v1/piggy-banks/index.twig | 10 +++++----- resources/views/v1/piggy-banks/show.twig | 8 ++++---- resources/views/v1/recurring/index.twig | 4 ++-- resources/views/v1/recurring/show.twig | 4 ++-- resources/views/v1/transactions/split/edit.twig | 4 ++-- 7 files changed, 21 insertions(+), 21 deletions(-) diff --git a/app/Support/Twig/Extension/Transaction.php b/app/Support/Twig/Extension/Transaction.php index 6dcb4a8953..88aac67bcd 100644 --- a/app/Support/Twig/Extension/Transaction.php +++ b/app/Support/Twig/Extension/Transaction.php @@ -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) . ')'; } diff --git a/resources/views/v1/list/piggy-banks.twig b/resources/views/v1/list/piggy-banks.twig index 5aa821077d..28985c5e80 100644 --- a/resources/views/v1/list/piggy-banks.twig +++ b/resources/views/v1/list/piggy-banks.twig @@ -39,7 +39,7 @@ {{ piggy.name }} - {{ formatAmountBySymbol(piggy.current_amount,piggy.currency_symbol,piggy.currency_dp) }} + {{ formatAmountBySymbol(piggy.current_amount,piggy.currency_symbol,piggy.currency_decimal_places) }} {% if piggy.current_amount > 0 %} @@ -73,16 +73,16 @@ {% endif %} - {{ formatAmountBySymbol(piggy.target_amount,piggy.currency_symbol,piggy.currency_dp) }} + {{ formatAmountBySymbol(piggy.target_amount,piggy.currency_symbol,piggy.currency_decimal_places) }} {% if piggy.left_to_save > 0 %} - {{ formatAmountBySymbol(piggy.left_to_save,piggy.currency_symbol,piggy.currency_dp) }} + {{ formatAmountBySymbol(piggy.left_to_save,piggy.currency_symbol,piggy.currency_decimal_places) }} {% endif %} {% if piggy.target_date %} - {{ formatAmountBySymbol(piggy.save_per_month, piggy.currency_symbol, piggy.currency_dp) }} + {{ formatAmountBySymbol(piggy.save_per_month, piggy.currency_symbol, piggy.currency_decimal_places) }} {% endif %} diff --git a/resources/views/v1/piggy-banks/index.twig b/resources/views/v1/piggy-banks/index.twig index a39d899d63..fb157895d2 100644 --- a/resources/views/v1/piggy-banks/index.twig +++ b/resources/views/v1/piggy-banks/index.twig @@ -50,19 +50,19 @@ {{ info.name }} - {{ formatAmountBySymbol(info.current_balance,info.currency_symbol,info.currency_dp) }} + {{ formatAmountBySymbol(info.current_balance,info.currency_symbol,info.currency_decimal_places) }} - {{ formatAmountBySymbol(info.left,info.currency_symbol,info.currency_dp) }} + {{ formatAmountBySymbol(info.left,info.currency_symbol,info.currency_decimal_places) }} - {{ formatAmountBySymbol(info.target,info.currency_symbol,info.currency_dp) }} + {{ formatAmountBySymbol(info.target,info.currency_symbol,info.currency_decimal_places) }} - {{ formatAmountBySymbol(info.saved,info.currency_symbol,info.currency_dp) }} + {{ formatAmountBySymbol(info.saved,info.currency_symbol,info.currency_decimal_places) }} - {{ formatAmountBySymbol(info.to_save,info.currency_symbol,info.currency_dp) }} + {{ formatAmountBySymbol(info.to_save,info.currency_symbol,info.currency_decimal_places) }} {% endfor %} diff --git a/resources/views/v1/piggy-banks/show.twig b/resources/views/v1/piggy-banks/show.twig index cf3d738183..efe033ba97 100644 --- a/resources/views/v1/piggy-banks/show.twig +++ b/resources/views/v1/piggy-banks/show.twig @@ -41,19 +41,19 @@ {{ 'target_amount'|_ }} - {{ formatAmountBySymbol(piggy.target_amount, piggy.currency_symbol, piggy.currency_dp) }} + {{ formatAmountBySymbol(piggy.target_amount, piggy.currency_symbol, piggy.currency_decimal_places) }} {{ 'saved_so_far'|_ }} - {{ formatAmountBySymbol(piggy.current_amount, piggy.currency_symbol, piggy.currency_dp) }} + {{ formatAmountBySymbol(piggy.current_amount, piggy.currency_symbol, piggy.currency_decimal_places) }} {{ 'left_to_save'|_ }} - {{ formatAmountBySymbol(piggy.left_to_save, piggy.currency_symbol, piggy.currency_dp) }} + {{ formatAmountBySymbol(piggy.left_to_save, piggy.currency_symbol, piggy.currency_decimal_places) }} @@ -80,7 +80,7 @@ {{ 'suggested_amount'|_ }} - {{ formatAmountBySymbol(piggy.save_per_month, piggy.currency_symbol, piggy.currency_dp) }} + {{ formatAmountBySymbol(piggy.save_per_month, piggy.currency_symbol, piggy.currency_decimal_places) }} diff --git a/resources/views/v1/recurring/index.twig b/resources/views/v1/recurring/index.twig index adbd5cc2a3..cf5da8c40c 100644 --- a/resources/views/v1/recurring/index.twig +++ b/resources/views/v1/recurring/index.twig @@ -69,11 +69,11 @@ {% for rtt in rt.transactions %}
  • {# normal amount + comma#} - {{ formatAmountBySymbol(rtt['amount'],rtt['currency_symbol'],rtt['currency_dp']) }}{% if rtt['foreign_amount'] == null %},{% endif %} + {{ formatAmountBySymbol(rtt['amount'],rtt['currency_symbol'],rtt['currency_decimal_places']) }}{% if rtt['foreign_amount'] == null %},{% endif %} {# foreign amount + comma #} {% if null != rtt['foreign_amount'] %} - ({{ formatAmountBySymbol(rtt['foreign_amount'],rtt['foreign_currency_symbol'],rtt['foreign_currency_dp']) }}), + ({{ formatAmountBySymbol(rtt['foreign_amount'],rtt['foreign_currency_symbol'],rtt['foreign_currency_decimal_places']) }}), {% endif %} {{ rtt['source_name'] }} → diff --git a/resources/views/v1/recurring/show.twig b/resources/views/v1/recurring/show.twig index 9a8bf58353..046b33d3a9 100644 --- a/resources/views/v1/recurring/show.twig +++ b/resources/views/v1/recurring/show.twig @@ -112,9 +112,9 @@ {{ transaction.destination_name }} - {{ formatAmountBySymbol(transaction.amount,transaction.currency_symbol,transaction.currency_dp) }} + {{ formatAmountBySymbol(transaction.amount,transaction.currency_symbol,transaction.currency_decimal_places) }} {% if null != transaction.foreign_amount %} - ({{ formatAmountBySymbol(transaction.foreign_amount,transaction.foreign_currency_symbol,transaction.foreign_currency_dp) }}) + ({{ formatAmountBySymbol(transaction.foreign_amount,transaction.foreign_currency_symbol,transaction.foreign_currency_decimal_places) }}) {% endif %} diff --git a/resources/views/v1/transactions/split/edit.twig b/resources/views/v1/transactions/split/edit.twig index c6a06fc0f5..d77c2df79d 100644 --- a/resources/views/v1/transactions/split/edit.twig +++ b/resources/views/v1/transactions/split/edit.twig @@ -56,7 +56,7 @@

    - {{ formatAmountBySymbol(preFilled.journal_amount|default("0"), preFilled.transactions[0].currency_symbol|default("x"), preFilled.transactions[0].currency_dp) }} + {{ formatAmountBySymbol(preFilled.journal_amount|default("0"), preFilled.transactions[0].currency_symbol|default("x"), preFilled.transactions[0].currency_decimal_places) }}

    @@ -67,7 +67,7 @@

    - {{ formatAmountBySymbol(preFilled.journal_foreign_amount, preFilled.transactions[0].foreign_currency_symbol, preFilled.transactions[0].foreign_currency_dp) }} + {{ formatAmountBySymbol(preFilled.journal_foreign_amount, preFilled.transactions[0].foreign_currency_symbol, preFilled.transactions[0].foreign_currency_decimal_places) }}