{% extends "./layout/default" %} {% block breadcrumbs %} {{ Breadcrumbs.render(Route.getCurrentRoute().getName(), account) }} {% endblock %} {% block content %} {{ Form.model(account, {'class' : 'form-horizontal','id' : 'update','url' : route('accounts.update',account.id) } ) }}

{{ 'mandatoryFields'|_ }}

{{ ExpandedForm.text('name') }} {% if account.accountType.type == 'Default account' or account.accountType.type == 'Asset account' or objectType == 'liabilities' %} {{ CurrencyForm.currencyList('currency_id', null, {helpText:'account_default_currency'|_}) }} {% endif %} {% if objectType == 'liabilities' %} {{ ExpandedForm.select('liability_type_id', liabilityTypes) }} {{ ExpandedForm.amountNoCurrency('opening_balance', null, {label:'debt_start_amount'|_, helpText: 'debt_start_amount_help'|_}) }} {{ ExpandedForm.date('opening_balance_date', null, {label:'debt_start_date'|_}) }} {{ ExpandedForm.percentage('interest') }} {{ ExpandedForm.select('interest_period', interestPeriods) }} {% endif %}

{{ 'optionalFields'|_ }}

{{ ExpandedForm.text('iban') }} {{ ExpandedForm.text('BIC', null, {maxlength: 11}) }} {% if preFilled.account_role == 'ccAsset' %} {{ ExpandedForm.text('account_number', null , {label:trans('form.creditCardNumber')}) }} {% else %} {{ ExpandedForm.text('account_number') }} {% endif %} {% if account.accounttype.type == 'Default account' or account.accounttype.type == 'Asset account' %} {# get opening balance entry for this thing! #} {{ ExpandedForm.amountNoCurrency('opening_balance',null) }} {{ ExpandedForm.date('opening_balance_date') }} {{ ExpandedForm.select('account_role', roles) }} {{ ExpandedForm.amountNoCurrency('virtual_balance',null) }} {% endif %} {{ ExpandedForm.checkbox('include_net_worth', 1) }} {{ ExpandedForm.textarea('notes',preFilled.notes,{helpText: trans('firefly.field_supports_markdown')}) }} {# only correct way to do active checkbox #} {{ ExpandedForm.checkbox('active', 1) }} {# only correct way to do active checkbox #} {{ ExpandedForm.location('location', null, {locations: locations}) }}
{# panel for credit card options #} {% if preFilled.account_role == 'ccAsset' %}

{{ 'credit_card_options'|_ }}

{{ ExpandedForm.select('cc_type',Config.get('firefly.ccTypes')) }} {{ ExpandedForm.date('cc_monthly_payment_date',null,{'helpText' : 'Select any year and any month, it will be ignored anway. Only the day of the month is relevant.'}) }}
{% endif %} {# panel for options #}

{{ 'options'|_ }}

{{ ExpandedForm.optionsList('update','account') }}
{{ Form.close|raw }} {% endblock %} {% block scripts %} {% endblock %} {% block styles %} {% endblock %}