This commit is contained in:
Cüneyt Şentürk
2020-01-03 14:04:00 +03:00
parent 1c0697b266
commit 4bafcaccd6
24 changed files with 237 additions and 325 deletions

View File

@ -19,7 +19,7 @@
<div class="row">
{{ Form::textGroup('name', trans('general.name'), 'tag') }}
{{ Form::selectAddNewGroup('tax_id', trans_choice('general.taxes', 1), 'percentage', $taxes, setting('default.tax'), []) }}
{{ Form::selectAddNewGroup('tax_id', trans_choice('general.taxes', 1), 'percentage', $taxes, setting('default.tax'), ['path' => route('modals.taxes.create')]) }}
{{ Form::textareaGroup('description', trans('general.description')) }}
@ -27,7 +27,7 @@
{{ Form::textGroup('purchase_price', trans('items.purchase_price'), 'money-bill-wave-alt') }}
{{ Form::selectAddNewGroup('category_id', trans_choice('general.categories', 1), 'folder', $categories, null, []) }}
{{ Form::selectAddNewGroup('category_id', trans_choice('general.categories', 1), 'folder', $categories, null, ['required' => 'required', 'path' => route('modals.categories.create') . '?type=item']) }}
{{ Form::fileGroup('picture', trans_choice('general.pictures', 1), 'plus') }}

View File

@ -20,7 +20,7 @@
<div class="row">
{{ Form::textGroup('name', trans('general.name'), 'tag') }}
{{ Form::selectAddNewGroup('tax_id', trans_choice('general.taxes', 1), 'percentage', $taxes, $item->tax_id, []) }}
{{ Form::selectAddNewGroup('tax_id', trans_choice('general.taxes', 1), 'percentage', $taxes, $item->tax_id, ['path' => route('modals.taxes.create')]) }}
{{ Form::textareaGroup('description', trans('general.description')) }}
@ -28,7 +28,7 @@
{{ Form::textGroup('purchase_price', trans('items.purchase_price'), 'money-bill-wave-alt') }}
{{ Form::selectAddNewGroup('category_id', trans_choice('general.categories', 1), 'folder', $categories, $item->category_id, []) }}
{{ Form::selectAddNewGroup('category_id', trans_choice('general.categories', 1), 'folder', $categories, $item->category_id, ['required' => 'required', 'path' => route('modals.categories.create') . '?type=item']) }}
{{ Form::fileGroup('picture', trans_choice('general.pictures', 1)) }}

View File

