Expand currency view in accounts.

This commit is contained in:
James Cole
2024-12-25 07:10:02 +01:00
parent 98b579c042
commit e73fe06f7e
5 changed files with 105 additions and 37 deletions

View File

@@ -66,14 +66,22 @@
{% if objectType != 'liabilities' %}
<td style="text-align: right;">
<span style="margin-right:5px;">
{{ formatAmountByAccount(account, account.endBalance) }}
{% for key, balance in account.endBalances %}
{% if 'balance' == key or 'native_balance' == key %}
{{ formatAmountBySymbol(balance, defaultCurrency.symbol, defaultCurrency.currency.decimal_places) }}
{% else %}
({{ formatAmountByCode(balance, key) }})
{% endif %}
{% endfor %}
</span>
</td>
{% endif %}
{% if objectType == 'liabilities' %}
<td style="text-align: right;">
{% if '-' != account.current_debt %}
<span class="text-info money-transfer">{{ formatAmountByAccount(account, account.current_debt, false) }}</span>
<span class="text-info money-transfer">
{{ formatAmountBySymbol(account.current_debt, account.currency.symbol, account.currency.decimal_places, false) }}
</span>
{% endif %}
</td>
{% endif %}
@@ -99,7 +107,13 @@
{% endif %}
<td class="hidden-sm hidden-xs hidden-md" style="text-align: right;">
<span style="margin-right:5px;">
{{ formatAmountByAccount(account, account.difference) }}
{% for key, balance in account.differences %}
{% if 'balance' == key or 'native_balance' == key %}
{{ formatAmountBySymbol(balance, defaultCurrency.symbol, defaultCurrency.currency.decimal_places) }}
{% else %}
({{ formatAmountByCode(balance, key) }})
{% endif %}
{% endfor %}
</span>
</td>
<td class="hidden-sm hidden-xs">