Ask for CC number when asset is a CC. #784

This commit is contained in:
James Cole 2017-08-30 07:14:35 +02:00
parent 0a8e6e9f07
commit 4aaacf8e2e
No known key found for this signature in database
GPG Key ID: C16961E655E74B5E
3 changed files with 7 additions and 2 deletions

View File

@ -194,7 +194,7 @@ class AccountController extends Controller
return view( return view(
'accounts.edit', compact( 'accounts.edit', compact(
'allCurrencies', 'currencySelectList', 'account', 'currency', 'subTitle', 'subTitleIcon', 'what', 'roles' 'allCurrencies', 'currencySelectList', 'account', 'currency', 'subTitle', 'subTitleIcon', 'what', 'roles', 'preFilled'
) )
); );
} }

View File

@ -100,6 +100,7 @@ return [
'code' => 'Code', 'code' => 'Code',
'iban' => 'IBAN', 'iban' => 'IBAN',
'accountNumber' => 'Account number', 'accountNumber' => 'Account number',
'creditCardNumber' => 'Credit card number',
'has_headers' => 'Headers', 'has_headers' => 'Headers',
'date_format' => 'Date format', 'date_format' => 'Date format',
'specifix' => 'Bank- or file specific fixes', 'specifix' => 'Bank- or file specific fixes',

View File

@ -33,7 +33,11 @@
<div class="box-body"> <div class="box-body">
{{ ExpandedForm.text('iban') }} {{ ExpandedForm.text('iban') }}
{{ ExpandedForm.text('BIC', null, {maxlength: 11}) }} {{ ExpandedForm.text('BIC', null, {maxlength: 11}) }}
{{ ExpandedForm.text('accountNumber') }} {% if preFilled.accountRole == 'ccAsset' %}
{{ ExpandedForm.text('accountNumber', null , {label:trans('form.creditCardNumber')}) }}
{% else %}
{{ ExpandedForm.text('accountNumber') }}
{% endif %}
{% if account.accounttype.type == 'Default account' or account.accounttype.type == 'Asset account' %} {% if account.accounttype.type == 'Default account' or account.accounttype.type == 'Asset account' %}