From 8198d86934352c17e07c77d74a696624bcafcb36 Mon Sep 17 00:00:00 2001 From: James Cole Date: Wed, 22 Nov 2017 21:54:58 +0100 Subject: [PATCH] Fix #1012 --- resources/lang/en_US/firefly.php | 1 + resources/views/transactions/show.twig | 310 +++++++++++++------------ 2 files changed, 163 insertions(+), 148 deletions(-) diff --git a/resources/lang/en_US/firefly.php b/resources/lang/en_US/firefly.php index bd5bda1caf..cdd2dd0e6c 100644 --- a/resources/lang/en_US/firefly.php +++ b/resources/lang/en_US/firefly.php @@ -633,6 +633,7 @@ return [ 'store_reconcile' => 'Store reconciliation', 'reconciliation_transaction' => 'Reconciliation transaction', 'Reconciliation' => 'Reconciliation', + 'reconciliation' => 'Reconciliation', 'reconcile_options' => 'Reconciliation options', 'reconcile_range' => 'Reconciliation range', 'start_reconcile' => 'Start reconciling', diff --git a/resources/views/transactions/show.twig b/resources/views/transactions/show.twig index b13a5d7823..4e869f350d 100644 --- a/resources/views/transactions/show.twig +++ b/resources/views/transactions/show.twig @@ -19,44 +19,47 @@
  • {{ 'edit'|_ }}
  • {{ 'delete'|_ }}
  • {# convert to withdrawal #} - {% if journal.transactionType.type != "Withdrawal" %} + {% if journal.transactionType.type != 'Reconciliation' %} + {% if journal.transactionType.type != "Withdrawal" %} +
  • + + {{ ('convert_'~journal.transactionType.type~'_to_withdrawal')|_ }} + +
  • + {% endif %} + {# convert to deposit #} + {% if journal.transactionType.type != "Deposit" %} +
  • + + {{ ('convert_'~journal.transactionType.type~'_to_deposit')|_ }} + +
  • + {% endif %} + {# convert to transfer#} + {% if journal.transactionType.type != "Transfer" %} +
  • + + {{ ('convert_'~journal.transactionType.type~'_to_transfer')|_ }} + +
  • + {% endif %} + {# other options #}
  • - - {{ ('convert_'~journal.transactionType.type~'_to_withdrawal')|_ }} + + {{ ('clone_'~journal.transactionType.type|lower)|_ }} + +
  • +
  • + + {{ ('split_this_'~what)|_ }} + +
  • +
  • + {{ 'link_transaction'|_ }}
  • {% endif %} - {# convert to deposit #} - {% if journal.transactionType.type != "Deposit" %} -
  • - - {{ ('convert_'~journal.transactionType.type~'_to_deposit')|_ }} - -
  • - {% endif %} - {# convert to transfer#} - {% if journal.transactionType.type != "Transfer" %} -
  • - - {{ ('convert_'~journal.transactionType.type~'_to_transfer')|_ }} - -
  • - {% endif %} - {# other options #} -
  • - - {{ ('clone_'~journal.transactionType.type|lower)|_ }} - -
  • -
  • - - {{ ('split_this_'~what)|_ }} - -
  • -
  • - {{ 'link_transaction'|_ }} - -
  • @@ -73,17 +76,19 @@ {{ trans('list.description') }} {{ journal.description }} - - - {{ 'source_accounts'|_ }} - {{ sourceAccount(journal)|raw }} - + {% if journal.transactionType.type != 'Reconciliation' %} + + + {{ 'source_accounts'|_ }} + {{ sourceAccount(journal)|raw }} + - - - {{ 'destination_accounts'|_ }} - {{ destinationAccount(journal)|raw }} - + + + {{ 'destination_accounts'|_ }} + {{ destinationAccount(journal)|raw }} + + {% endif %} {{ 'total_amount'|_ }} @@ -108,50 +113,55 @@
    {{ 'edit'|_ }} - - + {% endif %} {{ 'delete'|_ }}
    @@ -184,10 +194,12 @@ {{ 'categories'|_ }} {{ journalCategories(journal)|raw }} - - {{ 'budgets'|_ }} - {{ journalBudgets(journal)|raw }} - + {% if journal.transactionType.type != 'Reconciliation' %} + + {{ 'budgets'|_ }} + {{ journalBudgets(journal)|raw }} + + {% endif %} {% if journal.hasMeta('interest_date') %} @@ -328,7 +340,8 @@
    - +
    @@ -360,74 +373,75 @@ {% endif %}
    - -
    -
    -
    -
    -

    {{ 'transactions'|_ }}

    -
    - - - - - - - - - - - - - - - {% for transaction in transactions %} + {% if journal.transactionType.type != 'Reconciliation' %} +
    +
    +
    +
    +

    {{ 'transactions'|_ }}

    +
    +
    {{ trans('list.source_account') }}{{ trans('list.destination_account') }}{{ trans('list.amount') }}
    + - - - - - - - - + + + + + + + + - {% endfor %} - -
    - {% if transaction.source_account_type == 'Cash account' %} - ({{ 'cash'|_ }}) - {% else %} - {{ transaction.source_account_name }} - {% endif %} - - - {% if transaction.destination_account_type == 'Cash account' %} - ({{ 'cash'|_ }}) - {% else %} - {{ transaction.destination_account_name }} - {% endif %} - - - {{ transaction|transactionArrayAmount }} - {{ trans('list.source_account') }}{{ trans('list.destination_account') }}{{ trans('list.amount') }}
    + + + {% for transaction in transactions %} + + + {% if transaction.description == "" %} + {{ journal.description }} + {% else %} + {{ transaction.description }} + {% endif %} + + + {% if transaction.source_account_type == 'Cash account' %} + ({{ 'cash'|_ }}) + {% else %} + {{ transaction.source_account_name }} + {% endif %} + + + + {{ formatSourceBefore(transaction) }} → {{ formatSourceAfter(transaction) }} + + + {% if transaction.destination_account_type == 'Cash account' %} + ({{ 'cash'|_ }}) + {% else %} + {{ transaction.destination_account_name }} + {% endif %} + + + + {{ formatDestinationBefore(transaction) }} → {{ formatDestinationAfter(transaction) }} + + + {{ transaction|transactionArrayAmount }} + + + {{ transaction.source|transactionBudgets }} + + + {{ transaction.source|transactionCategories }} + + + {% endfor %} + + +
    - + {% endif %} {# link journal modal:#}