Debug the account-create controller.

This commit is contained in:
James Cole
2019-06-22 05:51:32 +02:00
parent 74a3d155b0
commit abf70a235a
10 changed files with 96 additions and 74 deletions

View File

@@ -1,12 +1,12 @@
{% extends "./layout/default" %}
{% block breadcrumbs %}
{{ Breadcrumbs.render(Route.getCurrentRoute.getName, what) }}
{{ Breadcrumbs.render(Route.getCurrentRoute.getName, objectType) }}
{% endblock %}
{% block content %}
<form action="{{ route('accounts.store') }}" method="post" id="store" class="form-horizontal">
<input type="hidden" name="_token" value="{{ csrf_token() }}"/>
<input type="hidden" name="what" value="{{ what }}"/>
<input type="hidden" name="objectType" value="{{ objectType }}"/>
<input type="hidden" name="active" value="1"/>
<div class="row">
@@ -17,10 +17,10 @@
</div>
<div class="box-body">
{{ ExpandedForm.text('name') }}
{% if what == 'asset' or what == 'liabilities' %}
{% if objectType == 'asset' or objectType == 'liabilities' %}
{{ ExpandedForm.currencyList('currency_id', null, {helpText:'account_default_currency'|_}) }}
{% endif %}
{% if what == 'liabilities' %}
{% 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'|_}) }}
@@ -43,7 +43,7 @@
{{ ExpandedForm.text('BIC', null, {maxlength: 11}) }}
{{ ExpandedForm.text('account_number') }}
{% if what == 'asset' %}
{% if objectType == 'asset' %}
{{ ExpandedForm.amountNoCurrency('opening_balance') }}
{{ ExpandedForm.date('opening_balance_date') }}
@@ -67,7 +67,7 @@
</div>
<div class="box-footer">
<button type="submit" class="btn pull-right btn-success">
{{ ('store_new_' ~ what ~ '_account')|_ }}
{{ ('store_new_' ~ objectType ~ '_account')|_ }}
</button>
</div>
</div>