{% extends "./layout/default" %} {% block breadcrumbs %} {{ Breadcrumbs.render(Route.getCurrentRoute.getName, journal) }} {% endblock %} {% block content %}
{% if errors.all()|length > 0 %}

{{ 'errors'|_ }}

    {% for key, err in errors.all() %}
  • {{ err }}
  • {% endfor %}
{% endif %}

{{ 'transaction_data'|_ }}

{# DESCRIPTION IS ALWAYS AVAILABLE #} {{ ExpandedForm.text('journal_description', journal.description) }} {# show source if withdrawal or transfer #} {% if preFilled.what == 'withdrawal' or preFilled.what == 'transfer' %} {{ ExpandedForm.activeAssetAccountList('journal_source_id', preFilled.journal_source_id) }} {% endif %} {# show destination account id, if deposit (is asset): #} {% if preFilled.what == 'deposit' or preFilled.what == 'transfer' %} {{ ExpandedForm.activeAssetAccountList('journal_destination_id', preFilled.journal_destination_id) }} {% endif %} {# show amount and some helper text when making splits: #} {# amount #}

{{ formatAmountBySymbol(preFilled.journal_amount, preFilled.transactions[0].currency_symbol, preFilled.transactions[0].currency_dp) }}

{# foreign amount, if not zero. #} {% if preFilled.journal_foreign_amount != 0 %}

{{ formatAmountBySymbol(preFilled.journal_foreign_amount, preFilled.transactions[0].foreign_currency_symbol, preFilled.transactions[0].foreign_currency_dp) }}

{% endif %} {# DATE #} {{ ExpandedForm.date('date', journal.date) }}

{{ 'optional_field_meta_data'|_ }}

{# ALWAYS TAGS #} {{ ExpandedForm.text('tags', preFilled.tags) }}
{# EXPLANATION IF NECESSARY: #} {% if not optionalFields.interest_date or not optionalFields.book_date or not optionalFields.process_date or not optionalFields.due_date or not optionalFields.payment_date or not optionalFields.invoice_date or not optionalFields.internal_reference or not optionalFields.notes or not optionalFields.attachments %}

{{ trans('firefly.hidden_fields_preferences', {link: route('preferences.index')})|raw }}

{% endif %} {# BOX FOR DATES #} {% if optionalFields.interest_date or optionalFields.book_date or optionalFields.process_date or optionalFields.due_date or optionalFields.payment_date or optionalFields.invoice_date %}

{{ 'optional_field_meta_dates'|_ }}

{# INTEREST DATE #} {% if optionalFields.interest_date or journal.interest_date %} {{ ExpandedForm.date('interest_date', journal.interest_date) }} {% endif %} {# BOOK DATE #} {% if optionalFields.book_date or journal.book_date %} {{ ExpandedForm.date('book_date', journal.book_date) }} {% endif %} {# PROCESSING DATE #} {% if optionalFields.process_date or journal.process_date %} {{ ExpandedForm.date('process_date', journal.process_date) }} {% endif %} {# DUE DATE #} {% if optionalFields.due_date or journal.due_date %} {{ ExpandedForm.date('due_date', journal.due_date) }} {% endif %} {# PAYMENT DATE #} {% if optionalFields.payment_date or journal.payment_date %} {{ ExpandedForm.date('payment_date', journal.payment_date) }} {% endif %} {# INVOICE DATE #} {% if optionalFields.invoice_date or journal.invoice_date %} {{ ExpandedForm.date('invoice_date', journal.invoice_date) }} {% endif %}
{% endif %} {# BOX FOR BUSINESS FIELDS #} {% if optionalFields.internal_reference or optionalFields.notes %}

{{ 'optional_field_meta_business'|_ }}

{# INTERNAL REFERENCE #} {% if optionalFields.internal_reference or journal.internal_reference %} {{ ExpandedForm.text('internal_reference', journal.internal_reference) }} {% endif %} {# NOTES #} {% if optionalFields.notes or journal.notes %} {{ ExpandedForm.textarea('notes',preFilled.notes) }} {% endif %}
{% endif %} {# BOX FOR ATTACHMENTS #} {% if optionalFields.attachments %}

{{ 'optional_field_attachments'|_ }}

{# ATTACHMENTS #} {% if optionalFields.attachments %} {{ ExpandedForm.file('attachments[]', {'multiple': 'multiple','helpText': trans('firefly.upload_max_file_size', {'size': uploadSize|filesize}) }) }} {% endif %}
{% endif %}

{{ 'splits'|_ }}

{# HEADER #}
{{ trans('list.split_number') }}
{{ trans('list.description') }}
{# withdrawal and deposit have a destination. #} {% if preFilled.what == 'withdrawal' %}
{{ trans('list.destination') }}
{% endif %} {# Deposit has a source #} {% if preFilled.what == 'deposit' %}
{{ trans('list.source') }}
{% endif %}
{{ trans('list.amount') }}
{# only withdrawal has budget #} {% if preFilled.what == 'withdrawal' %}
{{ trans('list.budget') }}
{% endif %}
{{ trans('list.category') }}
{# ROWS #} {% for index, transaction in preFilled.transactions %}
{# button #} {# description #}
{# destination for withdrawals: #} {% if preFilled.what == 'withdrawal' %}
{% endif %} {# source for deposits #} {% if preFilled.what == 'deposit' %}
{% endif %} {# amount#}
{{ transaction.currency_symbol }}  {% if transaction.foreign_amount != null %} {{ transaction.foreign_currency_symbol }}  {% endif %}
{# budget #} {% if preFilled.what == 'withdrawal' %}
{% endif %} {# category #}
{% endfor %}


{{ 'add_another_split'|_ }}

{# panel for options #}

{{ 'options'|_ }}

{{ ExpandedForm.optionsList('update','split-transaction') }}
{% endblock %} {% block styles %} {% endblock %} {% block scripts %} {% endblock %}