@ -1,99 +1,16 @@
<div class="modal fade create-category-{{ $rand }} d-none" id="modal-create-category">
<div class="modal-dialog modal-lg">
<div class="modal-content">
<div class="modal-header">
<h4 class="modal-title">{{ trans('general.title.new', ['type' => trans_choice('general.categories', 1)]) }}</h4>
</div>
{!! Form::open([
'id' => 'form-create-category',
'@submit.prevent' => 'onSubmit',
'@keydown' => 'form.errors.clear($event.target.name)',
'role' => 'form',
'class' => 'form-loading-button',
'route' => 'categories.store',
'novalidate' => true
]) !!}
<div class="row">
{{ Form::textGroup('name', trans('general.name'), 'id-card-o') }}
<div class="modal-body">
{!! Form::open(['id' => 'form-create-category', 'role' => 'form', 'class' => 'form-loading-button']) !!}
<div class="row">
{{ Form::textGroup('name', trans('general.name'), 'id-card-o') }}
@stack('color_input_start')
<div class="form-group col-md-6 required {{ $errors->has('color') ? 'has-error' : ''}}">
{!! Form::label('color', trans('general.color'), ['class' => 'control-label']) !!}
<div id="category-color-picker" class="input-group colorpicker-component">
<div class="input-group-addon"><i></i></div>
{!! Form::text('color', '#00a65a', ['id' => 'color', 'class' => 'form-control', 'required' => 'required']) !!}
</div>
{!! $errors->first('color', '<p class="help-block">:message</p>') !!}
</div>
@stack('color_input_end')
{!! Form::hidden('type', $type, []) !!}
{!! Form::hidden('enabled', '1', []) !!}
</div>
{!! Form::close() !!}
</div>
<div class="modal-footer">
<div class="pull-left">
{!! Form::button('<span class="fa fa-save"></span> &nbsp;' . trans('general.save'), ['type' => 'button', 'id' =>'button-create-category', 'class' => 'btn btn-success button-submit', 'data-loading-text' => trans('general.loading')]) !!}
<button type="button" class="btn btn-default" data-dismiss="modal"><span class="fa fa-times-circle"></span> &nbsp;{{ trans('general.cancel') }}</button>
</div>
</div>
</div>
{!! Form::hidden('type', $type, []) !!}
{!! Form::hidden('enabled', '1', []) !!}
</div>
</div>
<script type="text/javascript">
$(document).ready(function(){
$('.create-category-{{ $rand }}#modal-create-category').modal('show');
$('.create-category-{{ $rand }} #category-color-picker').colorpicker();
});
$(document).on('click', '.create-category-{{ $rand }} #button-create-category', function (e) {
$('.create-category-{{ $rand }}#modal-create-category .modal-header').before('<span id="span-loading" style="position: absolute; height: 100%; width: 100%; z-index: 99; background: #6da252; opacity: 0.4;"><i class="fa fa-spinner fa-spin" style="font-size: 10em !important; margin-left: 35%;margin-top: 8%;"></i></span>');
$.ajax({
url: '{{ url("modals/categories") }}',
type: 'POST',
dataType: 'JSON',
data: $(".create-category-{{ $rand }} #form-create-category").serialize(),
beforeSend: function () {
$('.create-category-{{ $rand }} #button-create-category').button('loading');
$(".create-category-{{ $rand }} .form-group").removeClass("has-error");
$(".create-category-{{ $rand }} .help-block").remove();
},
complete: function() {
$('.create-category-{{ $rand }} #button-create-category').button('reset');
},
success: function(json) {
var data = json['data'];
$('.create-category-{{ $rand }} #span-loading').remove();
$('.create-category-{{ $rand }}#modal-create-category').modal('hide');
$('#category_id').append('<option value="' + data.id + '" selected="selected">' + data.name + '</option>');
$('#category_id').trigger('change');
$('#category_id').select2('refresh');
@if ($category_selector)
$('{{ $category_selector }}').append('<option value="' + data.id + '" selected="selected">' + data.name + '</option>');
$('{{ $category_selector }}').trigger('change');
$('{{ $category_selector }}').select2('refresh');
@endif
},
error: function(error, textStatus, errorThrown) {
$('.create-category-{{ $rand }} #span-loading').remove();
if (error.responseJSON.name) {
$(".create-category-{{ $rand }}#modal-create-category input[name='name']").parent().parent().addClass('has-error');
$(".create-category-{{ $rand }}#modal-create-category input[name='name']").parent().after('<p class="help-block">' + error.responseJSON.name + '</p>');
}
if (error.responseJSON.color) {
$(".create-category-{{ $rand }}#modal-create-category input[name='color']").parent().parent().addClass('has-error');
$(".create-category-{{ $rand }}#modal-create-category input[name='color']").parent().after('<p class="help-block">' + error.responseJSON.color + '</p>');
}
}
});
});
</script>
{!! Form::close() !!}

View File

@ -6,7 +6,6 @@
'class' => 'form-loading-button',
'route' => 'customers.store',
'novalidate' => true
]) !!}
<div class="row">
{{ Form::textGroup('name', trans('general.name'), 'id-card-o') }}

View File

