2016-11-06 08:11:43 +01:00
|
|
|
{% extends "./layout/default" %}
|
2015-06-19 20:59:14 +02:00
|
|
|
{% block breadcrumbs %}
|
2019-06-22 05:51:32 +02:00
|
|
|
{{ Breadcrumbs.render(Route.getCurrentRoute.getName, objectType) }}
|
2015-06-19 20:59:14 +02:00
|
|
|
{% endblock %}
|
|
|
|
{% 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>
|
2015-06-19 20:59:14 +02:00
|
|
|
|
2015-05-01 22:44:35 +02:00
|
|
|
<form action="{{ route('accounts.store') }}" method="post" id="store" class="form-horizontal">
|
2015-06-22 17:55:37 +02:00
|
|
|
<input type="hidden" name="_token" value="{{ csrf_token() }}"/>
|
2019-06-22 05:51:32 +02:00
|
|
|
<input type="hidden" name="objectType" value="{{ objectType }}"/>
|
2016-10-22 21:40:31 +02:00
|
|
|
<input type="hidden" name="active" value="1"/>
|
2015-05-01 22:44:35 +02:00
|
|
|
|
2015-05-01 23:17:17 +02:00
|
|
|
<div class="row">
|
|
|
|
<div class="col-lg-6 col-md-6 col-sm-12">
|
2015-06-20 07:29:25 +02:00
|
|
|
<div class="box box-primary">
|
|
|
|
<div class="box-header with-border">
|
2015-06-20 09:54:01 +02:00
|
|
|
<h3 class="box-title">{{ 'mandatoryFields'|_ }}</h3>
|
2015-05-01 23:17:17 +02:00
|
|
|
</div>
|
2015-06-20 07:29:25 +02:00
|
|
|
<div class="box-body">
|
2015-05-01 23:17:17 +02:00
|
|
|
{{ ExpandedForm.text('name') }}
|
2019-06-22 05:51:32 +02:00
|
|
|
{% if objectType == 'asset' or objectType == 'liabilities' %}
|
2019-08-10 16:50:37 +02:00
|
|
|
{{ CurrencyForm.currencyList('currency_id', null, {helpText:'account_default_currency'|_}) }}
|
2016-11-25 18:00:29 +01:00
|
|
|
{% endif %}
|
2019-06-22 05:51:32 +02:00
|
|
|
{% if objectType == 'liabilities' %}
|
2018-08-04 17:30:47 +02:00
|
|
|
{{ ExpandedForm.select('liability_type_id', liabilityTypes) }}
|
2019-06-16 13:16:26 +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-04 17:30:47 +02:00
|
|
|
{{ ExpandedForm.percentage('interest') }}
|
|
|
|
{{ ExpandedForm.select('interest_period', interestPeriods) }}
|
|
|
|
{% endif %}
|
2015-05-01 23:17:17 +02:00
|
|
|
</div>
|
|
|
|
</div>
|
2015-05-01 22:44:35 +02:00
|
|
|
</div>
|
|
|
|
|
2015-05-01 23:17:17 +02:00
|
|
|
<div class="col-lg-6 col-md-6 col-sm-12">
|
2016-02-11 06:30:09 +01:00
|
|
|
|
2016-02-10 22:09:24 +01:00
|
|
|
<div class="box">
|
|
|
|
<div class="box-header with-border">
|
|
|
|
<h3 class="box-title">{{ 'optionalFields'|_ }}</h3>
|
|
|
|
</div>
|
|
|
|
<div class="box-body">
|
2015-05-01 23:17:17 +02:00
|
|
|
|
2016-02-10 22:09:24 +01:00
|
|
|
{{ ExpandedForm.text('iban') }}
|
2016-11-28 18:55:56 +01:00
|
|
|
{{ ExpandedForm.text('BIC', null, {maxlength: 11}) }}
|
2019-06-21 19:10:24 +02:00
|
|
|
{{ ExpandedForm.text('account_number') }}
|
2016-02-11 06:30:09 +01:00
|
|
|
|
2019-06-22 05:51:32 +02:00
|
|
|
{% if objectType == 'asset' %}
|
2016-02-11 06:30:09 +01:00
|
|
|
|
2019-06-16 13:16:26 +02:00
|
|
|
{{ ExpandedForm.amountNoCurrency('opening_balance') }}
|
|
|
|
{{ ExpandedForm.date('opening_balance_date') }}
|
2019-06-21 19:10:24 +02:00
|
|
|
{{ ExpandedForm.select('account_role', roles,null,{helpText : 'asset_account_role_help'|_}) }}
|
|
|
|
{{ ExpandedForm.amountNoCurrency('virtual_balance') }}
|
2016-02-10 22:09:24 +01:00
|
|
|
{% endif %}
|
2018-08-26 18:40:38 +02:00
|
|
|
{# only correct way to do active checkbox #}
|
|
|
|
{{ ExpandedForm.checkbox('include_net_worth', 1) }}
|
2017-12-30 21:04:04 +01:00
|
|
|
{{ ExpandedForm.textarea('notes',null,{helpText: trans('firefly.field_supports_markdown')}) }}
|
2019-12-30 17:43:04 +01:00
|
|
|
{{ ExpandedForm.location('location', null, {locations: locations}) }}
|
2015-05-01 23:17:17 +02:00
|
|
|
</div>
|
2016-02-10 22:09:24 +01:00
|
|
|
</div>
|
2016-02-11 06:30:09 +01:00
|
|
|
|
2015-06-22 17:55:37 +02:00
|
|
|
|
2015-06-20 07:29:25 +02:00
|
|
|
<div class="box">
|
|
|
|
<div class="box-header with-border">
|
2015-06-20 09:54:01 +02:00
|
|
|
<h3 class="box-title">{{ 'options'|_ }}</h3>
|
2015-05-01 23:17:17 +02:00
|
|
|
</div>
|
2015-06-20 07:29:25 +02:00
|
|
|
<div class="box-body">
|
2015-05-01 23:17:17 +02:00
|
|
|
{{ ExpandedForm.optionsList('create','account') }}
|
|
|
|
</div>
|
2015-06-22 17:55:37 +02:00
|
|
|
<div class="box-footer">
|
|
|
|
<button type="submit" class="btn pull-right btn-success">
|
2019-06-22 05:51:32 +02:00
|
|
|
{{ ('store_new_' ~ objectType ~ '_account')|_ }}
|
2015-06-22 17:55:37 +02:00
|
|
|
</button>
|
|
|
|
</div>
|
2015-05-01 23:17:17 +02:00
|
|
|
</div>
|
2015-05-01 22:44:35 +02:00
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
2015-06-22 17:55:37 +02:00
|
|
|
</form>
|
2015-05-05 12:51:57 +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/create.js?v={{ FF_VERSION }}" nonce="{{ JS_NONCE }}"></script>
|
2017-01-20 08:18:52 +01:00
|
|
|
{% endblock %}
|
|
|
|
|
|
|
|
{% block styles %}
|
2018-11-02 19:59:29 +01:00
|
|
|
<link href="v1/css/jquery-ui/jquery-ui.structure.min.css?v={{ FF_VERSION }}" type="text/css" rel="stylesheet" media="all">
|
|
|
|
<link href="v1/css/jquery-ui/jquery-ui.theme.min.css?v={{ FF_VERSION }}" type="text/css" rel="stylesheet" media="all">
|
2019-12-28 19:49:33 +01:00
|
|
|
<link rel="stylesheet" href="v1/lib/leaflet/leaflet.css?v={{ FF_VERSION }}"/>
|
2017-02-05 19:51:58 +01:00
|
|
|
{% endblock %}
|