mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-15 08:35:00 +00:00
Fix amounts in transaction show.
This commit is contained in:
@@ -160,12 +160,12 @@
|
|||||||
<td>
|
<td>
|
||||||
{% for amount in amounts %}
|
{% for amount in amounts %}
|
||||||
{% if first.transaction_type_type == 'Withdrawal' %}
|
{% if first.transaction_type_type == 'Withdrawal' %}
|
||||||
{{ formatAmountBySymbol(amount.amount*-1,amount.symbol, amount.decimal_places) }}{% if loop.index0 != amounts|length -1 %}, {% endif %}
|
|
||||||
{% elseif first.transaction_type_type == 'Deposit' %}
|
|
||||||
{{ formatAmountBySymbol(amount.amount,amount.symbol, amount.decimal_places) }}{% if loop.index0 != amounts|length -1 %}, {% endif %}
|
{{ formatAmountBySymbol(amount.amount,amount.symbol, amount.decimal_places) }}{% if loop.index0 != amounts|length -1 %}, {% endif %}
|
||||||
|
{% elseif first.transaction_type_type == 'Deposit' %}
|
||||||
|
{{ formatAmountBySymbol(amount.amount*-1,amount.symbol, amount.decimal_places) }}{% if loop.index0 != amounts|length -1 %}, {% endif %}
|
||||||
{% elseif first.transaction_type_type == 'Transfer' %}
|
{% elseif first.transaction_type_type == 'Transfer' %}
|
||||||
<span class="text-info money-transfer">
|
<span class="text-info money-transfer">
|
||||||
{{ formatAmountBySymbol(amount.amount, amount.symbol, amount.decimal_places, false) }}{% if loop.index0 != amounts|length -1 %}, {% endif %}
|
{{ formatAmountBySymbol(amount.amount*-1, amount.symbol, amount.decimal_places, false) }}{% if loop.index0 != amounts|length -1 %}, {% endif %}
|
||||||
</span>
|
</span>
|
||||||
{% elseif first.transaction_type_type == 'Opening balance' %}
|
{% elseif first.transaction_type_type == 'Opening balance' %}
|
||||||
{# Opening balance stored amount is always negative: find out which way the money goes #}
|
{# Opening balance stored amount is always negative: find out which way the money goes #}
|
||||||
@@ -289,7 +289,6 @@
|
|||||||
<table class="table">
|
<table class="table">
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan="2">
|
<td colspan="2">
|
||||||
<!-- type is: "{{ first.transaction_type_type }}" -->
|
|
||||||
{% if 'Cash account' == journal.source_account_type %}
|
{% if 'Cash account' == journal.source_account_type %}
|
||||||
<span class="text-success">({{ 'cash'|_ }})</span>
|
<span class="text-success">({{ 'cash'|_ }})</span>
|
||||||
{% else %}
|
{% else %}
|
||||||
@@ -298,12 +297,12 @@
|
|||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if first.transaction_type_type == 'Withdrawal' %}
|
{% if first.transaction_type_type == 'Withdrawal' %}
|
||||||
{{ formatAmountBySymbol(journal.amount*-1, journal.currency_symbol, journal.currency_decimal_places) }}
|
|
||||||
{% elseif first.transaction_type_type == 'Deposit' %}
|
|
||||||
{{ formatAmountBySymbol(journal.amount, journal.currency_symbol, journal.currency_decimal_places) }}
|
{{ formatAmountBySymbol(journal.amount, journal.currency_symbol, journal.currency_decimal_places) }}
|
||||||
|
{% elseif first.transaction_type_type == 'Deposit' %}
|
||||||
|
{{ formatAmountBySymbol(journal.amount*-1, journal.currency_symbol, journal.currency_decimal_places) }}
|
||||||
{% elseif first.transaction_type_type == 'Transfer' or first.transaction_type_type == 'Opening balance' %}
|
{% elseif first.transaction_type_type == 'Transfer' or first.transaction_type_type == 'Opening balance' %}
|
||||||
<span class="text-info money-transfer">
|
<span class="text-info money-transfer">
|
||||||
{{ formatAmountBySymbol(journal.amount, journal.currency_symbol, journal.currency_decimal_places, false) }}
|
{{ formatAmountBySymbol(journal.amount*-1, journal.currency_symbol, journal.currency_decimal_places, false) }}
|
||||||
</span>
|
</span>
|
||||||
{% elseif first.transaction_type_type == 'Liability credit' %}
|
{% elseif first.transaction_type_type == 'Liability credit' %}
|
||||||
<span class="text-info money-transfer">
|
<span class="text-info money-transfer">
|
||||||
@@ -314,12 +313,12 @@
|
|||||||
<!-- do primary currency amount -->
|
<!-- do primary currency amount -->
|
||||||
{% if null != journal.pc_amount and primaryCurrency.id != journal.currency_id %}
|
{% if null != journal.pc_amount and primaryCurrency.id != journal.currency_id %}
|
||||||
{% if first.transaction_type_type == 'Withdrawal' %}
|
{% if first.transaction_type_type == 'Withdrawal' %}
|
||||||
({{ formatAmountBySymbol(journal.pc_amount*-1, primaryCurrency.symbol, primaryCurrency.decimal_places) }})
|
|
||||||
{% elseif first.transaction_type_type == 'Deposit' %}
|
|
||||||
({{ formatAmountBySymbol(journal.pc_amount, primaryCurrency.symbol, primaryCurrency.decimal_places) }})
|
({{ formatAmountBySymbol(journal.pc_amount, primaryCurrency.symbol, primaryCurrency.decimal_places) }})
|
||||||
|
{% elseif first.transaction_type_type == 'Deposit' %}
|
||||||
|
({{ formatAmountBySymbol(journal.pc_amount*-1, primaryCurrency.symbol, primaryCurrency.decimal_places) }})
|
||||||
{% elseif first.transaction_type_type == 'Transfer' %}
|
{% elseif first.transaction_type_type == 'Transfer' %}
|
||||||
<span class="text-info money-transfer">
|
<span class="text-info money-transfer">
|
||||||
({{ formatAmountBySymbol(journal.pc_amount, primaryCurrency.symbol, primaryCurrency.decimal_places, false) }})
|
({{ formatAmountBySymbol(journal.pc_amount*-1, primaryCurrency.symbol, primaryCurrency.decimal_places, false) }})
|
||||||
</span>
|
</span>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
@@ -327,12 +326,12 @@
|
|||||||
<!-- do foreign amount -->
|
<!-- do foreign amount -->
|
||||||
{% if null != journal.foreign_amount %}
|
{% if null != journal.foreign_amount %}
|
||||||
{% if first.transaction_type_type == 'Withdrawal' %}
|
{% if first.transaction_type_type == 'Withdrawal' %}
|
||||||
({{ formatAmountBySymbol(journal.foreign_amount*-1, journal.foreign_currency_symbol, journal.foreign_currency_decimal_places) }})
|
|
||||||
{% elseif first.transaction_type_type == 'Deposit' %}
|
|
||||||
({{ formatAmountBySymbol(journal.foreign_amount, journal.foreign_currency_symbol, journal.foreign_currency_decimal_places) }})
|
({{ formatAmountBySymbol(journal.foreign_amount, journal.foreign_currency_symbol, journal.foreign_currency_decimal_places) }})
|
||||||
|
{% elseif first.transaction_type_type == 'Deposit' %}
|
||||||
|
({{ formatAmountBySymbol(journal.foreign_amount*-1, journal.foreign_currency_symbol, journal.foreign_currency_decimal_places) }})
|
||||||
{% elseif first.transaction_type_type == 'Transfer' %}
|
{% elseif first.transaction_type_type == 'Transfer' %}
|
||||||
<span class="text-info money-transfer">
|
<span class="text-info money-transfer">
|
||||||
({{ formatAmountBySymbol(journal.foreign_amount, journal.foreign_currency_symbol, journal.foreign_currency_decimal_places, false) }})
|
({{ formatAmountBySymbol(journal.foreign_amount*-1, journal.foreign_currency_symbol, journal.foreign_currency_decimal_places, false) }})
|
||||||
</span>
|
</span>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
@@ -340,12 +339,12 @@
|
|||||||
<!-- do foreign PC amount -->
|
<!-- do foreign PC amount -->
|
||||||
{% if null != journal.pc_foreign_amount %}
|
{% if null != journal.pc_foreign_amount %}
|
||||||
{% if first.transaction_type_type == 'Withdrawal' %}
|
{% if first.transaction_type_type == 'Withdrawal' %}
|
||||||
({{ formatAmountBySymbol(journal.pc_foreign_amount*-1, primaryCurrency.symbol, primaryCurrency.decimal_places) }})
|
|
||||||
{% elseif first.transaction_type_type == 'Deposit' %}
|
|
||||||
({{ formatAmountBySymbol(journal.pc_foreign_amount, primaryCurrency.symbol, primaryCurrency.decimal_places) }})
|
({{ formatAmountBySymbol(journal.pc_foreign_amount, primaryCurrency.symbol, primaryCurrency.decimal_places) }})
|
||||||
|
{% elseif first.transaction_type_type == 'Deposit' %}
|
||||||
|
({{ formatAmountBySymbol(journal.pc_foreign_amount*-1, primaryCurrency.symbol, primaryCurrency.decimal_places) }})
|
||||||
{% elseif first.transaction_type_type == 'Transfer' %}
|
{% elseif first.transaction_type_type == 'Transfer' %}
|
||||||
<span class="text-info money-transfer">
|
<span class="text-info money-transfer">
|
||||||
({{ formatAmountBySymbol(journal.pc_foreign_amount, primaryCurrency.symbol, primaryCurrency.decimal_places, false) }})
|
({{ formatAmountBySymbol(journal.pc_foreign_amount*-1, primaryCurrency.symbol, primaryCurrency.decimal_places, false) }})
|
||||||
</span>
|
</span>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
Reference in New Issue
Block a user