@ -1,7 +1,11 @@
{!! Form::open([
'id' => 'form-create-tax',
'role' => 'form',
'class' => 'form-loading-button'
'id' => 'form-create-tax',
'@submit.prevent' => 'onSubmit',
'@keydown' => 'form.errors.clear($event.target.name)',
'role' => 'form',
'class' => 'form-loading-button',
'route' => 'taxes.store',
'novalidate' => true
]) !!}
<div class="row">
{{ Form::textGroup('name', trans('general.name'), 'id-card-o') }}

View File

@ -1,101 +1,23 @@
<div class="modal fade create-vendor-{{ $rand }} d-none" id="modal-create-vendor">
<div class="modal-dialog modal-lg">
<div class="modal-content">
<div class="modal-header">
<h4 class="modal-title">{{ trans('general.title.new', ['type' => trans_choice('general.vendors', 1)]) }}</h4>
</div>
{!! Form::open([
'id' => 'form-create-vendor',
'@submit.prevent' => 'onSubmit',
'@keydown' => 'form.errors.clear($event.target.name)',
'role' => 'form',
'class' => 'form-loading-button',
'route' => 'vendors.store',
'novalidate' => true
]) !!}
<div class="row">
{{ Form::textGroup('name', trans('general.name'), 'id-card-o') }}
<div class="modal-body">
{!! Form::open(['id' => 'form-create-vendor', 'role' => 'form', 'class' => 'form-loading-button']) !!}
{{ Form::textGroup('email', trans('general.email'), 'envelope', []) }}
<div class="row">
{{ Form::textGroup('name', trans('general.name'), 'id-card-o') }}
{{ Form::textGroup('tax_number', trans('general.tax_number'), 'percent', []) }}
{{ Form::textGroup('email', trans('general.email'), 'envelope', []) }}
{{ Form::selectGroup('currency_code', trans_choice('general.currencies', 1), 'exchange', $currencies, setting('default.currency')) }}
{{ Form::textGroup('tax_number', trans('general.tax_number'), 'percent', []) }}
{{ Form::textareaGroup('address', trans('general.address')) }}
{{ Form::selectGroup('currency_code', trans_choice('general.currencies', 1), 'exchange', $currencies, setting('default.currency')) }}
{{ Form::textareaGroup('address', trans('general.address')) }}
{!! Form::hidden('enabled', '1', []) !!}
</div>
{!! Form::close() !!}
</div>
<div class="modal-footer">
<div class="pull-left">
{!! Form::button('<span class="fa fa-save"></span> &nbsp;' . trans('general.save'), ['type' => 'button', 'id' =>'button-create-vendor', 'class' => 'btn btn-success button-submit', 'data-loading-text' => trans('general.loading')]) !!}
<button type="button" class="btn btn-default" data-dismiss="modal"><span class="fa fa-times-circle"></span> &nbsp;{{ trans('general.cancel') }}</button>
</div>
</div>
</div>
{!! Form::hidden('enabled', '1', []) !!}
</div>
</div>
<script type="text/javascript">
$(document).ready(function(){
$('.create-vendor-{{ $rand }}#modal-create-vendor').modal('show');
$(".create-vendor-{{ $rand }}#modal-create-vendor #currency_code").select2({
placeholder: "{{ trans('general.form.select.field', ['field' => trans_choice('general.currencies', 1)]) }}"
});
});
$(document).on('click', '.create-vendor-{{ $rand }} #button-create-vendor', function (e) {
$('.create-vendor-{{ $rand }}#modal-create-vendor .modal-header').before('<span id="span-loading" style="position: absolute; height: 100%; width: 100%; z-index: 99; background: #6da252; opacity: 0.4;"><i class="fa fa-spinner fa-spin" style="font-size: 16em !important;margin-left: 35%;margin-top: 8%;"></i></span>');
$.ajax({
url: '{{ url("modals/vendors") }}',
type: 'POST',
dataType: 'JSON',
data: $(".create-vendor-{{ $rand }} #form-create-vendor").serialize(),
beforeSend: function () {
$('.create-vendor-{{ $rand }} #button-create-vendor').button('loading');
$(".create-vendor-{{ $rand }} .form-group").removeClass("has-error");
$(".create-vendor-{{ $rand }} .help-block").remove();
},
complete: function() {
$('.create-vendor-{{ $rand }} #button-create-vendor').button('reset');
},
success: function(json) {
var data = json['data'];
$('.create-vendor-{{ $rand }} #span-loading').remove();
$('.create-vendor-{{ $rand }}#modal-create-vendor').modal('hide');
$('#contact_id').append('<option value="' + data.id + '" selected="selected">' + data.name + '</option>');
$('#contact_id').trigger('change');
$('#contact_id').select2('refresh');
@if ($contact_selector)
$('{{ $contact_selector }}').append('<option value="' + data.id + '" selected="selected">' + data.name + '</option>');
$('{{ $contact_selector }}').trigger('change');
$('{{ $contact_selector }}').select2('refresh');
@endif
},
error: function(error, textStatus, errorThrown) {
$('.create-vendor-{{ $rand }} #span-loading').remove();
if (error.responseJSON.name) {
$(".create-vendor-{{ $rand }}#modal-create-vendor input[name='name']").parent().parent().addClass('has-error');
$(".create-vendor-{{ $rand }}#modal-create-vendor input[name='name']").parent().after('<p class="help-block">' + error.responseJSON.name + '</p>');
}
if (error.responseJSON.email) {
$(".create-vendor-{{ $rand }}#modal-create-vendor input[name='email']").parent().parent().addClass('has-error');
$(".create-vendor-{{ $rand }}#modal-create-vendor input[name='email']").parent().after('<p class="help-block">' + error.responseJSON.email + '</p>');
}
if (error.responseJSON.currency_code) {
$(".create-vendor-{{ $rand }}#modal-create-vendor select[name='currency_code']").parent().parent().addClass('has-error');
$(".create-vendor-{{ $rand }}#modal-create-vendor select[name='currency_code']").parent().after('<p class="help-block">' + error.responseJSON.currency_code + '</p>');
}
}
});
});
</script>
{!! Form::close() !!}

