diff --git a/resources/views/transactions/show.twig b/resources/views/transactions/show.twig index cb0c6c1f3a..2761175f6a 100644 --- a/resources/views/transactions/show.twig +++ b/resources/views/transactions/show.twig @@ -160,12 +160,12 @@ {% 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' %} - {{ 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 %} {% 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 @@
- {% if 'Cash account' == journal.source_account_type %} ({{ 'cash'|_ }}) {% 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' %} - {{ formatAmountBySymbol(journal.amount, journal.currency_symbol, journal.currency_decimal_places, false) }} + {{ formatAmountBySymbol(journal.amount*-1, journal.currency_symbol, journal.currency_decimal_places, false) }} {% elseif first.transaction_type_type == 'Liability credit' %} @@ -314,12 +313,12 @@ {% 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' %} - ({{ formatAmountBySymbol(journal.pc_amount, primaryCurrency.symbol, primaryCurrency.decimal_places, false) }}) + ({{ formatAmountBySymbol(journal.pc_amount*-1, primaryCurrency.symbol, primaryCurrency.decimal_places, false) }}) {% endif %} {% endif %} @@ -327,12 +326,12 @@ {% 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' %} - ({{ 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) }}) {% endif %} {% endif %} @@ -340,12 +339,12 @@ {% 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' %} - ({{ formatAmountBySymbol(journal.pc_foreign_amount, primaryCurrency.symbol, primaryCurrency.decimal_places, false) }}) + ({{ formatAmountBySymbol(journal.pc_foreign_amount*-1, primaryCurrency.symbol, primaryCurrency.decimal_places, false) }}) {% endif %} {% endif %}