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

{{ 'mandatoryFields'|_ }}

{# DESCRIPTION IS ALWAYS AVAILABLE #} {{ ExpandedForm.text('description') }} {# SELECTABLE SOURCE ACCOUNT ONLY FOR WITHDRAWALS AND TRANSFERS #} {{ ExpandedForm.activeLongAccountList('source_id', null, {label: trans('form.asset_source_account') }) }} {# FREE FORMAT SOURCE ACCOUNT ONLY FOR DEPOSITS #} {{ ExpandedForm.text('source_name', null, {label: trans('form.revenue_account')}) }} {# FREE FORMAT DESTINATION ACCOUNT ONLY FOR EXPENSES #} {{ ExpandedForm.text('destination_name', null, {label: trans('form.expense_account')}) }} {# SELECTABLE DESTINATION ACCOUNT ONLY FOR TRANSFERS AND DEPOSITS #} {{ ExpandedForm.activeLongAccountList('destination_id', null, {label: trans('form.asset_destination_account')} ) }} {# ALWAYS SHOW AMOUNT #} {{ ExpandedForm.amount('amount') }} {# INSTRUCTIONS FOR EXCHANGE RATES #} {{ ExpandedForm.staticText('exchange_rate_instruction','(here be text)') }} {{ ExpandedForm.nonSelectableAmount('native_amount') }} {{ ExpandedForm.nonSelectableAmount('source_amount') }} {{ ExpandedForm.nonSelectableAmount('destination_amount') }} {# ALWAYS SHOW DATE #} {{ ExpandedForm.date('date', preFilled.date|default(phpdate('Y-m-d'))) }}

{{ 'optional_field_meta_data'|_ }}

{# BUDGET ONLY WHEN CREATING A WITHDRAWAL #} {% if budgets|length > 1 %} {{ ExpandedForm.select('budget_id', budgets, null) }} {% else %} {{ ExpandedForm.select('budget_id', budgets, null, {helpText: trans('firefly.no_budget_pointer', {link: route('budgets.index')})}) }} {% endif %} {# CATEGORY ALWAYS #} {{ ExpandedForm.text('category') }} {# TAGS #} {{ ExpandedForm.text('tags') }} {# RELATE THIS TRANSFER TO A PIGGY BANK #} {{ ExpandedForm.piggyBankList('piggy_bank_id', 0) }}
{# explain 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 %} {{ ExpandedForm.date('interest_date') }} {% endif %} {# BOOK DATE #} {% if optionalFields.book_date %} {{ ExpandedForm.date('book_date') }} {% endif %} {# PROCESSING DATE #} {% if optionalFields.process_date %} {{ ExpandedForm.date('process_date') }} {% endif %} {# DUE DATE #} {% if optionalFields.due_date %} {{ ExpandedForm.date('due_date') }} {% endif %} {# PAYMENT DATE #} {% if optionalFields.payment_date %} {{ ExpandedForm.date('payment_date') }} {% endif %} {# INVOICE DATE #} {% if optionalFields.invoice_date %} {{ ExpandedForm.date('invoice_date') }} {% endif %}
{% endif %} {# box for business fields #} {% if optionalFields.internal_reference or optionalFields.notes %}

{{ 'optional_field_meta_business'|_ }}

{# REFERENCE #} {% if optionalFields.internal_reference %} {{ ExpandedForm.text('internal_reference') }} {% endif %} {# NOTES #} {% if optionalFields.notes %} {{ ExpandedForm.textarea('notes',null,{helpText: trans('firefly.field_supports_markdown')}) }} {% 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 %} {# panel for options #}

{{ 'options'|_ }}

{{ ExpandedForm.optionsList('create','transaction') }}
{% endblock %} {% block scripts %} {% endblock %} {% block styles %} {% endblock %}