View File

@ -6,26 +6,5 @@
@stack('content_content_end')
<notifications></notifications>
<akaunting-modal
v-if="addNew.modal"
:show="addNew.modal"
:title="addNew.title"
:message="addNew.html">
<template #card-footer>
<div class="float-right">
<button type="button" class="btn btn-outline-secondary" @click="onCancelNewItem()">
<span>{{ trans('general.cancel') }}</span>
</button>
<button type="button" class="btn btn-success button-submit" @click="onNewItemSubmit()">
<div class="aka-loader d-none"></div>
<span>{{ trans('general.confirm') }}</span>
</button>
</div>
</template>
</akaunting-modal>
</div>
@stack('content_end')

View File

@ -36,7 +36,7 @@
<script type="text/javascript"><!--
window.Laravel = <?php echo json_encode([
'csrfToken' => csrf_token(),
]); ?>
]); ?>;
var aka_currency = 'false';

View File

@ -10,15 +10,16 @@
:value="{{ json_encode(old($name, $selected)) }}"
:icon="'{{ $icon }}'"
:multiple="true"
:add-new="true"
:add-new-text="'{{ trans('general.form.add_new', ['field' => $text]) }}'"
:add-new="{{ json_encode([
'status' => true,
'text' => trans('general.form.add_new', ['field' => $text]),
'path' => isset($attributes['path']) ? $attributes['path']: false,
'type' => isset($attributes['type']) ? $attributes['type'] : 'modal',
'field' => isset($attributes['field']) ? $attributes['field'] : 'name'
])}}"
@if (!empty($attributes['collapse']))
:collapse="true"
@endif
@if (!empty($attributes['path']))
:add-new-path="'{{ $attributes['path'] }}'"
@endif
@new_item="onNewItem($event)"
@interface="{{ !empty($attributes['v-model']) ? $attributes['v-model'] . ' = $event' : 'form.' . $name . ' = $event' }}"
@if (!empty($attributes['change']))
@change="{{ $attributes['change'] }}($event)"

