{% extends './layout/default' %} {% block breadcrumbs %} {{ Breadcrumbs.render(Route.getCurrentRoute.getName, transactionGroup) }} {% endblock %} {% block content %}

{{ 'transaction_journal_information'|_ }}

{{ trans('list.type') }} {{ first.transactiontype.type|_ }}
{{ trans('list.description') }} {% if splits == 1 %} {{ first.description }} {% else %} {{ transactionGroup.title }} {% endif %}
{{ trans('list.date') }} {{ first.date.isoFormat(dateTimeFormat) }} {% if(first.date_tz != '') %} ({{ trans('firefly.stored_in_tz', {timezone: first.date_tz }) }}) {% endif %}
{% if groupLogEntries|length > 0 %}

{{ 'audit_log_entries'|_ }}

{% include 'list.ale' with {logEntries: groupLogEntries} %}
{% endif %}

{{ 'transaction_journal_meta'|_ }}

{% if first.transactiontype.type != 'Withdrawal' or splits == 1 %} {% endif %} {% if first.transactiontype.type != 'Deposit' or splits == 1 %} {% endif %}
{{ trans_choice('firefly.source_accounts', accounts['source']|length ) }} {% for account in accounts['source'] %} {% if 'Cash account' == account.type %} ({{ 'cash'|_ }}) {% else %} {{ account.name }} {% endif %} {% if loop.index0 != accounts['source']|length -1 %}, {% endif %} {% endfor %}
{{ trans_choice('firefly.destination_accounts', accounts['destination']|length ) }} {% for account in accounts['destination'] %} {% if 'Cash account' == account.type %} ({{ 'cash'|_ }}) {% else %} {{ account.name }} {% endif %} {% if loop.index0 != accounts['destination']|length -1 %}, {% endif %} {% endfor %}
{{ 'total_amount'|_ }} {% for amount in amounts %} {% if first.transactiontype.type == 'Withdrawal' %} {{ formatAmountBySymbol(amount.amount*-1,amount.symbol, amount.decimal_places) }}{% if loop.index0 != amounts|length -1 %}, {% endif %} {% elseif first.transactiontype.type == 'Deposit' %} {{ formatAmountBySymbol(amount.amount,amount.symbol, amount.decimal_places) }}{% if loop.index0 != amounts|length -1 %}, {% endif %} {% elseif first.transactiontype.type == 'Transfer' %} {{ formatAmountBySymbol(amount.amount, amount.symbol, amount.decimal_places, false) }}{% if loop.index0 != amounts|length -1 %}, {% endif %} {% elseif first.transactiontype.type == 'Opening balance' %} {# Opening balance stored amount is always negative: find out which way the money goes #} {% if groupArray.transactions[0].source_type == 'Initial balance account' %} {{ formatAmountBySymbol(amount.amount*-1,amount.symbol, amount.decimal_places) }} {% else %} {{ formatAmountBySymbol(amount.amount,amount.symbol, amount.decimal_places) }} {% endif %} {% endif %} {% endfor %}
{% if splits > 1 %}

{{ 'splits'|_ }}

{% endif %} {% set boxSize=6 %} {% if(splits == 2) %} {% set boxSize=6 %} {% endif %} {% if (splits > 2) %} {% set boxSize = 4 %} {% endif %}
{% for index,journal in groupArray.transactions %}

{{ journal.description }} {% if journal.reconciled %} {% endif %} {% if splits > 1 %} {{ index+1 }} / {{ splits }} {% endif %}

{% if null != journal.category_id %} {% endif %} {% if null != journal.budget_id and first.transactiontype.type == 'Withdrawal' %} {% endif %} {% if null != journal.bill_id and first.transactiontype.type == 'Withdrawal' %} {% endif %} {% for dateField in ['interest_date','book_date','process_date','due_date','payment_date','invoice_date'] %} {% if journalHasMeta(journal.transaction_journal_id, dateField) %} {% endif %} {% endfor %} {% for metaField in ['external_id','bunq_payment_id','internal_reference','sepa_batch_id','sepa_ct_id','sepa_ct_op','sepa_db','sepa_country','sepa_cc','sepa_ep','sepa_ci','external_url'] %} {% if journalHasMeta(journal.transaction_journal_id, metaField) %} {% endif %} {% endfor %} {% if null != journal.notes and '' != journal.notes %} {% endif %} {% if journalHasMeta(journal.transaction_journal_id, 'recurring_total') and journalHasMeta(journal.transaction_journal_id, 'recurring_count') %} {% set recurringTotal = journalGetMetaField(journal.transaction_journal_id, 'recurring_total') %} {% if 0 == recurringTotal %} {% set recurringTotal = '∞' %} {% endif %} {% endif %} {% if journal.tags|length > 0 %} {% endif %}
{% if 'Cash account' == journal.source_type %} ({{ 'cash'|_ }}) {% else %} {{ journal.source_name }} → {% endif %} {% if first.transactiontype.type == 'Withdrawal' %} {{ formatAmountBySymbol(journal.amount*-1, journal.currency_symbol, journal.currency_decimal_places) }} {% elseif first.transactiontype.type == 'Deposit' %} {{ formatAmountBySymbol(journal.amount, journal.currency_symbol, journal.currency_decimal_places) }} {% elseif first.transactiontype.type == 'Transfer' or first.transactiontype.type == 'Opening balance' %} {{ formatAmountBySymbol(journal.amount, journal.currency_symbol, journal.currency_decimal_places, false) }} {% elseif first.transactiontype.type == 'Liability credit' %} {{ formatAmountBySymbol(journal.amount*-1, journal.currency_symbol, journal.currency_decimal_places, false) }} {% endif %} {% if null != journal.foreign_amount %} {% if first.transactiontype.type == 'Withdrawal' %} ({{ formatAmountBySymbol(journal.foreign_amount*-1, journal.foreign_currency_symbol, journal.foreign_currency_decimal_places) }}) {% elseif first.transactiontype.type == 'Deposit' %} ({{ formatAmountBySymbol(journal.foreign_amount, journal.foreign_currency_symbol, journal.foreign_currency_decimal_places) }}) {% elseif first.transactiontype.type == 'Transfer' %} ({{ formatAmountBySymbol(journal.foreign_amount, journal.foreign_currency_symbol, journal.foreign_currency_decimal_places, false) }}) {% endif %} {% endif %} → {% if 'Cash account' == journal.destination_type %} ({{ 'cash'|_ }}) {% else %} {{ journal.destination_name }} {% endif %}
{{ 'category'|_ }} {{ journal.category_name }}
{{ 'budget'|_ }} {{ journal.budget_name }}
{{ 'bill'|_ }} {{ journal.bill_name }}
{{ trans('list.'~dateField) }} {{ journalGetMetaDate(journal.transaction_journal_id, dateField).isoFormat(monthAndDayFormat) }}
{{ trans('list.'~metaField) }} {% if 'external_url' == metaField %} {% set url = journalGetMetaField(journal.transaction_journal_id, metaField) %} {% if url|length > 60 %} {{ url|slice(0, 60) ~ '...' }} {% else %} {{ url }} {% endif %} {% endif %} {% if 'external_url' != metaField %} {{ journalGetMetaField(journal.transaction_journal_id, metaField) }} {% endif %}
{{ trans('list.notes') }} {{ journal.notes|default('')|markdown }}
{{ trans('list.recurring_transaction') }} {{ trans('firefly.recurring_info', {total: recurringTotal, count: journalGetMetaField(journal.transaction_journal_id, 'recurring_count') }) }}
{{ 'tags'|_ }} {% for tag in journal.tags %}

{{ tag.tag }}

{% endfor %}
{% if links[journal.transaction_journal_id]|length > 0 %}

{{ 'journal_links'|_ }}

{% for link in links[journal.transaction_journal_id] %} {% endfor %}
{% if link.editable %} {{ link.link }} {% else %} {{ trans('firefly.'~link.link) }} {% endif %} "{{ link.description }}" ({{ link.amount|raw }}) {% if '' != link.foreign_amount %} ({{ link.foreign_amount|raw }}) {% endif %}
{% endif %} {% if attachments[journal.transaction_journal_id]|length > 0 %}

{{ 'attachments'|_ }}

{% include 'list.attachments' with {attachments: attachments[journal.transaction_journal_id]} %}
{% endif %} {% if events[journal.transaction_journal_id]|length > 0 %}

{{ 'piggy_events'|_ }}

{% for event in events[journal.transaction_journal_id] %} {% endfor %}
{{ event.amount|raw }} {{ event.piggy }}
{% endif %} {% if logEntries[journal.transaction_journal_id]|length > 0 %}

{{ 'audit_log_entries'|_ }}

{% include 'list.ale' with {logEntries: logEntries[journal.transaction_journal_id]} %}
{% endif %}
{% endfor %}
{# modal for linking journals. Will be filled by AJAX #} {% endblock %} {% block scripts %} {% endblock %}