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

{{ 'transaction_journal_information'|_ }}

{{ trans('list.type') }} {{ journal.transactiontype.type|_ }}
{{ trans('list.description') }} {% if transactions[0].reconciled %} {% endif %} {{ journal.description }}
{{ 'source_accounts'|_ }} {{ sourceAccount(journal)|raw }}
{{ 'destination_accounts'|_ }} {{ destinationAccount(journal)|raw }}
{{ 'total_amount'|_ }} {{ journal|journalTotalAmount }} {# if more transactions, list each one: #} {% if transactions|length > 2 %} ({% for transaction in transactions %} {% if transaction.type == 'Deposit' and transaction.amount > 0 %} {{ transaction|transactionArrayAmount }}{% if loop.index != loop.length %}, {% endif %} {% endif %} {% if transaction.type == 'Withdrawal' and transaction.amount < 0 %} {{ transaction|transactionArrayAmount }}{% if loop.index != loop.length %}, {% endif %} {% endif %} {% if transaction.type == 'Transfer' and transaction.amount > 0 %} {{ transaction|transactionArrayAmount }}{% if loop.index != loop.length %}, {% endif %} {% endif %} {% endfor %}) {% endif %}
{{ trans('list.date') }} {{ journal.date.formatLocalized(dateTimeFormat) }}
{% if journal.piggyBankEvents|length > 0 %}

{{ 'piggyBanks'|_ }}

{% include 'list/piggy-bank-events' with {'events': events, 'showPiggyBank':true} %}
{% endif %}

{{ 'transaction_journal_meta'|_ }}

{# all date meta values #} {% for dateField in ['interest_date','book_date','process_date','due_date','payment_date','invoice_date'] %} {% if journalHasMeta(journal, dateField) %} {% endif %} {% endfor %} {# all other meta values #} {% 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'] %} {% if journalHasMeta(journal, metaField) %} {% endif %} {% endfor %} {% if journal.notes.count == 1 %} {% endif %} {% if journal.bill_id %} {% endif %} {% if journal.tags|length > 0 %} {% endif %}
{{ 'categories'|_ }} {{ journalCategories(journal)|raw }}
{{ 'budgets'|_ }} {{ journalBudgets(journal)|raw }}
{{ trans('list.'~dateField) }} {{ journalGetMetaDate(journal,dateField).formatLocalized(monthAndDayFormat) }}
{{ trans('list.'~metaField) }} {{ journalGetMetaField(journal, metaField) }}
{{ trans('list.notes') }} {{ journal.notes.first.text|markdown }}
{{ 'bill'|_ }} {{ journal.bill.name }}
{{ 'tags'|_ }} {% for tag in journal.tags %}

{{ tag.tag }}

{% endfor %}
{% if attachments|length > 0 %}

{{ 'attachments'|_ }}

{% for att in journal.attachments %} {% endfor %}
{% if att.file_exists %} {% endif %} {% if not att.file_exists %} {% endif %}
{% if att.file_exists %} {% if att.title %} {{ att.title }} {% else %} {{ att.filename }} {% endif %} ({{ att.size|filesize }}) {% if att.notes.first %} {{ att.notes.first.text|markdown }} {% endif %} {% endif %} {% if not att.file_exists %} {% if att.title %} {{ att.title }} {% else %} {{ att.filename }} {% endif %}
{{ 'attachment_not_found'|_ }} {% endif %}
{% endif %} {# show links: #} {% if links.count > 0 %}

{{ 'journal_links'|_ }}

{% for link in links %} {% endfor %}
{{ ('this_'~(what|lower))|_ }} {% if link.source.id == journal.id %} {{ journalLinkTranslation('outward', link.linkType.outward) }} #{{ link.destination.id }}: {{ link.destination.description }} ({{ link.destination|journalTotalAmount }}) {% else %} {{ journalLinkTranslation('inward', link.linkType.inward) }} #{{ link.source.id }}: {{ link.source.description }} ({{ link.source|journalTotalAmount }}) {% endif %} {% if link.notes.count == 1 %}
{{ link.notes.first.text|markdown }} {% endif %}

{% endif %}

{{ 'transactions'|_ }}

{% set maxIdentifier = ((transactions|length) / 2) -1 %} {% for x in 0..maxIdentifier %} {# loop each transaction in the array.#} {% for transaction in transactions %} {% if ((transaction.type == 'Withdrawal') and transaction.identifier == x and transaction.amount < 0) or ((transaction.type == 'Deposit' or transaction.type == 'Transfer') and transaction.identifier == x and transaction.amount > 0) %} {% endif %} {% endfor %} {% endfor %}
{{ trans('list.source_account') }} {{ trans('list.destination_account') }} {{ trans('list.amount') }}
{% if transaction.source_type == 'Cash account' %} ({{ 'cash'|_ }}) {% else %} {{ transaction.source_name }} {% endif %} {% if transaction.destination_type == 'Cash account' %} ({{ 'cash'|_ }}) {% else %} {{ transaction.destination_name }} {% endif %} {{ transaction|transactionArrayAmount }}
{# link journal modal:#} {% endblock %} {% block scripts %} {% endblock %}