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

:message

') !!}
@stack('customer_id_input_end') {{ Form::selectGroup('currency_code', trans_choice('general.currencies', 1), 'exchange', $currencies, setting('general.default_currency')) }} {{ Form::textGroup('invoiced_at', trans('invoices.invoice_date'), 'calendar',['id' => 'invoiced_at', 'class' => 'form-control', 'required' => 'required', 'data-inputmask' => '\'alias\': \'yyyy/mm/dd\'', 'data-mask' => '', 'autocomplete' => 'off'], Date::now()->toDateString()) }} {{ Form::textGroup('due_at', trans('invoices.due_date'), 'calendar',['id' => 'due_at', 'class' => 'form-control', 'required' => 'required', 'data-inputmask' => '\'alias\': \'yyyy/mm/dd\'', 'data-mask' => '', 'autocomplete' => 'off']) }} {{ Form::textGroup('invoice_number', trans('invoices.invoice_number'), 'file-text-o', ['required' => 'required'], $number) }} {{ Form::textGroup('order_number', trans('invoices.order_number'), 'shopping-cart', []) }}
{!! Form::label('items', trans_choice($text_override['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('incomes.invoices.item') @php $item_row++; @endphp @endforeach @else @include('incomes.invoices.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($text_override['quantity']) }}{{ trans($text_override['price']) }}{{ trans_choice('general.taxes', 1) }}{{ trans('invoices.total') }}
{{ trans('invoices.sub_total') }} 0
{{ trans('invoices.add_discount') }} {!! Form::hidden('discount', null, ['id' => 'discount', 'class' => 'form-control text-right']) !!}
{{ trans_choice('general.taxes', 1) }} 0
{{ trans('invoices.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('customer_name', old('customer_name'), ['id' => 'customer_name']) }} {{ Form::hidden('customer_email', old('customer_email'), ['id' => 'customer_email']) }} {{ Form::hidden('customer_tax_number', old('customer_tax_number'), ['id' => 'customer_tax_number']) }} {{ Form::hidden('customer_phone', old('customer_phone'), ['id' => 'customer_phone']) }} {{ Form::hidden('customer_address', old('customer_address'), ['id' => 'customer_address']) }} {{ Form::hidden('currency_rate', old('currency_rate'), ['id' => 'currency_rate']) }} {{ Form::hidden('invoice_status_code', old('invoice_status_code', 'draft'), ['id' => 'invoice_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('scripts') @endpush