55 lines
2.3 KiB
PHP
Raw Normal View History

2017-09-14 22:21:00 +03:00
@extends('layouts.admin')
@section('title', trans('general.title.edit', ['type' => trans_choice('general.accounts', 1)]))
@section('content')
2019-11-16 10:21:14 +03:00
<div class="card">
2017-09-14 22:21:00 +03:00
{!! Form::model($account, [
2019-11-16 10:21:14 +03:00
'id' => 'account',
2017-09-14 22:21:00 +03:00
'method' => 'PATCH',
2019-11-16 10:21:14 +03:00
'route' => ['accounts.update', $account->id],
'@submit.prevent' => 'onSubmit',
'@keydown' => 'form.errors.clear($event.target.name)',
'files' => true,
2018-09-17 13:57:03 +03:00
'role' => 'form',
2019-11-16 10:21:14 +03:00
'class' => 'form-loading-button',
'novalidate' => true
2017-09-14 22:21:00 +03:00
]) !!}
2019-11-16 10:21:14 +03:00
<div class="card-body">
<div class="row">
{{ Form::textGroup('name', trans('general.name'), 'font') }}
2017-09-14 22:21:00 +03:00
2019-11-16 10:21:14 +03:00
{{ Form::textGroup('number', trans('accounts.number'), 'pencil-alt') }}
2017-09-14 22:21:00 +03:00
2020-03-09 11:57:06 +03:00
{{ Form::selectAddNewGroup('currency_code', trans_choice('general.currencies', 1), 'exchange-alt', $currencies, $account->currency_code, ['required' => 'required', 'path' => route('modals.currencies.create'), 'field' => ['key' => 'code', 'value' => 'name'], 'change' => 'onChangeCurrency']) }}
2017-09-14 22:21:00 +03:00
{{ Form::moneyGroup('opening_balance', trans('accounts.opening_balance'), 'balance-scale', ['required' => 'required', 'currency' => $currency, 'dynamic-currency' => 'currency'], $account->opening_balance) }}
2017-09-14 22:21:00 +03:00
2019-11-16 10:21:14 +03:00
{{ Form::textGroup('bank_name', trans('accounts.bank_name'), 'university', []) }}
2017-09-14 22:21:00 +03:00
2019-11-16 10:21:14 +03:00
{{ Form::textGroup('bank_phone', trans('accounts.bank_phone'), 'phone', []) }}
2017-09-14 22:21:00 +03:00
2019-11-16 10:21:14 +03:00
{{ Form::textareaGroup('bank_address', trans('accounts.bank_address')) }}
2017-09-14 22:21:00 +03:00
2019-12-14 10:03:41 +03:00
{{ Form::radioGroup('default_account', trans('accounts.default_account'), $account->default_account) }}
2017-09-14 22:21:00 +03:00
2019-12-14 10:03:41 +03:00
{{ Form::radioGroup('enabled', trans('general.enabled'), $account->enabled) }}
2019-11-16 10:21:14 +03:00
</div>
</div>
2017-09-14 22:21:00 +03:00
2020-10-14 17:07:59 +03:00
@can('update-banking-accounts')
2019-11-16 10:21:14 +03:00
<div class="card-footer">
2020-02-15 13:04:37 +03:00
<div class="row save-buttons">
{{ Form::saveButtons('accounts.index') }}
2019-11-16 10:21:14 +03:00
</div>
</div>
2020-10-14 17:07:59 +03:00
@endcan
2017-09-14 22:21:00 +03:00
{!! Form::close() !!}
</div>
@endsection
2019-11-16 10:21:14 +03:00
@push('scripts_start')
<script src="{{ asset('public/js/banking/accounts.js?v=' . version('short')) }}"></script>
2017-11-13 21:55:15 +03:00
@endpush