mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-09-30 02:26:58 +00:00
Refer to correct field name.
This commit is contained in:
@@ -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) . ')';
|
||||
}
|
||||
|
@@ -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>
|
||||
|
@@ -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 %}
|
||||
|
@@ -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>
|
||||
|
@@ -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>
|
||||
→
|
||||
|
@@ -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 %}">
|
||||
|
@@ -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>
|
||||
|
Reference in New Issue
Block a user