54 lines
2.6 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.transfers', 1)]))
@section('content')
2019-11-16 10:21:14 +03:00
<div class="card">
2017-09-14 22:21:00 +03:00
{!! Form::model($transfer, [
2019-11-16 10:21:14 +03:00
'id' => 'transfer',
2017-09-14 22:21:00 +03:00
'method' => 'PATCH',
2019-11-16 10:21:14 +03:00
'route' => ['transfers.update', $transfer->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::selectGroup('from_account_id', trans('transfers.from_account'), 'university', $accounts, $transfer->from_account_id, ['required' => 'required', 'change' => 'onChangeAccount']) }}
2017-09-14 22:21:00 +03:00
2019-11-16 10:21:14 +03:00
{{ Form::selectGroup('to_account_id', trans('transfers.to_account'), 'university', $accounts, $transfer->to_account_id) }}
2017-09-14 22:21:00 +03:00
{{ Form::moneyGroup('amount', trans('general.amount'), 'money-bill-alt', ['required' => 'required', 'currency' => $currency, 'dynamic-currency' => 'currency'], $transfer->amount) }}
2017-09-14 22:21:00 +03:00
2019-11-16 10:21:14 +03:00
{{ Form::dateGroup('transferred_at', trans('general.date'), 'calendar', ['id' => 'transferred_at', 'class' => 'form-control datepicker', 'required' => 'required', 'date-format' => 'Y-m-d', 'autocomplete' => 'off'], Date::parse($transfer->transferred_at)->toDateString()) }}
2017-09-14 22:21:00 +03:00
2019-11-16 10:21:14 +03:00
{{ Form::textareaGroup('description', trans('general.description')) }}
2017-09-14 22:21:00 +03:00
2019-11-16 10:21:14 +03:00
{{ Form::selectGroup('payment_method', trans_choice('general.payment_methods', 1), 'credit-card', $payment_methods, $transfer->payment_method) }}
2017-09-14 22:21:00 +03:00
2019-11-16 10:21:14 +03:00
{{ Form::textGroup('reference', trans('general.reference'), 'file', []) }}
2019-11-16 10:21:14 +03:00
{!! Form::hidden('currency_code', $currency->code, ['id' => 'currency_code', 'v-model' => 'form.currency_code']) !!}
{!! Form::hidden('currency_rate', $currency->rate, ['id' => 'currency_rate', 'v-model' => 'form.currency_rate']) !!}
</div>
</div>
2017-09-14 22:21:00 +03:00
2020-10-14 17:07:59 +03:00
@can('update-banking-transfers')
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('transfers.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/transfers.js?v=' . version('short')) }}"></script>
2017-11-13 21:55:15 +03:00
@endpush