@extends('layouts.admin') @section('title', trans('general.title.new', ['type' => trans_choice('general.bills', 1)])) @section('content')
{!! Form::open(['url' => 'expenses/bills', 'files' => true, 'role' => 'form', 'class' => 'form-loading-button']) !!}
@stack('vendor_id_input_start')
{!! Form::label('vendor_id', trans_choice('general.vendors', 1), ['class' => 'control-label']) !!}
{!! Form::select('vendor_id', $vendors, null, array_merge(['id' => 'vendor_id', 'class' => 'form-control', 'placeholder' => trans('general.form.select.field', ['field' => trans_choice('general.vendors', 1)])])) !!}
{!! $errors->first('vendor_id', '

:message

') !!}
@stack('vendor_id_input_end') {{ Form::selectGroup('currency_code', trans_choice('general.currencies', 1), 'exchange', $currencies, setting('general.default_currency')) }} {{ Form::textGroup('billed_at', trans('bills.bill_date'), 'calendar',['id' => 'billed_at', 'class' => 'form-control', 'required' => 'required', 'data-inputmask' => '\'alias\': \'yyyy/mm/dd\'', 'data-mask' => '', 'autocomplete' => 'off'],Date::now()->toDateString()) }} {{ Form::textGroup('due_at', trans('bills.due_date'), 'calendar',['id' => 'due_at', 'class' => 'form-control', 'required' => 'required', 'data-inputmask' => '\'alias\': \'yyyy/mm/dd\'', 'data-mask' => '', 'autocomplete' => 'off'],Date::now()->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') @php $item_row = 0; @endphp @if(old('item')) @foreach(old('item') as $old_item) @php $item = (object) $old_item; @endphp @include('expenses.bills.item') @php $item_row++; @endphp @endforeach @else @include('expenses.bills.item') @endif @php $item_row++; @endphp @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
{{ trans('bills.add_discount') }} {!! Form::hidden('discount', null, ['id' => 'discount', 'class' => 'form-control text-right']) !!}
{{ trans_choice('general.taxes', 1) }} 0
{{ trans('bills.total') }} 0
{{ Form::textareaGroup('notes', trans_choice('general.notes', 2)) }} @stack('category_id_input_start')
{!! Form::label('category_id', trans_choice('general.categories', 1), ['class' => 'control-label']) !!}
{!! Form::select('category_id', $categories, null, array_merge(['class' => 'form-control', 'placeholder' => trans('general.form.select.field', ['field' => trans_choice('general.categories', 1)])])) !!}
{!! $errors->first('category_id', '

:message

') !!}
@stack('category_id_input_end') {{ Form::recurring('create') }} {{ Form::fileGroup('attachment', trans('general.attachment')) }} {{ Form::hidden('vendor_name', old('vendor_name'), ['id' => 'vendor_name']) }} {{ Form::hidden('vendor_email', old('vendor_email'), ['id' => 'vendor_email']) }} {{ Form::hidden('vendor_tax_number', old('vendor_tax_number'), ['id' => 'vendor_tax_number']) }} {{ Form::hidden('vendor_phone', old('vendor_phone'), ['id' => 'vendor_phone']) }} {{ Form::hidden('vendor_address', old('vendor_address'), ['id' => 'vendor_address']) }} {{ Form::hidden('currency_rate', old('currency_rate'), ['id' => 'currency_rate']) }} {{ Form::hidden('bill_status_code', old('bill_status_code', 'draft'), ['id' => 'bill_status_code']) }} {{ Form::hidden('amount', old('amount', '0'), ['id' => 'amount']) }}
{!! Form::close() !!}
@endsection @push('js') @if (language()->getShortCode() != 'en') @endif @endpush @push('css') @endpush @push('stylesheet') @endpush @push('scripts') @endpush