{% extends "./layout/default" %} {% block breadcrumbs %} {{ Breadcrumbs.renderIfExists(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.select('journal_source_account_id', assetAccounts, preFilled.journal_source_account_id) }} {% endif %} {# show destination account id, if deposit (is asset): #} {% if preFilled.what == 'deposit' %} {{ ExpandedForm.select('journal_destination_account_id', assetAccounts, preFilled.journal_destination_account_id) }} {% endif %} {# show static destination if transfer #} {% if preFilled.what == 'transfer' %} {{ ExpandedForm.select('journal_destination_account_id', assetAccounts, preFilled.journal_destination_account_id) }} {% endif %} {# TOTAL AMOUNT IS STATIC TEXT #} {% if preFilled.what == 'withdrawal' or preFilled.what == 'transfer' %} {{ ExpandedForm.staticText('journal_amount', formatAmountByAccount(accountArray[preFilled.journal_source_account_id], preFilled.journal_amount, true) ) }} {% endif %} {% if preFilled.what == 'deposit' %} {{ ExpandedForm.staticText('journal_amount', formatAmountByAccount(accountArray[preFilled.journal_destination_account_id], preFilled.journal_amount, true) ) }} {% endif %} {# DATE #} {{ ExpandedForm.date('date', journal.date) }}

{{ 'optional_field_meta_data'|_ }}

{# NO BUDGET #} {# NO CATEGORY #} {# ALWAYS TAGS #} {{ ExpandedForm.text('tags', preFilled.tags) }} {# NO PIGGY BANK #}
{# 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', journal.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'|_ }}

 
{{ 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') }}
{% for index, transaction in preFilled.transactions %}
{# button #} {# index #}
#{{ loop.index }}
{# description #}
{# destination for withdrawals: #} {% if preFilled.what == 'withdrawal' %}
{% endif %} {# source for deposits #} {% if preFilled.what == 'deposit' %}
{% endif %} {# amount#} {% if transaction.foreign_amount != null %}
{% else %}
{% endif %}
{{ transaction.transaction_currency_symbol }}
{# foreign amount #} {% if transaction.foreign_amount != null %}
{{ transaction.foreign_currency_symbol }}
{% endif %} {# budget #} {% if preFilled.what == 'withdrawal' %}
{% endif %} {# category #}
{% endfor %}


{{ 'add_another_split'|_ }}

{{ 'options'|_ }}

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