@extends('layouts.admin') @section('title', trans('general.title.edit', ['type' => trans_choice('general.bills', 1)])) @section('content')
{!! Form::model($bill, [ 'id' => 'bill', 'method' => 'PATCH', 'route' => ['bills.update', $bill->id], '@submit.prevent' => 'onSubmit', '@keydown' => 'form.errors.clear($event.target.name)', 'files' => true, 'role' => 'form', 'class' => 'form-loading-button', 'novalidate' => true ]) !!}
{{ Form::selectAddNewGroup('contact_id', trans_choice('general.vendors', 1), 'user', $vendors, $bill->contact_id, ['required' => 'required', 'change' => 'onChangeContact']) }} {{ Form::selectGroup('currency_code', trans_choice('general.currencies', 1), 'exchange', $currencies, $bill->currency_code, ['required' => 'required', 'change' => 'onChangeCurrency']) }} {{ Form::dateGroup('billed_at', trans('bills.bill_date'), 'calendar', ['id' => 'billed_at', 'class' => 'form-control datepicker', 'required' => 'required', 'date-format' => 'Y-m-d', 'autocomplete' => 'off'], Date::parse($bill->billed_at)->toDateString()) }} {{ Form::dateGroup('due_at', trans('bills.due_date'), 'calendar', ['id' => 'due_at', 'class' => 'form-control datepicker', 'required' => 'required', 'date-format' => 'Y-m-d', 'autocomplete' => 'off'], Date::parse($bill->due_at)->toDateString()) }} {{ Form::textGroup('bill_number', trans('bills.bill_number'), 'file-text-o') }} {{ Form::textGroup('order_number', trans('bills.order_number'), 'shopping-cart',[]) }}
{!! Form::label('items', trans_choice('general.items', 2), ['class' => 'control-label']) !!}
@stack('actions_th_start') @stack('actions_th_end') @stack('name_th_start') @stack('name_th_end') @stack('quantity_th_start') @stack('quantity_th_end') @stack('price_th_start') @stack('price_th_end') @stack('taxes_th_start') @stack('taxes_th_end') @stack('total_th_start') @stack('total_th_end') @include('expenses.bills.item') @stack('add_item_td_start') @stack('add_item_td_end') @stack('sub_total_td_start') @stack('sub_total_td_end') @stack('add_discount_td_start') @stack('add_discount_td_end') @stack('tax_total_td_start') @stack('tax_total_td_end') @stack('grand_total_td_start') @stack('grand_total_td_end')
{{ trans('general.actions') }}{{ trans('general.name') }}{{ trans('bills.quantity') }}{{ trans('bills.price') }}{{ trans_choice('general.taxes', 1) }}{{ trans('bills.total') }}
{{ trans('bills.sub_total') }} 0
{!! Form::number('pre_discount', null, ['id' => 'pre-discount', 'class' => 'form-control text-right']) !!}
{{ trans('invoices.discount_desc') }}
{{ trans('invoices.add_discount') }}
{!! Form::hidden('discount', null, ['id' => 'discount', 'class' => 'form-control text-right', 'v-model' => 'form.discount']) !!}
{{ trans_choice('general.taxes', 1) }} 0
{{ trans('bills.total') }} 0
{{ Form::textareaGroup('notes', trans_choice('general.notes', 2)) }} {{ Form::selectAddNewGroup('category_id', trans_choice('general.categories', 1), 'folder', $categories, $bill->category_id) }} {{ Form::recurring('edit', $bill) }} {{ Form::fileGroup('attachment', trans('general.attachment')) }} {{ Form::hidden('contact_name', old('contact_name'), ['id' => 'contact_name', 'v-model' => 'form.contact_name']) }} {{ Form::hidden('contact_email', old('contact_email'), ['id' => 'contact_email', 'v-model' => 'form.contact_email']) }} {{ Form::hidden('contact_tax_number', old('contact_tax_number'), ['id' => 'contact_tax_number', 'v-model' => 'form.contact_tax_number']) }} {{ Form::hidden('contact_phone', old('contact_phone'), ['id' => 'contact_phone', 'v-model' => 'form.contact_phone']) }} {{ Form::hidden('contact_address', old('contact_address'), ['id' => 'contact_address', 'v-model' => 'form.contact_address']) }} {{ Form::hidden('currency_rate', old('currency_rate', 1), ['id' => 'currency_rate', 'v-model' => 'form.contact_rate']) }} {{ Form::hidden('bill_status_code', old('bill_status_code', 'draft'), ['id' => 'bill_status_code', 'v-model' => 'form.bill_status_code']) }} {{ Form::hidden('amount', old('amount', '0'), ['id' => 'amount', 'v-model' => 'form.amount']) }}
@permission('update-expenses-bills') @endpermission {!! Form::close() !!}
@endsection @push('scripts_start') @endpush