mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2026-01-09 23:41:10 +00:00
Clean up some money formatting routines.
This commit is contained in:
@@ -285,8 +285,9 @@
|
||||
|
||||
</td>
|
||||
<td>
|
||||
{{ formatAmountWithCode(transaction.source_account_before,journal.transactionCurrency.code) }}
|
||||
⟶ {{ formatAmountWithCode(transaction.source_account_after,journal.transactionCurrency.code) }}
|
||||
|
||||
{{ formatAnything(journal.transactionCurrency, transaction.source_account_before) }}
|
||||
⟶ {{ formatAnything(journal.transactionCurrency, transaction.source_account_after) }}
|
||||
</td>
|
||||
<td>
|
||||
{% if transaction.destination_account_type == 'Cash account' %}
|
||||
@@ -297,23 +298,26 @@
|
||||
|
||||
</td>
|
||||
<td>
|
||||
{{ formatAmountWithCode(transaction.destination_account_before,journal.transactionCurrency.code) }}
|
||||
⟶ {{ formatAmountWithCode(transaction.destination_account_after,journal.transactionCurrency.code) }}
|
||||
|
||||
{{ formatAnything(journal.transactionCurrency, transaction.destination_account_before) }}
|
||||
⟶ {{ formatAnything(journal.transactionCurrency, transaction.destination_account_after) }}
|
||||
</td>
|
||||
<td>
|
||||
{% if journal.transactiontype.type == 'Deposit' %}
|
||||
<!-- deposit, positive amount with correct currency -->
|
||||
{{ formatAmountWithCode(transaction.destination_amount, journal.transactionCurrency.code) }}
|
||||
{{ formatAnything(journal.transactionCurrency, transaction.destination_amount) }}
|
||||
|
||||
{% endif %}
|
||||
{% if journal.transactiontype.type == 'Withdrawal' %}
|
||||
<!-- withdrawal, negative amount with correct currency -->
|
||||
{{ formatAmountWithCode(transaction.source_amount, journal.transactionCurrency.code) }}
|
||||
{{ formatAnything(journal.transactionCurrency, transaction.source_amount) }}
|
||||
|
||||
{% endif %}
|
||||
{% if journal.transactiontype.type == 'Transfer' %}
|
||||
<!-- transfer, positive amount in blue -->
|
||||
<span class="text-info">{{ formatAmountPlainWithCode(transaction.destination_amount, journal.transactionCurrency.code) }}</span>
|
||||
<span class="text-info">
|
||||
{{ formatAnythingPlain(journal.transactionCurrency, transaction.destination_amount) }}
|
||||
</span>
|
||||
{% endif %}
|
||||
</td>
|
||||
<td>
|
||||
|
||||
Reference in New Issue
Block a user