View File

@ -8,13 +8,14 @@
:options="{{ json_encode($values) }}"
:value="'{{ old($name, $selected) }}'"
:icon="'{{ $icon }}'"
:add-new="true"
:add-new-text="'{{ trans('general.form.add_new', ['field' => $text]) }}'"
@if (!empty($attributes['path']))
:add-new-path="'{{ $attributes['path'] }}'"
@endif
@new_item="onNewItem($event)"
@interface="form.{{ $name }} = $event"
:add-new="{{ json_encode([
'status' => true,
'text' => trans('general.form.add_new', ['field' => $text]),
'path' => isset($attributes['path']) ? $attributes['path']: false,
'type' => isset($attributes['type']) ? $attributes['type'] : 'modal',
'field' => isset($attributes['field']) ? $attributes['field'] : 'name'
])}}"
@interface="{{ !empty($attributes['v-model']) ? $attributes['v-model'] . ' = $event' : 'form.' . $name . ' = $event' }}"
@if (!empty($attributes['change']))
@change="{{ $attributes['change'] }}($event)"
@endif

View File

@ -8,10 +8,15 @@
:options="{{ json_encode($values) }}"
:value="'{{ old($name, $selected) }}'"
:icon="'{{ $icon }}'"
:add-new="true"
:add-new-text="'{{ trans('general.form.add_new', ['field' => $text]) }}'"
:add-new="{{ json_encode([
'status' => true,
'text' => trans('general.form.add_new', ['field' => $text]),
'path' => isset($attributes['path']) ? $attributes['path']: false,
'type' => isset($attributes['type']) ? $attributes['type'] : 'modal',
'field' => isset($attributes['field']) ? $attributes['field'] : 'name'
])}}"
:group="true"
@interface="form.{{ $name }} = $event"
@interface="{{ !empty($attributes['v-model']) ? $attributes['v-model'] . ' = $event' : 'form.' . $name . ' = $event' }}"
@if (!empty($attributes['change']))
@change="{{ $attributes['change'] }}($event)"
@endif

View File

@ -6,12 +6,5 @@
@stack('content_content_end')
<notifications></notifications>
<akaunting-modal
v-if="addNew.modal"
:show="addNew.modal"
:title="addNew.title"
:message="addNew.html">
</akaunting-modal>
</div>
@stack('content_end')

View File

@ -19,12 +19,5 @@
@stack('content_content_end')
<notifications></notifications>
<akaunting-modal
v-if="addNew.modal"
:show="addNew.modal"
:title="addNew.title"
:message="addNew.html">
</akaunting-modal>
</div>
@stack('content_end')

View File

@ -15,11 +15,4 @@
@stack('content_content_end')
<notifications></notifications>
<akaunting-modal
v-if="addNew.modal"
:show="addNew.modal"
:title="addNew.title"
:message="addNew.html">
</akaunting-modal>
@stack('content_end')

View File

@ -17,7 +17,7 @@
<div class="card-body">
<div class="row">
{{ Form::selectAddNewGroup('contact_id', trans_choice('general.vendors', 1), 'user', $vendors, config('general.vendors'), ['required' => 'required', 'change' => 'onChangeContact']) }}
{{ Form::selectAddNewGroup('contact_id', trans_choice('general.vendors', 1), 'user', $vendors, config('general.vendors'), ['required' => 'required', 'path' => route('modals.vendors.create'), 'change' => 'onChangeContact']) }}
{{ Form::selectGroup('currency_code', trans_choice('general.currencies', 1), 'exchange-alt', $currencies, setting('default.currency'), ['required' => 'required', 'change' => 'onChangeCurrency']) }}
@ -160,7 +160,7 @@
{{ Form::textareaGroup('notes', trans_choice('general.notes', 2)) }}
{{ Form::selectAddNewGroup('category_id', trans_choice('general.categories', 1), 'folder', $categories, setting('default.category'), []) }}
{{ Form::selectAddNewGroup('category_id', trans_choice('general.categories', 1), 'folder', $categories, setting('default.category'), ['required' => 'required', 'path' => route('modals.categories.create') . '?type=expense']) }}
{{ Form::recurring('create') }}

