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

{{ ('convert_options_'~sourceType.type~destinationType.type)|_ }}

{{ ExpandedForm.staticText('type', sourceType.type|_) }} {{ ExpandedForm.staticText('description', ''~journal.description~'') }} {{ ExpandedForm.staticText('date', journal.date.formatLocalized(monthAndDayFormat)) }} {# in case of withdrawal #} {% if sourceType.type == "Withdrawal" %} {{ ExpandedForm.staticText('source_account_asset', ''~sourceAccount.name~'') }} {{ ExpandedForm.staticText('destination_account_expense', ''~destinationAccount.name~'') }} {% endif %} {# in case of deposit #} {% if sourceType.type == "Deposit" %} {{ ExpandedForm.staticText('source_account_revenue', ''~sourceAccount.name~'') }} {{ ExpandedForm.staticText('destination_account_asset', ''~destinationAccount.name~'') }} {% endif %} {# in case of transfer #} {% if sourceType.type == "Transfer" %} {{ ExpandedForm.staticText('source_account_asset', ''~sourceAccount.name~'') }} {{ ExpandedForm.staticText('destination_account_asset', ''~destinationAccount.name~'') }} {% endif %} {# ONE #} {% if sourceType.type == 'Withdrawal' and destinationType.type == 'Deposit' %}

{{ trans('firefly.convert_explanation_withdrawal_deposit', { amount: positiveAmount|formatAmount, sourceRoute: route('accounts.show', [sourceAccount.id]), sourceName: sourceAccount.name, destinationRoute: route('accounts.show', [destinationAccount.id]), destinationName: destinationAccount.name, })|raw }}

{{ 'convert_please_set_revenue_source'|_ }}

{{ ExpandedForm.text('source_account_revenue', destinationAccount.name) }} {% endif %} {# TWO #} {% if sourceType.type == 'Withdrawal' and destinationType.type == 'Transfer' %}

{{ trans('firefly.convert_explanation_withdrawal_transfer', { amount: positiveAmount|formatAmount, sourceRoute: route('accounts.show', [sourceAccount.id]), sourceName: sourceAccount.name, destinationRoute: route('accounts.show', [destinationAccount.id]), destinationName: destinationAccount.name, })|raw }}

{{ 'convert_please_set_asset_destination'|_ }}

{{ ExpandedForm.select('destination_account_asset', assetAccounts) }} {% endif %} {# THREE #} {% if sourceType.type == 'Deposit' and destinationType.type == 'Withdrawal' %}

{{ trans('firefly.convert_explanation_deposit_withdrawal', { amount: positiveAmount|formatAmount, sourceRoute: route('accounts.show', [sourceAccount.id]), sourceName: sourceAccount.name, destinationRoute: route('accounts.show', [destinationAccount.id]), destinationName: destinationAccount.name, })|raw }}

{{ 'convert_please_set_expense_destination'|_ }}

{{ ExpandedForm.text('destination_account_expense', destinationAccount.name) }} {% endif %} {# FOUR #} {% if sourceType.type == 'Deposit' and destinationType.type == 'Transfer' %}

{{ trans('firefly.convert_explanation_deposit_transfer', { amount: positiveAmount|formatAmount, sourceRoute: route('accounts.show', [sourceAccount.id]), sourceName: sourceAccount.name, destinationRoute: route('accounts.show', [destinationAccount.id]), destinationName: destinationAccount.name, })|raw }}

{{ 'convert_please_set_asset_source'|_ }}

{{ ExpandedForm.select('source_account_asset', assetAccounts) }} {% endif %} {# FIVE #} {% if sourceType.type == 'Transfer' and destinationType.type == 'Withdrawal' %}

{{ trans('firefly.convert_explanation_transfer_withdrawal', { amount: positiveAmount|formatAmount, sourceRoute: route('accounts.show', [sourceAccount.id]), sourceName: sourceAccount.name, destinationRoute: route('accounts.show', [destinationAccount.id]), destinationName: destinationAccount.name, })|raw }}

{{ 'convert_please_set_expense_destination'|_ }}

{{ ExpandedForm.text('destination_account_expense', destinationAccount.name) }} {% endif %} {# SIX #} {% if sourceType.type == 'Transfer' and destinationType.type == 'Deposit' %}

{{ trans('firefly.convert_explanation_transfer_deposit', { amount: positiveAmount|formatAmount, sourceRoute: route('accounts.show', [sourceAccount.id]), sourceName: sourceAccount.name, destinationRoute: route('accounts.show', [destinationAccount.id]), destinationName: destinationAccount.name, })|raw }}

{{ 'convert_please_set_revenue_source'|_ }}

{{ ExpandedForm.text('source_account_revenue', sourceAccount.name) }} {% endif %}
{% endblock %} {% block scripts %} {% endblock %} {% block styles %} {% endblock %}