Allow editing of liabilities.

This commit is contained in:
James Cole
2018-08-05 18:59:15 +02:00
parent 0a89f4000d
commit 33294dd9f0
17 changed files with 228 additions and 107 deletions

View File

@@ -17,9 +17,17 @@
</div>
<div class="box-body">
{{ ExpandedForm.text('name') }}
{% if account.accountType.type == 'Default account' or account.accountType.type == 'Asset account' %}
{% if account.accountType.type == 'Default account' or account.accountType.type == 'Asset account' or what == 'liabilities' %}
{{ ExpandedForm.currencyList('currency_id', null, {helpText:'account_default_currency'|_}) }}
{% endif %}
{% if what == 'liabilities' %}
{{ ExpandedForm.select('liability_type_id', liabilityTypes) }}
{{ ExpandedForm.amountNoCurrency('openingBalance', null, {label:'debt_start_amount'|_, helpText: 'debt_start_amount_help'|_}) }}
{{ ExpandedForm.date('openingBalanceDate', null, {label:'debt_start_date'|_}) }}
{{ ExpandedForm.percentage('interest') }}
{{ ExpandedForm.select('interest_period', interestPeriods) }}
{% endif %}
</div>
</div>
@@ -47,7 +55,7 @@
{{ ExpandedForm.amountNoCurrency('virtualBalance',null) }}
{% endif %}
{{ ExpandedForm.textarea('notes',null,{helpText: trans('firefly.field_supports_markdown')}) }}
{{ ExpandedForm.textarea('notes',preFilled.notes,{helpText: trans('firefly.field_supports_markdown')}) }}
{# only correct way to do active checkbox #}
{{ ExpandedForm.checkbox('active', 1) }}