View File

@ -18,7 +18,7 @@
<div class="card-body">
<div class="row">
{{ Form::selectAddNewGroup('contact_id', trans_choice('general.vendors', 1), 'user', $vendors, $bill->contact_id, ['required' => 'required', 'change' => 'onChangeContact']) }}
{{ Form::selectAddNewGroup('contact_id', trans_choice('general.vendors', 1), 'user', $vendors, $bill->contact_id, ['required' => 'required', 'path' => route('modals.vendors.create'), 'change' => 'onChangeContact']) }}
{{ Form::selectGroup('currency_code', trans_choice('general.currencies', 1), 'exchange', $currencies, $bill->currency_code, ['required' => 'required', 'change' => 'onChangeCurrency']) }}
@ -161,7 +161,7 @@
{{ Form::textareaGroup('notes', trans_choice('general.notes', 2)) }}
{{ Form::selectAddNewGroup('category_id', trans_choice('general.categories', 1), 'folder', $categories, $bill->category_id) }}
{{ Form::selectAddNewGroup('category_id', trans_choice('general.categories', 1), 'folder', $categories, $bill->category_id, ['required' => 'required', 'path' => route('modals.categories.create') . '?type=expense']) }}
{{ Form::recurring('edit', $bill) }}

View File

@ -26,7 +26,7 @@
{{ Form::selectGroup('account_id', trans_choice('general.accounts', 1), 'university', $accounts, setting('default.account'), ['required' => 'required', 'change' => 'onChangeAccount']) }}
{{ Form::selectAddNewGroup('contact_id', trans_choice('general.vendors', 1), 'user', $vendors, setting('default.vendor'), []) }}
{{ Form::selectAddNewGroup('contact_id', trans_choice('general.vendors', 1), 'user', $vendors, setting('default.vendor'), ['path' => route('modals.vendors.create')]) }}
{{ Form::textareaGroup('description', trans('general.description')) }}

View File

@ -39,11 +39,11 @@
{{ Form::selectGroup('account_id', trans_choice('general.accounts', 1), 'university', $accounts, $payment->account_id, ['required' => 'required', 'change' => 'onChangeAccount']) }}
{{ Form::selectAddNewGroup('contact_id', trans_choice('general.vendors', 1), 'user', $vendors, $payment->contact_id, []) }}
{{ Form::selectAddNewGroup('contact_id', trans_choice('general.vendors', 1), 'user', $vendors, $payment->contact_id, ['path' => route('modals.vendors.create')]) }}
{{ Form::textareaGroup('description', trans('general.description')) }}
{{ Form::selectAddNewGroup('category_id', trans_choice('general.categories', 1), 'folder', $categories, $payment->category_id, ['required' => 'required']) }}
{{ Form::selectAddNewGroup('category_id', trans_choice('general.categories', 1), 'folder', $categories, $payment->category_id, ['required' => 'required', 'path' => route('modals.categories.create') . '?type=expense']) }}
{{ Form::recurring('edit', $payment) }}

View File

@ -17,7 +17,7 @@
<div class="card-body">
<div class="row">
{{ Form::selectAddNewGroup('contact_id', trans_choice('general.customers', 1), 'user', $customers, config('general.customers'), ['required' => 'required', 'change' => 'onChangeContact', 'path' => route('modals.customers.create')]) }}
{{ Form::selectAddNewGroup('contact_id', trans_choice('general.customers', 1), 'user', $customers, config('general.customers'), ['required' => 'required', 'path' => route('modals.customers.create'), 'change' => 'onChangeContact']) }}
{{ Form::selectGroup('currency_code', trans_choice('general.currencies', 1), 'exchange-alt', $currencies, setting('default.currency'), ['required' => 'required', 'change' => 'onChangeCurrency']) }}
@ -162,7 +162,7 @@
{{ Form::textareaGroup('footer', trans('general.footer'), '', setting('invoice.footer')) }}
{{ Form::selectAddNewGroup('category_id', trans_choice('general.categories', 1), 'folder', $categories, setting('defaults.category')) }}
{{ Form::selectAddNewGroup('category_id', trans_choice('general.categories', 1), 'folder', $categories, setting('defaults.category'), ['required' => 'required', 'path' => route('modals.categories.create') . '?type=income']) }}
{{ Form::recurring('create') }}

