2021-01-31 20:26:24 +01:00
|
|
|
{% extends './v1/layout/default' %}
|
2015-06-19 20:59:14 +02:00
|
|
|
|
|
|
|
|
{% block breadcrumbs %}
|
2017-12-23 20:46:52 +01:00
|
|
|
{{ Breadcrumbs.render(Route.getCurrentRoute().getName(), account) }}
|
2015-06-19 20:59:14 +02:00
|
|
|
{% endblock %}
|
|
|
|
|
|
2015-05-01 22:44:35 +02:00
|
|
|
{% block content %}
|
2019-12-30 12:12:08 +01:00
|
|
|
<!-- set location data high up -->
|
2020-01-04 11:00:44 +01:00
|
|
|
<script type="text/javascript" nonce="{{ JS_NONCE }}">
|
2019-12-30 12:12:08 +01:00
|
|
|
var locations = {{ locations|json_encode|raw }};
|
|
|
|
|
var mapboxToken = "{{ config('firefly.mapbox_api_key') }}";
|
|
|
|
|
</script>
|
|
|
|
|
|
2020-03-19 08:56:00 +01:00
|
|
|
{{ Form.model(account, {
|
|
|
|
|
'class': 'form-horizontal',
|
|
|
|
|
'id': 'update',
|
|
|
|
|
'url': route('accounts.update',account.id),
|
|
|
|
|
'enctype': 'multipart/form-data'
|
|
|
|
|
} ) }}
|
2015-06-22 17:55:37 +02:00
|
|
|
<input type="hidden" name="id" value="{{ account.id }}"/>
|
2019-06-22 10:25:34 +02:00
|
|
|
<input type="hidden" name="objectType" value="{{ objectType }}"/>
|
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">
|
|
|
|
|
{{ ExpandedForm.text('name') }}
|
2019-06-22 10:25:34 +02:00
|
|
|
{% if account.accountType.type == 'Default account' or account.accountType.type == 'Asset account' or objectType == 'liabilities' %}
|
2019-08-10 16:50:37 +02:00
|
|
|
{{ CurrencyForm.currencyList('currency_id', null, {helpText:'account_default_currency'|_}) }}
|
2019-11-09 16:50:13 +01:00
|
|
|
|
2016-11-25 18:00:29 +01:00
|
|
|
{% endif %}
|
2018-08-05 18:59:15 +02:00
|
|
|
|
2019-06-22 10:25:34 +02:00
|
|
|
{% if objectType == 'liabilities' %}
|
2018-08-05 18:59:15 +02:00
|
|
|
{{ ExpandedForm.select('liability_type_id', liabilityTypes) }}
|
2019-06-22 05:51:32 +02:00
|
|
|
{{ ExpandedForm.amountNoCurrency('opening_balance', null, {label:'debt_start_amount'|_, helpText: 'debt_start_amount_help'|_}) }}
|
|
|
|
|
{{ ExpandedForm.date('opening_balance_date', null, {label:'debt_start_date'|_}) }}
|
2018-08-05 18:59:15 +02:00
|
|
|
{{ ExpandedForm.percentage('interest') }}
|
|
|
|
|
{{ ExpandedForm.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
|
|
|
{{ ExpandedForm.text('iban') }}
|
2016-11-28 18:55:56 +01:00
|
|
|
{{ ExpandedForm.text('BIC', null, {maxlength: 11}) }}
|
2019-06-22 05:51:32 +02:00
|
|
|
{% if preFilled.account_role == 'ccAsset' %}
|
|
|
|
|
{{ ExpandedForm.text('account_number', null , {label:trans('form.creditCardNumber')}) }}
|
2017-08-30 07:14:35 +02:00
|
|
|
{% else %}
|
2019-06-22 05:51:32 +02:00
|
|
|
{{ ExpandedForm.text('account_number') }}
|
2017-08-30 07:14:35 +02:00
|
|
|
{% 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! #}
|
2019-06-22 05:51:32 +02:00
|
|
|
{{ ExpandedForm.amountNoCurrency('opening_balance',null) }}
|
|
|
|
|
{{ ExpandedForm.date('opening_balance_date') }}
|
|
|
|
|
{{ ExpandedForm.select('account_role', roles) }}
|
|
|
|
|
{{ ExpandedForm.amountNoCurrency('virtual_balance',null) }}
|
2015-05-01 22:44:35 +02:00
|
|
|
|
2015-06-22 17:55:37 +02:00
|
|
|
{% endif %}
|
2019-12-30 12:12:08 +01:00
|
|
|
{{ ExpandedForm.checkbox('include_net_worth', 1) }}
|
2018-08-05 18:59:15 +02:00
|
|
|
{{ ExpandedForm.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 #}
|
|
|
|
|
{{ ExpandedForm.checkbox('active', 1) }}
|
2018-08-26 18:40:38 +02:00
|
|
|
{# only correct way to do active checkbox #}
|
2019-12-30 12:12:08 +01:00
|
|
|
|
|
|
|
|
{{ ExpandedForm.location('location', null, {locations: locations}) }}
|
2020-03-19 08:56:00 +01:00
|
|
|
{{ ExpandedForm.file('attachments[]', {'multiple': 'multiple','helpText': trans('firefly.upload_max_file_size', {'size': uploadSize|filesize}) }) }}
|
|
|
|
|
|
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 #}
|
2019-06-22 05:51:32 +02:00
|
|
|
{% if preFilled.account_role == '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">
|
2019-06-22 05:51:32 +02:00
|
|
|
{{ ExpandedForm.select('cc_type',Config.get('firefly.ccTypes')) }}
|
2020-11-01 06:58:19 +01:00
|
|
|
{{ ExpandedForm.date('cc_monthly_payment_date',null,{'helpText' : trans('firefly.cc_monthly_payment_date_help')}) }}
|
2015-06-22 17:55:37 +02:00
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
{% endif %}
|
2020-03-13 20:56:26 +01:00
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="row">
|
|
|
|
|
<div class="col-lg-6 col-md-6 col-sm-12">
|
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">
|
|
|
|
|
{{ ExpandedForm.optionsList('update','account') }}
|
|
|
|
|
</div>
|
|
|
|
|
<div class="box-footer">
|
|
|
|
|
<button type="submit" class="btn pull-right btn-success">
|
2019-06-22 10:25:34 +02:00
|
|
|
{{ ('update_' ~ objectType ~ '_account')|_ }}
|
2015-06-22 17:55:37 +02:00
|
|
|
</button>
|
|
|
|
|
</div>
|
2015-05-01 22:44:35 +02:00
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
2020-03-13 20:56:26 +01:00
|
|
|
</form>
|
2015-05-01 22:44:35 +02:00
|
|
|
{% endblock %}
|
2017-01-20 08:18:52 +01:00
|
|
|
{% block scripts %}
|
2020-01-04 11:16:14 +01:00
|
|
|
<script src="v1/lib/leaflet/leaflet.js?v={{ FF_VERSION }}" nonce="{{ JS_NONCE }}"></script>
|
|
|
|
|
<script type="text/javascript" src="v1/js/lib/modernizr-custom.js?v={{ FF_VERSION }}" nonce="{{ JS_NONCE }}"></script>
|
|
|
|
|
<script type="text/javascript" src="v1/js/lib/jquery-ui.min.js?v={{ FF_VERSION }}" nonce="{{ JS_NONCE }}"></script>
|
|
|
|
|
<script type="text/javascript" src="v1/js/ff/accounts/edit.js?v={{ FF_VERSION }}" nonce="{{ JS_NONCE }}"></script>
|
2017-01-20 08:18:52 +01:00
|
|
|
{% endblock %}
|
|
|
|
|
|
|
|
|
|
{% block styles %}
|
2021-04-08 12:30:21 +02:00
|
|
|
<link href="v1/css/jquery-ui/jquery-ui.structure.min.css?v={{ FF_VERSION }}" type="text/css" rel="stylesheet" media="all" nonce="{{ JS_NONCE }}">
|
|
|
|
|
<link href="v1/css/jquery-ui/jquery-ui.theme.min.css?v={{ FF_VERSION }}" type="text/css" rel="stylesheet" media="all" nonce="{{ JS_NONCE }}">
|
|
|
|
|
<link rel="stylesheet" href="v1/lib/leaflet/leaflet.css?v={{ FF_VERSION }}" nonce="{{ JS_NONCE }}">
|
2017-02-05 19:51:58 +01:00
|
|
|
{% endblock %}
|