Firefly III: a personal finances manager
PHP accountingbudgetbudgetingbudgetscash-flowcashflowcredit-carddockerexpensesfinancefinancesfinanciallinuxmoneypaycheckpersonal-financephpphp7
Fix amounts in transaction show.
James Cole33bd2ceae80a
diff --git a/resources/views/transactions/show.twig b/resources/views/transactions/show.twigindex cb0c6c1f3a..2761175f6a 100644--- a/resources/views/transactions/show.twig+++ b/resources/views/transactions/show.twig@@ -160,12 +160,12 @@<td>{% for amount in amounts %}{% 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 %}+ {% 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' %}<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>{% elseif first.transaction_type_type == 'Opening balance' %}{# Opening balance stored amount is always negative: find out which way the money goes #}@@ -289,7 +289,6 @@<table class="table"><tr><td colspan="2">- <!-- type is: "{{ first.transaction_type_type }}" -->{% if 'Cash account' == journal.source_account_type %}<span class="text-success">({{ 'cash'|_ }})</span>{% else %}@@ -298,12 +297,12 @@{% endif %}{% 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) }}+ {% 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' %}<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>{% elseif first.transaction_type_type == 'Liability credit' %}<span class="text-info money-transfer">@@ -314,12 +313,12 @@<!-- do primary currency amount -->{% if null != journal.pc_amount and primaryCurrency.id != journal.currency_id %}{% 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) }})+ {% elseif first.transaction_type_type == 'Deposit' %}+ ({{ formatAmountBySymbol(journal.pc_amount*-1, primaryCurrency.symbol, primaryCurrency.decimal_places) }}){% elseif first.transaction_type_type == '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>{% endif %}{% endif %}@@ -327,12 +326,12 @@<!-- do foreign amount -->{% if null != journal.foreign_amount %}{% 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) }})+ {% 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' %}<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>{% endif %}{% endif %}@@ -340,12 +339,12 @@<!-- do foreign PC amount -->{% if null != journal.pc_foreign_amount %}{% 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) }})+ {% elseif first.transaction_type_type == 'Deposit' %}+ ({{ formatAmountBySymbol(journal.pc_foreign_amount*-1, primaryCurrency.symbol, primaryCurrency.decimal_places) }}){% elseif first.transaction_type_type == '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>{% endif %}{% endif %}