View File

@ -18,7 +18,7 @@
<div class="card-body">
<div class="row">
{{ Form::selectAddNewGroup('contact_id', trans_choice('general.customers', 1), 'user', $customers, $invoice->contact_id, ['required' => 'required', 'change' => 'onChangeContact']) }}
{{ Form::selectAddNewGroup('contact_id', trans_choice('general.customers', 1), 'user', $customers, $invoice->contact_id, ['required' => 'required', 'path' => route('modals.customers.create'), 'change' => 'onChangeContact']) }}
{{ Form::selectGroup('currency_code', trans_choice('general.currencies', 1), 'exchange-alt', $currencies, $invoice->currency_code, ['required' => 'required', 'change' => 'onChangeCurrency']) }}
@ -163,7 +163,7 @@
{{ Form::textareaGroup('footer', trans('general.footer')) }}
{{ Form::selectAddNewGroup('category_id', trans_choice('general.categories', 1), 'folder', $categories, $invoice->category_id) }}
{{ Form::selectAddNewGroup('category_id', trans_choice('general.categories', 1), 'folder', $categories, $invoice->category_id, ['required' => 'required', 'path' => route('modals.categories.create') . '?type=income']) }}
{{ Form::recurring('edit', $invoice) }}

View File

@ -26,11 +26,11 @@
{{ Form::selectGroup('account_id', trans_choice('general.accounts', 1), 'university', $accounts, setting('default.account'), ['required' => 'required', 'change' => 'onChangeAccount']) }}
{{ Form::selectAddNewGroup('contact_id', trans_choice('general.customers', 1), 'user', $customers, setting('default.contact'), []) }}
{{ Form::selectAddNewGroup('contact_id', trans_choice('general.customers', 1), 'user', $customers, setting('default.contact'), ['path' => route('modals.customers.create')]) }}
{{ Form::textareaGroup('description', trans('general.description')) }}
{{ Form::selectAddNewGroup('category_id', trans_choice('general.categories', 1), 'folder', $categories, setting('default.category')) }}
{{ Form::selectAddNewGroup('category_id', trans_choice('general.categories', 1), 'folder', $categories, setting('default.category'), ['required' => 'required', 'path' => route('modals.categories.create') . '?type=income']) }}
{{ Form::recurring('create') }}

View File

@ -39,11 +39,11 @@
{{ Form::selectGroup('account_id', trans_choice('general.accounts', 1), 'university', $accounts, $revenue->account_id, ['required' => 'required', 'change' => 'onChangeAccount']) }}
{{ Form::selectAddNewGroup('contact_id', trans_choice('general.customers', 1), 'user', $customers, $revenue->contact_id, []) }}
{{ Form::selectAddNewGroup('contact_id', trans_choice('general.customers', 1), 'user', $customers, $revenue->contact_id, ['path' => route('modals.customers.create')]) }}
{{ Form::textareaGroup('description', trans('general.description')) }}
{{ Form::selectAddNewGroup('category_id', trans_choice('general.categories', 1), 'folder', $categories, $revenue->category_id) }}
{{ Form::selectAddNewGroup('category_id', trans_choice('general.categories', 1), 'folder', $categories, $revenue->category_id, ['required' => 'required', 'path' => route('modals.categories.create') . '?type=income']) }}
{{ Form::recurring('edit', $revenue) }}