61 lines
3.4 KiB
PHP
Raw Normal View History

2017-09-14 22:21:00 +03:00
@extends('layouts.admin')
@section('title', trans('general.title.new', ['type' => trans_choice('general.payments', 1)]))
@section('content')
2019-11-16 10:21:14 +03:00
<div class="card">
{!! Form::open([
'route' => 'payments.store',
'id' => 'payment',
'@submit.prevent' => 'onSubmit',
'@keydown' => 'form.errors.clear($event.target.name)',
'files' => true,
'role' => 'form',
'class' => 'form-loading-button needs-validation',
'novalidate' => 'true'
]) !!}
<div class="card-body">
<div class="row">
{{ Form::dateGroup('paid_at', trans('general.date'), 'calendar', ['id' => 'paid_at', 'required' => 'required', 'show-date-format' => company_date_format(), 'date-format' => 'Y-m-d', 'autocomplete' => 'off'], request()->get('paid_at', Date::now()->toDateString())) }}
2019-11-16 10:21:14 +03:00
{!! Form::hidden('currency_code', $account_currency_code, ['id' => 'currency_code', 'class' => 'form-control', 'required' => 'required']) !!}
{!! Form::hidden('currency_rate', '1', ['id' => 'currency_rate']) !!}
{{ Form::moneyGroup('amount', trans('general.amount'), 'money-bill-alt', ['required' => 'required', 'currency' => $currency, 'dynamic-currency' => 'currency'], 0.00) }}
2019-11-16 10:21:14 +03:00
2020-03-09 11:57:06 +03:00
{{ Form::selectAddNewGroup('account_id', trans_choice('general.accounts', 1), 'university', $accounts, setting('default.account'), ['required' => 'required', 'path' => route('modals.accounts.create'), 'change' => 'onChangeAccount']) }}
2019-11-16 10:21:14 +03:00
{{ Form::selectRemoteAddNewGroup('contact_id', trans_choice('general.vendors', 1), 'user', $vendors, old('contact.id', old('contact_id', null)), ['path' => route('modals.vendors.create'), 'remote_action' => route('vendors.index')]) }}
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
{{ Form::selectRemoteAddNewGroup('category_id', trans_choice('general.categories', 1), 'folder', $categories, setting('default.expense_category'), ['required' => 'required', 'path' => route('modals.categories.create') . '?type=expense', 'remote_action' => route('categories.index'). '?search=type:expense']) }}
2017-09-14 22:21:00 +03:00
2019-11-16 10:21:14 +03:00
{{ Form::recurring('create') }}
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, setting('default.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', []) }}
2017-09-14 22:21:00 +03:00
2020-03-20 17:25:21 +03:00
{{ Form::selectGroup('document_id', trans_choice('general.bills', 1), 'file-invoice', [], null, ['disabled' => 'true']) }}
2021-02-09 11:52:01 +03:00
{{ Form::fileGroup('attachment', trans('general.attachment'), '', ['dropzone-class' => 'w-100', 'multiple' => 'multiple', 'options' => ['acceptedFiles' => $file_types]], null, 'col-md-12') }}
2019-11-16 10:21:14 +03:00
</div>
</div>
<div class="card-footer">
2020-02-15 13:04:37 +03:00
<div class="row save-buttons">
{{ Form::saveButtons('payments.index') }}
2019-11-16 10:21:14 +03:00
</div>
</div>
{{ Form::hidden('type', 'expense') }}
2017-09-14 22:21:00 +03:00
{!! Form::close() !!}
</div>
@endsection
2019-11-16 10:21:14 +03:00
@push('scripts_start')
2019-12-31 15:49:09 +03:00
<script src="{{ asset('public/js/purchases/payments.js?v=' . version('short')) }}"></script>
2017-11-13 21:55:15 +03:00
@endpush