@extends('layouts.admin') @section('title', trans('general.title.edit', ['type' => trans_choice('general.bills', 1)])) @section('content')
{!! Form::model($bill, ['method' => 'PATCH', 'files' => true, 'url' => ['expenses/bills', $bill->id], 'role' => 'form']) !!}
{{ Form::selectGroup('vendor_id', trans_choice('general.vendors', 1), 'user', $vendors) }} {{ Form::selectGroup('currency_code', trans_choice('general.currencies', 1), 'exchange', $currencies) }} {{ 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::parse($bill->billed_at)->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::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']) !!}
@foreach($bill->items as $item) @endforeach @if (empty($bill->items)) @endif
{{ trans('general.actions') }} {{ trans('general.name') }} {{ trans('bills.quantity') }} {{ trans('bills.price') }} {{ trans_choice('general.taxes', 1) }} {{ trans('bills.total') }}
{!! Form::select('item[' . $item_row . '][tax_id]', $taxes, $item->tax_id, ['id'=> 'item-tax-'. $item_row, 'class' => 'form-control select2', 'placeholder' => trans('general.form.enter', ['field' => trans_choice('general.taxes', 1)])]) !!} @money($item->total, $bill->currency_code, true)
{!! Form::select('item[' . $item_row . '][tax_id]', $taxes, null, ['id'=> 'item-tax-'. $item_row, 'class' => 'form-control tax-select2', 'placeholder' => trans('general.form.select.field', ['field' => trans_choice('general.taxes', 1)])]) !!} 0
{{ 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)) }} {{ Form::selectGroup('category_id', trans_choice('general.categories', 1), 'folder-open-o', $categories) }} {{ Form::recurring('edit', $bill) }} {{ Form::fileGroup('attachment', trans('general.attachment'),[]) }} {{ Form::hidden('vendor_name', null, ['id' => 'vendor_name']) }} {{ Form::hidden('vendor_email', null, ['id' => 'vendor_email']) }} {{ Form::hidden('vendor_tax_number', null, ['id' => 'vendor_tax_number']) }} {{ Form::hidden('vendor_phone', null, ['id' => 'vendor_phone']) }} {{ Form::hidden('vendor_address', null, ['id' => 'vendor_address']) }} {{ Form::hidden('currency_rate', null, ['id' => 'currency_rate']) }} {{ Form::hidden('bill_status_code', null, ['id' => 'bill_status_code']) }} {{ Form::hidden('amount', null, ['id' => 'amount']) }}
@permission('update-expenses-bills') @endpermission {!! Form::close() !!}
@endsection @push('js') @endpush @push('css') @endpush @push('scripts') @endpush