2016-11-06 08:11:43 +01:00
{% extends "./layout/default" %}
2015-06-19 20:59:14 +02:00
{% block breadcrumbs %}
2017-12-23 20:46:52 +01:00
{{ B readcrumbs .render ( R oute .getCurrentRoute ( ) .getName ( ) , account ) }}
2015-06-19 20:59:14 +02:00
{% endblock %}
2015-05-01 22:44:35 +02:00
{% block content %}
2015-06-22 17:55:37 +02:00
{{ F orm .model ( account , { 'class' : 'form-horizontal' , 'id' : 'update' , 'url' : route ( 'accounts.update' , account .id ) } ) }}
2015-05-01 22:44:35 +02:00
2015-06-22 17:55:37 +02:00
<input type="hidden" name="id" value=" {{ account .id }} "/>
2018-08-07 19:29:19 +02:00
<input type="hidden" name="what" value=" {{ what }} "/>
2015-05-01 22:44:35 +02:00
2015-06-22 17:55:37 +02:00
<div class="row">
2017-06-30 07:17:25 +02:00
<div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
2015-06-22 17:55:37 +02:00
<div class="box box-primary">
<div class="box-header with-border">
<h3 class="box-title"> {{ 'mandatoryFields' | _ }} </h3>
</div>
<div class="box-body">
{{ E xpandedForm .text ( 'name' ) }}
2018-08-05 18:59:15 +02:00
{% if account .accountType .type == 'Default account' or account .accountType .type == 'Asset account' or what == 'liabilities' %}
2018-04-28 05:40:08 +02:00
{{ E xpandedForm .currencyList ( 'currency_id' , null , { helpText :'account_default_currency' | _ } ) }}
2016-11-25 18:00:29 +01:00
{% endif %}
2018-08-05 18:59:15 +02:00
{% if what == 'liabilities' %}
{{ E xpandedForm .select ( 'liability_type_id' , liabilityTypes ) }}
{{ E xpandedForm .amountNoCurrency ( 'openingBalance' , null , { label :'debt_start_amount' | _ , helpText : 'debt_start_amount_help' | _ } ) }}
{{ E xpandedForm .date ( 'openingBalanceDate' , null , { label :'debt_start_date' | _ } ) }}
{{ E xpandedForm .percentage ( 'interest' ) }}
{{ E xpandedForm .select ( 'interest_period' , interestPeriods ) }}
{% endif %}
2015-06-22 17:55:37 +02:00
</div>
2015-05-01 22:44:35 +02:00
</div>
2015-05-01 23:35:35 +02:00
2015-05-01 22:44:35 +02:00
</div>
2017-06-30 07:17:25 +02:00
<div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
2015-06-22 17:55:37 +02:00
<div class="box">
<div class="box-header with-border">
<h3 class="box-title"> {{ 'optionalFields' | _ }} </h3>
</div>
<div class="box-body">
2015-07-03 12:51:14 +02:00
{{ E xpandedForm .text ( 'iban' ) }}
2016-11-28 18:55:56 +01:00
{{ E xpandedForm .text ( 'BIC' , null , { maxlength : 1 1 } ) }}
2017-08-30 07:14:35 +02:00
{% if preFilled .accountRole == 'ccAsset' %}
{{ E xpandedForm .text ( 'accountNumber' , null , { label : trans ( 'form.creditCardNumber' ) } ) }}
{% else %}
{{ E xpandedForm .text ( 'accountNumber' ) }}
{% endif %}
2016-02-11 06:30:09 +01:00
2015-06-22 17:55:37 +02:00
{% if account .accounttype .type == 'Default account' or account .accounttype .type == 'Asset account' %}
2017-04-14 07:11:30 +02:00
{# get opening balance entry for this thing! #}
2018-04-28 05:40:08 +02:00
{{ E xpandedForm .amountNoCurrency ( 'openingBalance' , null ) }}
2015-06-22 17:55:37 +02:00
{{ E xpandedForm .date ( 'openingBalanceDate' ) }}
2017-01-21 09:07:10 +01:00
{{ E xpandedForm .select ( 'accountRole' , roles ) }}
2018-04-28 05:40:08 +02:00
{{ E xpandedForm .amountNoCurrency ( 'virtualBalance' , null ) }}
2015-05-01 22:44:35 +02:00
2015-06-22 17:55:37 +02:00
{% endif %}
2018-08-26 18:40:38 +02:00
2018-08-05 18:59:15 +02:00
{{ E xpandedForm .textarea ( 'notes' , preFilled .notes , { helpText : trans ( 'firefly.field_supports_markdown' ) } ) }}
2018-06-18 21:07:09 +02:00
{# only correct way to do active checkbox #}
{{ E xpandedForm .checkbox ( 'active' , 1 ) }}
2018-08-26 18:40:38 +02:00
{# only correct way to do active checkbox #}
{{ E xpandedForm .checkbox ( 'include_net_worth' , 1 ) }}
2015-06-22 17:55:37 +02:00
</div>
2015-05-01 22:44:35 +02:00
</div>
2018-01-12 18:42:48 +01:00
{# panel for credit card options #}
2017-12-13 18:46:30 +01:00
{% if preFilled .accountRole == 'ccAsset' %}
2015-06-22 17:55:37 +02:00
<div class="box">
<div class="box-header with-border">
2016-04-20 17:10:35 +02:00
<h3 class="box-title"> {{ 'credit_card_options' | _ }} </h3>
2015-06-22 17:55:37 +02:00
</div>
<div class="box-body">
{{ E xpandedForm .select ( 'ccType' , C onfig .get ( 'firefly.ccTypes' ) ) }}
{{ E xpandedForm .date ( 'ccMonthlyPaymentDate' , null , { 'helpText' : 'Select any year and any month, it will be ignored anway. Only the day of the month is relevant.' } ) }}
</div>
</div>
{% endif %}
2018-01-12 18:42:48 +01:00
{# panel for options #}
2015-06-22 17:55:37 +02:00
<div class="box">
<div class="box-header with-border">
<h3 class="box-title"> {{ 'options' | _ }} </h3>
</div>
<div class="box-body">
{{ E xpandedForm .optionsList ( 'update' , 'account' ) }}
</div>
<div class="box-footer">
<button type="submit" class="btn pull-right btn-success">
{{ ( 'update_' ~ what ~ '_account' ) | _ }}
</button>
</div>
2015-05-01 22:44:35 +02:00
</div>
</div>
</div>
2015-06-22 17:55:37 +02:00
{{ F orm .close | raw }}
2015-05-01 22:44:35 +02:00
{% endblock %}
2017-01-20 08:18:52 +01:00
{% block scripts %}
2017-09-12 19:59:07 +02:00
<script type="text/javascript" src="js/lib/modernizr-custom.js?v= {{ F F _VERSION }} "></script>
<script type="text/javascript" src="js/lib/jquery-ui.min.js?v= {{ F F _VERSION }} "></script>
<script type="text/javascript" src="js/ff/accounts/edit.js?v= {{ F F _VERSION }} "></script>
2017-01-20 08:18:52 +01:00
{% endblock %}
{% block styles %}
2017-09-27 08:49:59 +02:00
<link href="css/jquery-ui/jquery-ui.structure.min.css?v= {{ F F _VERSION }} " type="text/css" rel="stylesheet" media="all">
<link href="css/jquery-ui/jquery-ui.theme.min.css?v= {{ F F _VERSION }} " type="text/css" rel="stylesheet" media="all">
2017-02-05 19:51:58 +01:00
{% endblock %}