diff --git a/resources/views/v1/transactions/show.twig b/resources/views/v1/transactions/show.twig index afca3a843e..7aad96c319 100644 --- a/resources/views/v1/transactions/show.twig +++ b/resources/views/v1/transactions/show.twig @@ -79,7 +79,7 @@
- {% if type != 'Withdrawal' or splits == 1 %} + {% if first.transactiontype.type != 'Withdrawal' or splits == 1 %} {% endif %} - {% if type != 'Deposit' or splits == 1 %} + {% if first.transactiontype.type != 'Deposit' or splits == 1 %}
{{ 'source_accounts'|_ }} @@ -100,7 +100,7 @@
{{ 'destination_accounts'|_ }} @@ -125,9 +125,9 @@ {{ 'total_amount'|_ }} {% for amount in amounts %} - {% if type == 'Withdrawal' or type == 'Deposit' %} + {% if first.transactiontype.type == 'Withdrawal' or first.transactiontype.type == 'Deposit' %} {{ formatAmountBySymbol(amount.amount*-1,amount.symbol, amount.decimal_places) }}{% if loop.index0 != amounts|length -1 %}, {% endif %} - {% elseif type == 'Transfer' %} + {% elseif first.transactiontype.type == 'Transfer' %} {{ formatAmountBySymbol(amount.amount, amount.symbol, amount.decimal_places, false) }}{% if loop.index0 != amounts|length -1 %}, {% endif %} @@ -179,16 +179,16 @@ {% endif %} - {% if null != journal.budget_id and type == 'Withdrawal' %} + {% if null != journal.budget_id and first.transactiontype.type == 'Withdrawal' %} {% endif %} - {% if null != journal.bill_id and type == 'Withdrawal' %} + {% if null != journal.bill_id and first.transactiontype.type == 'Withdrawal' %}
- + {% if 'Cash account' == journal.source_type %} ({{ 'cash'|_ }}) {% else %} {{ journal.source_name }} → {% endif %} - {% if type == 'Withdrawal' or type == 'Deposit' %} + {% if first.transactiontype.type == 'Withdrawal' or first.transactiontype.type == 'Deposit' %} {{ formatAmountBySymbol(journal.amount*-1, journal.currency_symbol, journal.currency_decimal_places) }} - {% elseif type == 'Transfer' or type == 'Opening balance' %} + {% elseif first.transactiontype.type == 'Transfer' or first.transactiontype.type == 'Opening balance' %} {{ formatAmountBySymbol(journal.amount, journal.currency_symbol, journal.currency_decimal_places, false) }} @@ -196,9 +196,9 @@ {% if null != journal.foreign_amount %} - {% if type == 'Withdrawal' or type == 'Deposit' %} + {% if first.transactiontype.type == 'Withdrawal' or first.transactiontype.type == 'Deposit' %} ({{ formatAmountBySymbol(journal.foreign_amount*-1, journal.foreign_currency_symbol, journal.foreign_currency_decimal_places) }}) - {% elseif type == 'Transfer' %} + {% elseif first.transactiontype.type == 'Transfer' %} ({{ formatAmountBySymbol(journal.foreign_amount, journal.foreign_currency_symbol, journal.foreign_currency_decimal_places, false) }}) @@ -220,13 +220,13 @@ {{ journal.category_name }}
{{ 'budget'|_ }} {{ journal.budget_name }}
{{ 'bill'|_ }} {{ journal.bill_name }}