Firefly III: a personal finances manager
PHP accountingbudgetbudgetingbudgetscash-flowcashflowcredit-carddockerexpensesfinancefinancesfinanciallinuxmoneypaycheckpersonal-financephpphp7
Refer to correct field name.
James Cole8ede404b8a9e
diff --git a/app/Support/Twig/Extension/Transaction.php b/app/Support/Twig/Extension/Transaction.phpindex 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_Extensionif (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.twigindex 5aa821077d..28985c5e80 100644--- a/resources/views/v1/list/piggy-banks.twig+++ b/resources/views/v1/list/piggy-banks.twig@@ -39,7 +39,7 @@<a href="{{ route('piggy-banks.show', piggy.id) }}" title="{{ piggy.account_name }}">{{ piggy.name }}</a></td><td style="text-align: right;" class="piggySaved">- <span title="Saved so far" style="text-align:right;">{{ formatAmountBySymbol(piggy.current_amount,piggy.currency_symbol,piggy.currency_dp) }}</span>+ <span title="Saved so far" style="text-align:right;">{{ formatAmountBySymbol(piggy.current_amount,piggy.currency_symbol,piggy.currency_decimal_places) }}</span></td><td class="hidden-sm hidden-xs" style="text-align:right;width:40px;">{% if piggy.current_amount > 0 %}@@ -73,16 +73,16 @@{% endif %}</td><td class="hidden-sm hidden-xs" style="text-align:right;">- <span title="{{ 'target_amount'|_ }}">{{ formatAmountBySymbol(piggy.target_amount,piggy.currency_symbol,piggy.currency_dp) }}</span>+ <span title="{{ 'target_amount'|_ }}">{{ formatAmountBySymbol(piggy.target_amount,piggy.currency_symbol,piggy.currency_decimal_places) }}</span></td><td class="hidden-sm hidden-xs" style="text-align:right;">{% if piggy.left_to_save > 0 %}- <span title="{{ 'left_to_save'|_ }}">{{ formatAmountBySymbol(piggy.left_to_save,piggy.currency_symbol,piggy.currency_dp) }}</span>+ <span title="{{ 'left_to_save'|_ }}">{{ formatAmountBySymbol(piggy.left_to_save,piggy.currency_symbol,piggy.currency_decimal_places) }}</span>{% endif %}</td><td class="hidden-sm hidden-xs" style="text-align:right;">{% 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 %}</td></tr>diff --git a/resources/views/v1/piggy-banks/index.twig b/resources/views/v1/piggy-banks/index.twigindex a39d899d63..fb157895d2 100644--- a/resources/views/v1/piggy-banks/index.twig+++ b/resources/views/v1/piggy-banks/index.twig@@ -50,19 +50,19 @@<tr><td><a href="{{ route('accounts.show',id) }}" title="{{ info.name }}">{{ info.name }}</a></td><td style="text-align:right;" class="hidden-sm hidden-xs">- {{ formatAmountBySymbol(info.current_balance,info.currency_symbol,info.currency_dp) }}+ {{ formatAmountBySymbol(info.current_balance,info.currency_symbol,info.currency_decimal_places) }}</td><td style="text-align:right;">- {{ formatAmountBySymbol(info.left,info.currency_symbol,info.currency_dp) }}+ {{ formatAmountBySymbol(info.left,info.currency_symbol,info.currency_decimal_places) }}</td><td style="text-align:right;" class="hidden-sm hidden-xs">- {{ formatAmountBySymbol(info.target,info.currency_symbol,info.currency_dp) }}+ {{ formatAmountBySymbol(info.target,info.currency_symbol,info.currency_decimal_places) }}</td><td style="text-align:right;" class="hidden-sm hidden-xs">- {{ formatAmountBySymbol(info.saved,info.currency_symbol,info.currency_dp) }}+ {{ formatAmountBySymbol(info.saved,info.currency_symbol,info.currency_decimal_places) }}</td><td style="text-align:right;" class="hidden-sm hidden-xs">- {{ formatAmountBySymbol(info.to_save,info.currency_symbol,info.currency_dp) }}+ {{ formatAmountBySymbol(info.to_save,info.currency_symbol,info.currency_decimal_places) }}</td></tr>{% endfor %}diff --git a/resources/views/v1/piggy-banks/show.twig b/resources/views/v1/piggy-banks/show.twigindex cf3d738183..efe033ba97 100644--- a/resources/views/v1/piggy-banks/show.twig+++ b/resources/views/v1/piggy-banks/show.twig@@ -41,19 +41,19 @@<tr><td>{{ 'target_amount'|_ }}</td><td>- {{ formatAmountBySymbol(piggy.target_amount, piggy.currency_symbol, piggy.currency_dp) }}+ {{ formatAmountBySymbol(piggy.target_amount, piggy.currency_symbol, piggy.currency_decimal_places) }}</td></tr><tr><td>{{ 'saved_so_far'|_ }}</td><td>- {{ formatAmountBySymbol(piggy.current_amount, piggy.currency_symbol, piggy.currency_dp) }}+ {{ formatAmountBySymbol(piggy.current_amount, piggy.currency_symbol, piggy.currency_decimal_places) }}</td></tr><tr><td>{{ 'left_to_save'|_ }}</td><td>- {{ formatAmountBySymbol(piggy.left_to_save, piggy.currency_symbol, piggy.currency_dp) }}+ {{ formatAmountBySymbol(piggy.left_to_save, piggy.currency_symbol, piggy.currency_decimal_places) }}</td></tr><tr>@@ -80,7 +80,7 @@<tr><td>{{ 'suggested_amount'|_ }}</td><td>- {{ formatAmountBySymbol(piggy.save_per_month, piggy.currency_symbol, piggy.currency_dp) }}+ {{ formatAmountBySymbol(piggy.save_per_month, piggy.currency_symbol, piggy.currency_decimal_places) }}</td></tr>diff --git a/resources/views/v1/recurring/index.twig b/resources/views/v1/recurring/index.twigindex 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 %}<li>{# 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 %}<a href="{{ route('accounts.show', rtt['source_id']) }}">{{ rtt['source_name'] }}</a>→diff --git a/resources/views/v1/recurring/show.twig b/resources/views/v1/recurring/show.twigindex 9a8bf58353..046b33d3a9 100644--- a/resources/views/v1/recurring/show.twig+++ b/resources/views/v1/recurring/show.twig@@ -112,9 +112,9 @@<a href="{{ route('accounts.show', [transaction.destination_id]) }}">{{ transaction.destination_name }}</a></td><td>- {{ 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 %}</td><td data-value="{% for meta in transaction.meta %}{% if meta.name == 'category_name' %}{{ meta.category_id }}{% endif %}{% endfor %}">diff --git a/resources/views/v1/transactions/split/edit.twig b/resources/views/v1/transactions/split/edit.twigindex c6a06fc0f5..d77c2df79d 100644--- a/resources/views/v1/transactions/split/edit.twig+++ b/resources/views/v1/transactions/split/edit.twig@@ -56,7 +56,7 @@<label for="ffInput_journal_amount" class="col-sm-4 control-label">{{ trans('form.amount') }}</label><div class="col-sm-8"><p id="ffInput_journal_amount" class="form-control-static">- {{ 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) }}</p></div></div>@@ -67,7 +67,7 @@<label for="ffInput_foreign_journal_amount" class="col-sm-4 control-label">{{ trans('form.foreign_amount') }}</label><div class="col-sm-8"><p id="ffInput_foreign_journal_amount" class="form-control-static">- {{ 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) }}</p></div></div>