akaunting 3.0 (the last dance)

This commit is contained in:
Burak Civan
2022-06-01 10:15:55 +03:00
parent cead09f6d4
commit d9c0764572
3812 changed files with 126831 additions and 102949 deletions

View File

@ -1,31 +1,41 @@
{!! Form::open([
'id' => 'form-item-column',
'method' => 'PATCH',
'route' => 'modals.documents.item-columns.update',
'@submit.prevent' => 'onSubmit',
'@keydown' => 'form.errors.clear($event.target.name)',
'files' => true,
'role' => 'form',
'class' => 'form-loading-button',
'novalidate' => true,
]) !!}
<div class="row">
{{ Form::invoice_text('item_name', trans('settings.invoice.item_name'), 'font', $item_names, $item_name, [], 'item_name_input', $item_name_input, 'col-md-12') }}
<x-form id="form-item-column" method="PATCH" route="modals.documents.item-columns.update">
<div class="grid sm:grid-cols-6 gap-x-8 gap-y-6 my-3.5">
<x-form.group.invoice-text
name="item_name"
label="{{ trans('settings.invoice.item_name') }}"
:options="$item_names"
:selected="$item_name"
input-name="item_name_input"
:input-value="$item_name_input"
form-group-class="sm:col-span-6 sm:gap-0"
/>
{{ Form::invoice_text('price_name', trans('settings.invoice.price_name'), 'font', $price_names, $price_name, [], 'price_name_input', $price_name_input, 'col-md-12') }}
<x-form.group.invoice-text
name="price_name"
label="{{ trans('settings.invoice.price_name') }}"
:options="$price_names"
:selected="$price_name"
input-name="price_name_input"
:input-value="$price_name_input"
form-group-class="sm:col-span-6 sm:gap-0"
/>
{{ Form::invoice_text('quantity_name', trans('settings.invoice.quantity_name'), 'font', $quantity_names, $quantity_name, [], 'quantity_name_input', $quantity_name_input, 'col-md-12') }}
<x-form.group.invoice-text
name="quantity_name"
label="{{ trans('settings.invoice.quantity_name') }}"
:options="$quantity_names"
:selected="$quantity_name"
input-name="quantity_name_input"
:input-value="$quantity_name_input"
form-group-class="sm:col-span-6 sm:gap-0"
/>
{{ Form::radioGroup('hide_item_name', trans('settings.invoice.hide.item_name'), $hide_item_name) }}
<x-form.group.toggle name="hide_item_description" label="{{ trans('settings.invoice.hide.item_description') }}" :value="$hide_item_description" />
{{ Form::radioGroup('hide_item_description', trans('settings.invoice.hide.item_description'), $hide_item_description) }}
<x-form.group.toggle name="hide_quantity" label="{{ trans('settings.invoice.hide.quantity') }}" :value="$hide_quantity" />
<x-form.group.toggle name="hide_amount" label="{{ trans('settings.invoice.hide.amount') }}" :value="$hide_amount" not-required form-group-class="sm:col-span-6" />
{{ Form::radioGroup('hide_quantity', trans('settings.invoice.hide.quantity'), $hide_quantity) }}
{{ Form::radioGroup('hide_price', trans('settings.invoice.hide.price'), $hide_price) }}
{{ Form::radioGroup('hide_amount', trans('settings.invoice.hide.amount'), $hide_amount) }}
{!! Form::hidden('type', $type) !!}
<x-form.input.hidden name="type" :value="$type" />
<x-form.input.hidden name="enabled" value="1" />
</div>
{!! Form::close() !!}
</x-form>

View File

@ -1,35 +1,27 @@
{!! Form::open([
'id' => 'form-transaction',
'@submit.prevent' => 'onSubmit',
'@keydown' => 'form.errors.clear($event.target.name)',
'role' => 'form',
'class' => 'form-loading-button',
'route' => ['modals.documents.document.transactions.store', $document->id],
'novalidate' => true
]) !!}
<x-form id="form-transaction" :route="$route" :model="!empty($transaction) ? $transaction : false">
<base-alert type="warning" v-if="typeof form.response !== 'undefined' && form.response.error" v-html="form.response.message"></base-alert>
<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'], Date::now()->toDateString()) }}
<div class="grid sm:grid-cols-6 gap-x-8 gap-y-6 my-3.5">
<x-form.group.date name="paid_at" label="{{ trans('general.date') }}" icon="calendar_today" value="{{ Date::now()->toDateString() }}" show-date-format="{{ company_date_format() }}" date-format="Y-m-d" autocomplete="off" />
{{ Form::moneyGroup('amount', trans('general.amount'), 'money-bill-alt', ['required' => 'required', 'autofocus' => 'autofocus', 'currency' => $currency, 'dynamic-currency' => 'currency'], $document->grand_total) }}
<x-form.group.money name="amount" label="{{ trans('general.amount') }}" value="{{ $document->grand_total }}" autofocus="autofocus" :currency="$currency" dynamicCurrency="currency" />
{{ Form::selectGroup('account_id', trans_choice('general.accounts', 1), 'university', $accounts, setting('default.account'), ['required' => 'required', 'change' => 'onChangePaymentAccount']) }}
<x-form.group.account change="onChangePaymentAccount" />
{{ Form::textGroup('currency', trans_choice('general.currencies', 1), 'exchange-alt', ['disabled' => 'true'], $currencies[$document->currency_code]) }}
<x-form.group.text name="currency" label="{{ trans_choice('general.currencies', 1) }}" value="{{ $document->currency->name }}" not-required disabled />
{{ Form::textareaGroup('description', trans('general.description'), '', null, ['rows' => '3']) }}
<x-form.group.textarea name="description" label="{{ trans('general.description') }}" rows="3" not-required />
{{ Form::selectGroup('payment_method', trans_choice('general.payment_methods', 1), 'credit-card', $payment_methods, setting('default.payment_method'), ['required' => 'requied']) }}
<x-form.group.payment-method />
{{ Form::textGroup('reference', trans('general.reference'), 'fa fa-file', []) }}
<x-form.group.text name="reference" label="{{ trans('general.reference') }}" not-required />
{!! Form::hidden('document_id', $document->id, ['id' => 'document_id', 'class' => 'form-control', 'required' => 'required']) !!}
{!! Form::hidden('category_id', $document->category->id, ['id' => 'category_id', 'class' => 'form-control', 'required' => 'required']) !!}
{!! Form::hidden('amount', $document->grand_total, ['id' => 'amount', 'class' => 'form-control', 'required' => 'required']) !!}
{!! Form::hidden('currency_code', $document->currency_code, ['id' => 'currency_code', 'class' => 'form-control', 'required' => 'required']) !!}
{!! Form::hidden('currency_rate', $document->currency_rate, ['id' => 'currency_rate', 'class' => 'form-control', 'required' => 'required']) !!}
{!! Form::hidden('type', config('type.' . $document->type . '.transaction_type')) !!}
<x-form.input.hidden name="document_id" :value="$document->id" />
<x-form.input.hidden name="category_id" :value="$document->category->id" />
<x-form.input.hidden name="amount" :value="$document->grand_total" />
<x-form.input.hidden name="currency_code" :value="$document->currency_code" />
<x-form.input.hidden name="currency_rate" :value="$document->currency_rate" />
<x-form.input.hidden name="number" :value="$number" />
<x-form.input.hidden name="type" :value="config('type.document.' . $document->type . '.transaction_type')" />
</div>
{!! Form::close() !!}
</x-form>