@lang('sales/customer_invoice.document_title')

@include('flash::message') @if ($errors->any()) @endif

@lang('sales/customer_invoice.document_title_import')

@lang('sales/customer_invoice.text_import_subtitle')

{!! Form::open(['route' => 'customer-invoices/download-template-import','method' => 'POST','class' => '','role' => 'form','id'=>'form1']) !!}
@foreach($import_results as $result) @endforeach
@lang('sales/customer.entry_taxid2') @lang('sales/customer.text_customer') @lang('sales/customer_invoice.entry_branch_office_id') @lang('sales/customer_invoice.entry_currency_id') @lang('sales/customer_invoice.entry_payment_term_id') @lang('sales/customer_invoice.entry_date_due') @lang('sales/customer_invoice.entry_salesperson_id') @lang('sales/customer_invoice.entry_payment_way_id') @lang('sales/customer_invoice.entry_payment_method_id') @lang('sales/customer_invoice.entry_cfdi_use_id') @lang('sales/customer_invoice.entry_cfdi_relation_id') @lang('sales/customer_invoice.entry_uuids') @lang('sales/customer_invoice.column_line_quantity') @lang('sales/customer_invoice.column_line_product_id') @lang('sales/customer_invoice.column_line_name') @lang('sales/customer_invoice.column_line_unit_measure_id') @lang('sales/customer_invoice.column_line_sat_product_id') @lang('sales/customer_invoice.column_line_price_unit') @lang('sales/customer_invoice.text_includes_iva') @lang('sales/customer_invoice.column_line_taxes') @lang('sales/customer_invoice.column_line_numero_pedimento') @lang('sales/customer_invoice.column_line_send_mail')
{{$result->customer_taxid}} {{$result->customer}} {{$result->branch_office}} {{$result->currency}} {{$result->payment_term}} {{$result->date_due}} {{$result->salesperson}} {{$result->payment_way}} {{$result->payment_method}} {{$result->cfdi_use}} {{$result->cfdi_relation}} {{$result->uuids}} {{$result->quantity}} {{$result->product}} {{$result->name}} {{$result->unit_measure}} {{$result->sat_product}} {{$result->price_unit}} {{$result->includes_iva}} {{$result->taxes}} {{$result->numero_pedimento}} {{$result->send_mail}}
{!! html_entity_decode(Form::label('branch_office_id', __('sales/customer_invoice.entry_branch_office_id') . '', ['class' => 'control-label'])) !!} {!! Form::select('branch_office_id', $branch_offices,old('branch_office_id',\App\Models\Base\BranchOffice::where('company_id','=',\App\Helpers\Helper::defaultCompany()->id)->get()->first()->id), ['class' => 'form-control', 'placeholder' => __('general.text_select')]) !!}
{!! html_entity_decode(Form::label('payment_term_id', __('sales/customer_invoice.entry_payment_term_id') . '', ['class' => 'control-label'])) !!} {!! Form::select('payment_term_id', $payment_terms,old('payment_term_id'), ['class' => 'form-control', 'placeholder' => __('general.text_select')]) !!}
{!! html_entity_decode(Form::label('date_due', __('sales/customer_invoice.entry_date_due') . '', ['class' => 'control-label'])) !!}
{!! Form::text('date_due', old('date_due'), ['class' => 'form-control', 'placeholder' => __('sales/customer_invoice.entry_date_due'),'autocomplete'=>'off']) !!}
{!! html_entity_decode(Form::label('salesperson_id', __('sales/customer_invoice.entry_salesperson_id') . '', ['class' => 'control-label'])) !!} {!! Form::select('salesperson_id', $salespersons,old('salesperson_id'), ['class' => 'form-control', 'placeholder' => __('general.text_select')]) !!}
{!! html_entity_decode(Form::label('payment_way_id', __('sales/customer_invoice.entry_payment_way_id') . '', ['class' => 'control-label'])) !!} {!! Form::select('payment_way_id', $payment_ways,old('payment_way_id'), ['class' => 'form-control', 'placeholder' => __('general.text_select')]) !!}
{!! html_entity_decode(Form::label('payment_method_id', __('sales/customer_invoice.entry_payment_method_id') . '', ['class' => 'control-label'])) !!} {!! Form::select('payment_method_id', $payment_methods,old('payment_method_id'), ['class' => 'form-control', 'placeholder' => __('general.text_select')]) !!}
{!! html_entity_decode(Form::label('cfdi_use_id', __('sales/customer_invoice.entry_cfdi_use_id') . '', ['class' => 'control-label'])) !!} {!! Form::select('cfdi_use_id', $cfdi_uses,old('cfdi_use_id'), ['class' => 'form-control', 'placeholder' => __('general.text_select')]) !!}
{!! html_entity_decode(Form::label('cfdi_relation_id', __('sales/customer_invoice.entry_cfdi_relation_id') . '', ['class' => 'control-label'])) !!} {!! Form::select('cfdi_relation_id', $cfdi_relations,old('cfdi_relation_id'), ['class' => 'form-control', 'placeholder' => __('general.text_select')]) !!}
@php $tmp_products = []; if(!empty(old('product_id'))){ $tmp_products = \App\Models\Catalogs\Product::where('id','=',old('product_id'))->get()->pluck('text_select2','id'); } @endphp {!! html_entity_decode(Form::label('product_id', __('sales/customer_invoice.column_line_product_id') . '', ['class' => 'control-label'])) !!}
{!! Form::select('product_id', $tmp_products,old('product_id'), ['class' => 'form-control', 'placeholder' => __('general.text_select')]) !!}
@php $tmp_unit_measures = []; if(!empty(old('unit_measure_id'))){ $tmp_unit_measures = \App\Models\Catalogs\UnitMeasure::where('id','=',old('unit_measure_id'))->get()->pluck('text_select2','id'); } @endphp {!! html_entity_decode(Form::label('unit_measure_id', __('sales/customer_invoice.column_line_unit_measure_id') . '', ['class' => 'control-label'])) !!}
{!! Form::select('unit_measure_id', $tmp_unit_measures,old('unit_measure_id'), ['class' => 'form-control', 'placeholder' => __('general.text_select')]) !!}
@php $tmp_sat_products = []; if(!empty(old('sat_product_id'))){ $tmp_sat_products = \App\Models\Catalogs\SatProduct::where('id','=',old('sat_product_id'))->get()->pluck('text_select2','id'); } @endphp {!! html_entity_decode(Form::label('sat_product_id', __('sales/customer_invoice.column_line_sat_product_id') . '', ['class' => 'control-label'])) !!}
{!! Form::select('sat_product_id', $tmp_sat_products,old('sat_product_id'), ['class' => 'form-control', 'placeholder' => __('general.text_select')]) !!}
{!! html_entity_decode(Form::label('quantity', __('sales/customer_invoice.column_line_quantity') . '', ['class' => 'control-label'])) !!} {!! Form::number('quantity', old('quantity'), ['class' => 'form-control', 'placeholder' => __('sales/customer_invoice.column_line_quantity'), 'step' => 'any']) !!}
{!! html_entity_decode(Form::label('price_unit', __('sales/customer_invoice.column_line_price_unit') . '', ['class' => 'control-label'])) !!} {!! Form::number('price_unit', old('price_unit'), ['class' => 'form-control', 'placeholder' => __('sales/customer_invoice.column_line_price_unit'), 'step' => 'any']) !!}
{!! html_entity_decode(Form::label('includes_iva', __('sales/customer_invoice.text_includes_iva') , ['class' => 'control-label'])) !!}
{!! html_entity_decode(Form::label('taxes[]', __('sales/customer_invoice.column_line_taxes') . '', ['class' => 'control-label'])) !!} {!! Form::select('taxes[]', $taxes,old('taxes'), ['class' => 'form-control my-select2','multiple' => 'multiple','id' => 'taxes']) !!}
{!! html_entity_decode(Form::label('name', __('sales/customer_invoice.column_line_name') . '', ['class' => 'control-label'])) !!} {!! Form::textarea('name', old('name'), ['class' => 'form-control', 'placeholder' => __('sales/customer_invoice.column_line_name'),'rows' => '8']) !!}
{!! Form::close() !!} {!! Form::open(['route' => 'customer-invoices/import','method' => 'POST','class' => '','role' => 'form','id'=>'form','files' => true]) !!}

@lang('general.help_upload_file')

{!! Form::close() !!}