@lang('sales/customer_transfer.document_title')

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

{{ $customer_transfer->name }}

{!! Form::model($customer_transfer,['route' => ['customer-transfers.update',$customer_transfer->id],'method' => 'PUT','class' => '','role' => 'form','id' => 'form']) !!} {!! Form::hidden('amount_total_tmp', old('amount_total_tmp',0)) !!}
@if($tax_regimens->isNotEmpty())
{!! html_entity_decode(Form::label('tax_regimen_id', __('sales/customer_transfer.entry_tax_regimen_id') . ' ', ['class' => 'control-label'])) !!} {!! Form::select('tax_regimen_id', $tax_regimens,old('tax_regimen_id', !empty($customer_transfer->tax_regimen_id) ? $customer_transfer->tax_regimen_id : \App\Helpers\Helper::defaultCompany()->tax_regimen_id), ['class' => 'form-control', 'placeholder' => __('general.text_select')]) !!} @if ($errors->has('tax_regimen_id')) {{ $errors->first('tax_regimen_id') }} @endif
@endif
@php $tmp_customers = []; if(!empty(old('customer_id',$customer_transfer->customer_id))){ $tmp_customers = \App\Models\Sales\Customer::where('id','=',old('customer_id',$customer_transfer->customer_id))->get()->pluck('text_select2','id'); } @endphp {!! html_entity_decode(Form::label('customer_id', __('sales/customer_transfer.entry_customer_id') . ' *', ['class' => 'control-label'])) !!}
{!! Form::select('customer_id', $tmp_customers,old('customer_id'), ['class' => 'form-control', 'placeholder' => __('general.text_select'),'required','autofocus']) !!}
@if ($errors->has('customer_id')) {{ $errors->first('customer_id') }} @endif
{!! html_entity_decode(Form::label('tax_regimen_customer_id', __('sales/customer_transfer.entry_tax_regimen_customer_id') . '', ['class' => 'control-label'])) !!} {!! Form::select('tax_regimen_customer_id', $tax_regimen_customers,old('tax_regimen_customer_id'), ['class' => 'form-control', 'placeholder' => __('general.text_select')]) !!} @if ($errors->has('tax_regimen_customer_id')) {{ $errors->first('tax_regimen_customer_id') }} @endif
{!! html_entity_decode(Form::label('branch_office_id', __('sales/customer_transfer.entry_branch_office_id') . ' *', ['class' => 'control-label'])) !!} {!! Form::select('branch_office_id', $branch_offices,old('branch_office_id'), ['class' => 'form-control', 'placeholder' => __('general.text_select'),'required']) !!} @if ($errors->has('branch_office_id')) {{ $errors->first('branch_office_id') }} @endif
{!! html_entity_decode(Form::label('currency_id', __('sales/customer_transfer.entry_currency_id') . ' *', ['class' => 'control-label'])) !!} {!! Form::select('currency_id', $currencies,old('currency_id'), ['class' => 'form-control', 'placeholder' => __('general.text_select'),'required']) !!} @if ($errors->has('currency_id')) {{ $errors->first('currency_id') }} @endif
{!! html_entity_decode(Form::label('currency_value', __('sales/customer_transfer.entry_currency_value') . ' *', ['class' => 'control-label'])) !!} {!! Form::number('currency_value', old('currency_value',round($customer_transfer->currency_value,4)), ['class' => 'form-control text-center', 'placeholder' => __('sales/customer_transfer.entry_currency_value'),'required','step' => 'any']) !!} @if ($errors->has('currency_value')) {{ $errors->first('currency_value') }} @endif
{!! html_entity_decode(Form::label('date', __('sales/customer_transfer.entry_date') . ' *', ['class' => 'control-label'])) !!}
{!! Form::text('date', old('date',\App\Helpers\Helper::dateTime(Date::parse($customer_transfer->date))), ['class' => 'form-control', 'placeholder' => __('sales/customer_transfer.entry_date'),'required','autocomplete'=>'off']) !!}
@if ($errors->has('date')) {{ $errors->first('date') }} @endif
{!! html_entity_decode(Form::label('cfdi_use_id', __('sales/customer_transfer.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'),'required']) !!} @if ($errors->has('cfdi_use_id')) {{ $errors->first('cfdi_use_id') }} @endif
{!! html_entity_decode(Form::label('payment_term_id', __('sales/customer_transfer.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'),'required']) !!} @if ($errors->has('payment_term_id')) {{ $errors->first('payment_term_id') }} @endif
{!! html_entity_decode(Form::label('date_due', __('sales/customer_transfer.entry_date_due') . '', ['class' => 'control-label'])) !!}
{!! Form::text('date_due', old('date_due',\App\Helpers\Helper::date(Date::parse($customer_transfer->date_due))), ['class' => 'form-control', 'placeholder' => __('sales/customer_transfer.entry_date_due'),'autocomplete'=>'off']) !!}
@if ($errors->has('date_due')) {{ $errors->first('date_due') }} @endif
{!! html_entity_decode(Form::label('payment_way_id', __('sales/customer_transfer.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')]) !!} @if ($errors->has('payment_way_id')) {{ $errors->first('payment_way_id') }} @endif
{!! html_entity_decode(Form::label('payment_method_id', __('sales/customer_transfer.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')]) !!} @if ($errors->has('payment_method_id')) {{ $errors->first('payment_method_id') }} @endif
{!! html_entity_decode(Form::label('salesperson_id', __('sales/customer_transfer.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('document_type2', __('sales/customer_transfer.entry_document_type2') . ' *', ['class' => 'control-label'])) !!} {!! Form::select('document_type2', $list_document_type2,old('document_type2'), ['class' => 'form-control', 'placeholder' => __('general.text_select'),'required']) !!} @if ($errors->has('document_type2')) {{ $errors->first('document_type2') }} @endif
{!! html_entity_decode(Form::label('trans_transport_type_id', __('sales/customer_transfer.entry_trans_transport_type_id') . ' *', ['class' => 'control-label'])) !!} {!! Form::select('trans_transport_type_id', $transport_types,old('transport_type_id',($customer_transfer_transfer->trans_transport_type_id ?? '')), ['class' => 'form-control', 'placeholder' => __('general.text_select'), 'required']) !!} @if ($errors->has('trans_transport_type_id')) {{ $errors->first('trans_transport_type_id') }} @endif
{!! html_entity_decode(Form::label('transport_int', __('sales/customer_transfer.entry_transport_int') . ' *', ['class' => 'control-label'])) !!} {!! Form::select('transport_int', $yes_nos,old('transport_int',($customer_transfer_transfer->transport_int ?? 'No')), ['class' => 'form-control', 'placeholder' => __('general.text_select'),'required']) !!} @if ($errors->has('transport_int')) {{ $errors->first('transport_int') }} @endif
{!! html_entity_decode(Form::label('in_out_product', __('sales/customer_transfer.entry_in_out_product') . '', ['class' => 'control-label'])) !!} {!! Form::select('in_out_product', $in_out_products,old('in_out_product',($customer_transfer_transfer->in_out_product ?? '')), ['class' => 'form-control', 'placeholder' => __('general.text_select')]) !!} @if ($errors->has('in_out_product')) {{ $errors->first('in_out_product') }} @endif
{!! html_entity_decode(Form::label('in_out_country_id', __('sales/customer_transfer.entry_in_out_country_id') . '', ['class' => 'control-label'])) !!} {!! Form::select('in_out_country_id', $countries2,old('in_out_country_id',($customer_transfer_transfer->in_out_country_id ?? 'No')), ['class' => 'form-control', 'placeholder' => __('general.text_select')]) !!} @if ($errors->has('in_out_country_id')) {{ $errors->first('in_out_country_id') }} @endif
{!! html_entity_decode(Form::label('transport_type_id', __('sales/customer_transfer.entry_transport_type_id') . '', ['class' => 'control-label'])) !!} {!! Form::select('transport_type_id', $transport_types,old('transport_type_id',($customer_transfer_transfer->transport_type_id ?? '')), ['class' => 'form-control', 'placeholder' => __('general.text_select')]) !!} @if ($errors->has('transport_type_id')) {{ $errors->first('transport_type_id') }} @endif
@if(!empty(setting('enabled_projects')))
{!! html_entity_decode(Form::label('project_id', __('sales/customer_transfer.entry_project_id') . '', ['class' => 'control-label'])) !!} {!! Form::select('project_id', $projects,old('project_id'), ['class' => 'form-control', 'placeholder' => __('general.text_select')]) !!} @if ($errors->has('project_id')) {{ $errors->first('project_id') }} @endif
@endif
@if ($errors->has('item')) {{ $errors->first('item') }} @endif
@if ($errors->has('item_transfer')) {{ $errors->first('item_transfer') }} @endif

{!! html_entity_decode(Form::label('compensation', __('sales/customer_transfer.entry_compensation') . '', ['class' => 'control-label'])) !!} {!! Form::textarea('compensation', old('compensation'), ['class' => 'form-control', 'placeholder' => __('sales/customer_transfer.entry_compensation'),'rows' => '2']) !!} @if ($errors->has('compensation')) {{ $errors->first('compensation') }} @endif
{!! html_entity_decode(Form::label('comment', __('sales/customer_transfer.entry_comment') . '', ['class' => 'control-label'])) !!} {!! Form::textarea('comment', old('comment'), ['class' => 'form-control', 'placeholder' => __('sales/customer_transfer.entry_comment'),'rows' => '2']) !!} @if ($errors->has('comment')) {{ $errors->first('comment') }} @endif
{!! html_entity_decode(Form::label('vehicle_counter', __('sales/customer_transfer.entry_vehicle_counter') . '', ['class' => 'control-label'])) !!} {!! Form::text('vehicle_counter', old('vehicle_counter'), ['class' => 'form-control', 'placeholder' => __('sales/customer_transfer.entry_vehicle_counter')]) !!} @if ($errors->has('vehicle_counter')) {{ $errors->first('vehicle_counter') }} @endif
{!! html_entity_decode(Form::label('source_date', __('sales/customer_transfer.entry_source_date') . ' *', ['class' => 'control-label'])) !!}
{!! Form::text('source_date', old('source_date', \App\Helpers\Helper::dateTime(Date::parse($customer_transfer_transfer->source_date))), ['class' => 'form-control', 'placeholder' => __('sales/customer_transfer.entry_source_date'),'required','autocomplete'=>'off']) !!}
@if ($errors->has('source_date')) {{ $errors->first('source_date') }} @endif
{!! html_entity_decode(Form::label('source_taxid', __('sales/customer_transfer.entry_source_taxid') . ' *', ['class' => 'control-label'])) !!} {!! Form::text('source_taxid', old('source_taxid',($customer_transfer_transfer->source_taxid ?? '')), ['class' => 'form-control', 'placeholder' => __('sales/customer_transfer.entry_source_taxid'), 'required']) !!} @if ($errors->has('source_taxid')) {{ $errors->first('source_taxid') }} @endif
{!! html_entity_decode(Form::label('source_name', __('sales/customer_transfer.entry_source_name') . '', ['class' => 'control-label'])) !!} {!! Form::text('source_name', old('source_name',($customer_transfer_transfer->source_name ?? '')), ['class' => 'form-control', 'placeholder' => __('sales/customer_transfer.entry_source_name')]) !!} @if ($errors->has('source_name')) {{ $errors->first('source_name') }} @endif
{!! html_entity_decode(Form::label('source_tr_country_id', __('sales/customer_transfer.entry_source_tr_country_id') . '', ['class' => 'control-label'])) !!} {!! Form::select('source_tr_country_id', $countries2,old('source_tr_country_id',($customer_transfer_transfer->source_tr_country_id ?? '')), ['class' => 'form-control my-select2', 'placeholder' => __('general.text_select')]) !!} @if ($errors->has('source_tr_country_id')) {{ $errors->first('source_tr_country_id') }} @endif
{!! html_entity_decode(Form::label('source_numid', __('sales/customer_transfer.entry_source_numid') . '', ['class' => 'control-label'])) !!} {!! Form::text('source_numid', old('source_numid',($customer_transfer_transfer->source_numid ?? '')), ['class' => 'form-control', 'placeholder' => __('sales/customer_transfer.entry_source_numid')]) !!} @if ($errors->has('source_numid')) {{ $errors->first('source_numid') }} @endif

{!! html_entity_decode(Form::label('source_address_1', __('sales/customer_transfer.entry_source_address_1') . '', ['class' => 'control-label'])) !!} {!! Form::text('source_address_1', old('source_address_1',($customer_transfer_transfer->source_address_1 ?? '')), ['class' => 'form-control', 'placeholder' => __('sales/customer_transfer.entry_source_address_1')]) !!}
{!! html_entity_decode(Form::label('source_address_2', __('sales/customer_transfer.entry_source_address_2') . '', ['class' => 'control-label'])) !!} {!! Form::text('source_address_2', old('source_address_2',($customer_transfer_transfer->source_address_2 ?? '')), ['class' => 'form-control', 'placeholder' => __('sales/customer_transfer.entry_source_address_2')]) !!}
{!! html_entity_decode(Form::label('source_address_3', __('sales/customer_transfer.entry_source_address_3') . '', ['class' => 'control-label'])) !!} {!! Form::text('source_address_3', old('source_address_3',($customer_transfer_transfer->source_address_3 ?? '')), ['class' => 'form-control', 'placeholder' => __('sales/customer_transfer.entry_source_address_3')]) !!}
{!! html_entity_decode(Form::label('source_address_4', __('sales/customer_transfer.entry_source_address_4') . '', ['class' => 'control-label'])) !!} {!! Form::text('source_address_4', old('source_address_4',($customer_transfer_transfer->source_address_4 ?? '')), ['class' => 'form-control', 'placeholder' => __('sales/customer_transfer.entry_source_address_4')]) !!}
{!! html_entity_decode(Form::label('source_address_5', __('sales/customer_transfer.entry_source_address_5') . '', ['class' => 'control-label'])) !!} {!! Form::text('source_address_5', old('source_address_5',($customer_transfer_transfer->source_address_5 ?? '')), ['class' => 'form-control', 'placeholder' => __('sales/customer_transfer.entry_source_address_5')]) !!}
{!! html_entity_decode(Form::label('source_address_6', __('sales/customer_transfer.entry_source_address_6') . '', ['class' => 'control-label'])) !!} {!! Form::text('source_address_6', old('source_address_6',($customer_transfer_transfer->source_address_6 ?? '')), ['class' => 'form-control', 'placeholder' => __('sales/customer_transfer.entry_source_address_6')]) !!}
{!! html_entity_decode(Form::label('source_country_id', __('sales/customer_transfer.entry_source_country_id') . ' *', ['class' => 'control-label'])) !!} {!! Form::select('source_country_id', $countries,old('source_country_id',($customer_transfer_transfer->source_country_id ?? \App\Models\Catalogs\Country::whereCode('MEX')->first()->id)), ['class' => 'form-control my-select2', 'placeholder' => __('general.text_select'),'required']) !!} @if ($errors->has('source_country_id')) {{ $errors->first('source_country_id') }} @endif
{!! html_entity_decode(Form::label('source_state_id', __('sales/customer_transfer.entry_source_state_id') . ' *', ['class' => 'control-label'])) !!} {!! Form::select('source_state_id', [],null, ['class' => 'form-control my-select2', 'placeholder' => __('general.text_select'),'required']) !!}
{!! html_entity_decode(Form::label('source_city_id', __('sales/customer_transfer.entry_source_city_id') . '', ['class' => 'control-label'])) !!} {!! Form::select('source_city_id', [],null, ['class' => 'form-control my-select2', 'placeholder' => __('general.text_select')]) !!}
{!! html_entity_decode(Form::label('source_postcode', __('sales/customer_transfer.entry_source_postcode') . ' *', ['class' => 'control-label'])) !!} {!! Form::text('source_postcode', old('source_postcode', ($customer_transfer_transfer->source_postcode ?? '')), ['class' => 'form-control', 'placeholder' => __('sales/customer_transfer.entry_source_postcode'),'required']) !!}
{!! html_entity_decode(Form::label('destination_date', __('sales/customer_transfer.entry_destination_date') . ' *', ['class' => 'control-label'])) !!}
{!! Form::text('destination_date', old('destination_date',\App\Helpers\Helper::dateTime(Date::parse($customer_transfer_transfer->destination_date))), ['class' => 'form-control', 'placeholder' => __('sales/customer_transfer.entry_destination_date'),'required','autocomplete'=>'off']) !!}
@if ($errors->has('destination_date')) {{ $errors->first('destination_date') }} @endif
{!! html_entity_decode(Form::label('destination_distance_traveled', __('sales/customer_transfer.entry_destination_distance_traveled') . ' *', ['class' => 'control-label'])) !!} {!! Form::number('destination_distance_traveled', old('destination_distance_traveled',($customer_transfer_transfer->destination_distance_traveled ?? '')), ['class' => 'form-control', 'placeholder' => __('sales/customer_transfer.entry_destination_distance_traveled'), 'step' => 'any', 'required', 'autocomplete' => 'off']) !!} @if ($errors->has('destination_distance_traveled')) {{ $errors->first('destination_distance_traveled') }} @endif
{!! html_entity_decode(Form::label('destination_taxid', __('sales/customer_transfer.entry_destination_taxid') . ' *', ['class' => 'control-label'])) !!} {!! Form::text('destination_taxid', old('destination_taxid',($customer_transfer_transfer->destination_taxid ?? '')), ['class' => 'form-control', 'placeholder' => __('sales/customer_transfer.entry_destination_taxid'), 'required']) !!} @if ($errors->has('destination_taxid')) {{ $errors->first('destination_taxid') }} @endif
{!! html_entity_decode(Form::label('destination_name', __('sales/customer_transfer.entry_destination_name') . '', ['class' => 'control-label'])) !!} {!! Form::text('destination_name', old('destination_name',($customer_transfer_transfer->destination_name ?? '')), ['class' => 'form-control', 'placeholder' => __('sales/customer_transfer.entry_destination_name')]) !!} @if ($errors->has('destination_name')) {{ $errors->first('destination_name') }} @endif
{!! html_entity_decode(Form::label('destination_tr_country_id', __('sales/customer_transfer.entry_destination_tr_country_id') . '', ['class' => 'control-label'])) !!} {!! Form::select('destination_tr_country_id', $countries2,old('destination_tr_country_id',($customer_transfer_transfer->destination_tr_country_id ?? '')), ['class' => 'form-control my-select2', 'placeholder' => __('general.text_select')]) !!} @if ($errors->has('destination_tr_country_id')) {{ $errors->first('destination_tr_country_id') }} @endif
{!! html_entity_decode(Form::label('destination_numid', __('sales/customer_transfer.entry_destination_numid') . '', ['class' => 'control-label'])) !!} {!! Form::text('destination_numid', old('destination_numid',($customer_transfer_transfer->destination_numid ?? '')), ['class' => 'form-control', 'placeholder' => __('sales/customer_transfer.entry_destination_numid')]) !!} @if ($errors->has('destination_numid')) {{ $errors->first('destination_numid') }} @endif

{!! html_entity_decode(Form::label('destination_address_1', __('sales/customer_transfer.entry_destination_address_1') . '', ['class' => 'control-label'])) !!} {!! Form::text('destination_address_1', old('destination_address_1',($customer_transfer_transfer->destination_address_1 ?? '')), ['class' => 'form-control', 'placeholder' => __('sales/customer_transfer.entry_destination_address_1')]) !!}
{!! html_entity_decode(Form::label('destination_address_2', __('sales/customer_transfer.entry_destination_address_2') . '', ['class' => 'control-label'])) !!} {!! Form::text('destination_address_2', old('destination_address_2',($customer_transfer_transfer->destination_address_2 ?? '')), ['class' => 'form-control', 'placeholder' => __('sales/customer_transfer.entry_destination_address_2')]) !!}
{!! html_entity_decode(Form::label('destination_address_3', __('sales/customer_transfer.entry_destination_address_3') . '', ['class' => 'control-label'])) !!} {!! Form::text('destination_address_3', old('destination_address_3',($customer_transfer_transfer->destination_address_3 ?? '')), ['class' => 'form-control', 'placeholder' => __('sales/customer_transfer.entry_destination_address_3')]) !!}
{!! html_entity_decode(Form::label('destination_address_4', __('sales/customer_transfer.entry_destination_address_4') . '', ['class' => 'control-label'])) !!} {!! Form::text('destination_address_4', old('destination_address_4',($customer_transfer_transfer->destination_address_4 ?? '')), ['class' => 'form-control', 'placeholder' => __('sales/customer_transfer.entry_destination_address_4')]) !!}
{!! html_entity_decode(Form::label('destination_address_5', __('sales/customer_transfer.entry_destination_address_5') . '', ['class' => 'control-label'])) !!} {!! Form::text('destination_address_5', old('destination_address_5',($customer_transfer_transfer->destination_address_5 ?? '')), ['class' => 'form-control', 'placeholder' => __('sales/customer_transfer.entry_destination_address_5')]) !!}
{!! html_entity_decode(Form::label('destination_address_6', __('sales/customer_transfer.entry_destination_address_6') . '', ['class' => 'control-label'])) !!} {!! Form::text('destination_address_6', old('destination_address_6',($customer_transfer_transfer->destination_address_6 ?? '')), ['class' => 'form-control', 'placeholder' => __('sales/customer_transfer.entry_destination_address_6')]) !!}
{!! html_entity_decode(Form::label('destination_country_id', __('sales/customer_transfer.entry_destination_country_id') . ' *', ['class' => 'control-label'])) !!} {!! Form::select('destination_country_id', $countries,old('destination_country_id',($customer_transfer_transfer->destination_country_id ?? \App\Models\Catalogs\Country::whereCode('MEX')->first()->id)), ['class' => 'form-control my-select2', 'placeholder' => __('general.text_select'),'required']) !!} @if ($errors->has('destination_country_id')) {{ $errors->first('destination_country_id') }} @endif
{!! html_entity_decode(Form::label('destination_state_id', __('sales/customer_transfer.entry_destination_state_id') . ' *', ['class' => 'control-label'])) !!} {!! Form::select('destination_state_id', [],null, ['class' => 'form-control my-select2', 'placeholder' => __('general.text_select'),'required']) !!}
{!! html_entity_decode(Form::label('destination_city_id', __('sales/customer_transfer.entry_destination_city_id') . '', ['class' => 'control-label'])) !!} {!! Form::select('destination_city_id', [],null, ['class' => 'form-control my-select2', 'placeholder' => __('general.text_select')]) !!}
{!! html_entity_decode(Form::label('destination_postcode', __('sales/customer_transfer.entry_destination_postcode') . ' *', ['class' => 'control-label'])) !!} {!! Form::text('destination_postcode', old('destination_postcode', ($customer_transfer_transfer->destination_postcode ?? '')), ['class' => 'form-control', 'placeholder' => __('sales/customer_transfer.entry_destination_postcode'),'required']) !!}
@php $tmp_measure_packagings = []; if(!empty(old('measure_packaging_id',($customer_transfer_transfer->measure_packaging_id ?? '')))){ $tmp_measure_packagings = \App\Models\Catalogs\MeasurePackaging::where('id','=',old('measure_packaging_id',($customer_transfer_transfer->measure_packaging_id ?? '')))->get()->pluck('text_select2','id'); } @endphp {!! html_entity_decode(Form::label('measure_packaging_id', __('sales/customer_transfer.entry_measure_packaging_id') . ' *', ['class' => 'control-label'])) !!} {!! Form::select('measure_packaging_id', $tmp_measure_packagings,old('measure_packaging_id',($customer_transfer_transfer->measure_packaging_id ?? '')), ['class' => 'form-control', 'placeholder' => __('general.text_select'), 'required']) !!} @if ($errors->has('measure_packaging_id')) {{ $errors->first('measure_packaging_id') }} @endif
{!! html_entity_decode(Form::label('gross_weight', __('sales/customer_transfer.entry_gross_weight') . ' *', ['class' => 'control-label'])) !!} {!! Form::number('gross_weight', old('gross_weight',($customer_transfer_transfer->gross_weight ?? '')), ['class' => 'form-control', 'placeholder' => __('sales/customer_transfer.entry_gross_weight'), 'step' => 'any', 'autocomplete' => 'off', 'required']) !!} @if ($errors->has('gross_weight')) {{ $errors->first('gross_weight') }} @endif
{!! html_entity_decode(Form::label('net_weight', __('sales/customer_transfer.entry_net_weight') . '', ['class' => 'control-label'])) !!} {!! Form::number('net_weight', old('net_weight',($customer_transfer_transfer->net_weight ?? '')), ['class' => 'form-control', 'placeholder' => __('sales/customer_transfer.entry_net_weight'), 'step' => 'any', 'autocomplete' => 'off']) !!} @if ($errors->has('net_weight')) {{ $errors->first('net_weight') }} @endif
{!! html_entity_decode(Form::label('appraisal_fee', __('sales/customer_transfer.entry_appraisal_fee') . '', ['class' => 'control-label'])) !!} {!! Form::number('appraisal_fee', old('appraisal_fee',($customer_transfer_transfer->appraisal_fee ? round($customer_transfer_transfer->appraisal_fee,2) : '')), ['class' => 'form-control', 'placeholder' => __('sales/customer_transfer.entry_appraisal_fee'), 'step' => 'any', 'autocomplete' => 'off']) !!} @if ($errors->has('appraisal_fee')) {{ $errors->first('appraisal_fee') }} @endif
@php $item_transfer_row = 1; $items_transfer = old('item_transfer',$customer_transfer->customerActiveInvoiceLineTransfers); @endphp @foreach ($items_transfer as $item_transfer_row => $item) @php $item = !empty(old('item_transfer.' . $item_transfer_row . '')) ? (object) old('item_transfer.' . $item_transfer_row) : $item; $tmp_transfer_sat_products = []; if(!empty(old('item_transfer.' . $item_transfer_row . '.sat_product_id',$item->sat_product_id))){ $tmp_transfer_sat_products = \App\Models\Catalogs\SatProduct::where('id','=',old('item_transfer.' . $item_transfer_row . '.sat_product_id',$item->sat_product_id))->get()->pluck('description_select2','id'); } $tmp_transfer_unit_measures = []; if(!empty(old('item_transfer.' . $item_transfer_row . '.unit_measure_id',$item->unit_measure_id))){ $tmp_transfer_unit_measures = \App\Models\Catalogs\UnitMeasure::where('id','=',old('item_transfer.' . $item_transfer_row . '.unit_measure_id',$item->unit_measure_id))->get()->pluck('description_select2','id'); } $tmp_transfer_dangerous_products = []; if(!empty(old('item_transfer.' . $item_transfer_row . '.dangerous_product_id',$item->dangerous_product_id))){ $tmp_transfer_dangerous_products = \App\Models\Catalogs\DangerousProduct::where('id','=',old('item_transfer.' . $item_transfer_row . '.dangerous_product_id',$item->dangerous_product_id))->get()->pluck('description_select2','id'); } $tmp_transfer_tariff_fractions = []; if(!empty(old('item_transfer.' . $item_transfer_row . '.tariff_fraction_id',$item->tariff_fraction_id))){ $tmp_transfer_tariff_fractions = \App\Models\Catalogs\TariffFraction::where('id','=',old('item_transfer.' . $item_transfer_row . '.tariff_fraction_id',$item->tariff_fraction_id))->get()->pluck('description_select2','id'); } @endphp @endforeach @php $item_transfer_row++; @endphp
@lang('general.column_actions') @lang('sales/customer_transfer.column_line_transfer_sat_product_id') * @lang('sales/customer_transfer.column_line_transfer_name') * @lang('sales/customer_transfer.column_line_transfer_quantity') * @lang('sales/customer_transfer.column_line_transfer_unit_measure_id') * @lang('sales/customer_transfer.column_line_transfer_weight') * @lang('sales/customer_transfer.column_line_transfer_dangerous_product') @lang('sales/customer_transfer.column_line_transfer_packaging_type_id') @lang('sales/customer_transfer.column_line_transfer_dangerous_product_id') @lang('sales/customer_transfer.column_line_transfer_dimensions') @lang('sales/customer_transfer.column_line_transfer_amount_total') * @lang('sales/customer_transfer.column_line_transfer_currency_id') * @lang('sales/customer_transfer.column_line_transfer_tariff_fraction_id') @lang('sales/customer_transfer.column_line_transfer_uuid_ext') @lang('sales/customer_transfer.column_line_transfer_petition')
{!! Form::select('item_transfer[' . $item_transfer_row . '][sat_product_id]', $tmp_transfer_sat_products,old('item_transfer.' . $item_transfer_row . '.sat_product_id',$item->sat_product_id), ['class' => 'form-control input-sm col-transfer-sat-product-id', 'placeholder' => __('general.text_select'),'id' => 'item_transfer_sat_product_id_' . $item_transfer_row, 'required']) !!} @if ($errors->has('item_transfer.'.$item_transfer_row.'.sat_product_id')) {{ $errors->first('item_transfer.'.$item_transfer_row.'.sat_product_id') }} @endif
{!! Form::textarea('item_transfer[' . $item_transfer_row . '][name]', old('item_transfer.' . $item_transfer_row . '.name',$item->name), ['class' => 'form-control input-sm ym-auto-resize col-transfer-name-id', 'required','autocomplete'=>'off','id' => 'item_transfer_name_' . $item_transfer_row, 'placeholder' => __('sales/customer_transfer.column_line_transfer_name'),'rows' => 2, 'maxlength' => 1000]) !!} @if ($errors->has('item_transfer.'.$item_transfer_row.'.name')) {{ $errors->first('item_transfer.'.$item_transfer_row.'.name') }} @endif
{!! Form::number('item_transfer[' . $item_transfer_row . '][quantity]', old('item_transfer.' . $item_transfer_row . '.quantity',round($item->quantity,5)), ['class' => 'form-control input-sm text-right col-transfer-quantity','id' => 'item_transfer_quantity_' . $item_transfer_row, 'step' => 'any', 'required']) !!} @if ($errors->has('item_transfer.'.$item_transfer_row.'.quantity')) {{ $errors->first('item_transfer.'.$item_transfer_row.'.quantity') }} @endif
{!! Form::select('item_transfer[' . $item_transfer_row . '][unit_measure_id]', $tmp_transfer_unit_measures,old('item_transfer.' . $item_transfer_row . '.unit_measure_id',$item->unit_measure_id), ['class' => 'form-control input-sm col-transfer-unit-measure-id', 'placeholder' => __('general.text_select'),'id' => 'item_transfer_unit_measure_id_' . $item_transfer_row, 'required']) !!} @if ($errors->has('item_transfer.'.$item_transfer_row.'.unit_measure_id')) {{ $errors->first('item_transfer.'.$item_transfer_row.'.unit_measure_id') }} @endif
{!! Form::number('item_transfer[' . $item_transfer_row . '][weight]', old('item_transfer.' . $item_transfer_row . '.weight',$item->weight), ['class' => 'form-control input-sm text-center col-transfer-weight','id' => 'item_transfer_weight_' . $item_transfer_row]) !!} @if ($errors->has('item_transfer.'.$item_transfer_row.'.weight')) {{ $errors->first('item_transfer.'.$item_transfer_row.'.weight') }} @endif
{!! Form::select('item_transfer[' . $item_transfer_row . '][dangerous_product]', $yes_nos,old('item_transfer.' . $item_transfer_row . '.dangerous_product',$item->dangerous_product), ['class' => 'form-control input-sm col-transfer-dangerous-product', 'placeholder' => __('general.text_select'),'id' => 'item_transfer_dangerous_product_' . $item_transfer_row]) !!} @if ($errors->has('item_transfer.'.$item_transfer_row.'.dangerous_product')) {{ $errors->first('item_transfer.'.$item_transfer_row.'.dangerous_product') }} @endif
{!! Form::select('item_transfer[' . $item_transfer_row . '][packaging_type_id]', $packaging_types,old('item_transfer.' . $item_transfer_row . '.packaging_type_id',$item->packaging_type_id), ['class' => 'form-control input-sm my-select2 col-transfer-packaging-type-id', 'placeholder' => __('general.text_select'),'id' => 'item_transfer_packaging_type_id_' . $item_transfer_row]) !!} @if ($errors->has('item_transfer.'.$item_transfer_row.'.packaging_type_id')) {{ $errors->first('item_transfer.'.$item_transfer_row.'.packaging_type_id') }} @endif
{!! Form::select('item_transfer[' . $item_transfer_row . '][dangerous_product_id]', $tmp_transfer_dangerous_products,old('item_transfer.' . $item_transfer_row . '.dangerous_product_id',$item->dangerous_product_id), ['class' => 'form-control input-sm col-transfer-dangerous-product-id', 'placeholder' => __('general.text_select'),'id' => 'item_transfer_dangerous_product_id_' . $item_transfer_row]) !!} @if ($errors->has('item_transfer.'.$item_transfer_row.'.dangerous_product_id')) {{ $errors->first('item_transfer.'.$item_transfer_row.'.dangerous_product_id') }} @endif
{!! Form::text('item_transfer[' . $item_transfer_row . '][dimensions]', old('item_transfer.' . $item_transfer_row . '.dimensions',$item->dimensions), ['class' => 'form-control input-sm col-transfer-dimensions','id' => 'item_transfer_dimensions_' . $item_transfer_row]) !!} @if ($errors->has('item_transfer.'.$item_transfer_row.'.dimensions')) {{ $errors->first('item.'.$item_transfer_row.'.dimensions') }} @endif
{!! Form::number('item_transfer[' . $item_transfer_row . '][amount_total]', old('item_transfer.' . $item_transfer_row . '.amount_total',round($item->amount_total,2)), ['class' => 'form-control input-sm text-right col-transfer-amount_total','id' => 'item_transfer_amount_total_' . $item_transfer_row, 'step' => 'any']) !!} @if ($errors->has('item_transfer.'.$item_transfer_row.'.amount_total')) {{ $errors->first('item.'.$item_transfer_row.'.amount_total') }} @endif
{!! Form::select('item_transfer[' . $item_transfer_row . '][currency_id]', $currencies,old('item_transfer.' . $item_transfer_row . '.currency_id',$item->currency_id), ['class' => 'form-control input-sm col-transfer-currency-id', 'placeholder' => __('general.text_select'),'id' => 'item_transfer_currency_id_' . $item_transfer_row]) !!} @if ($errors->has('item_transfer.'.$item_transfer_row.'.currency_id')) {{ $errors->first('item_transfer.'.$item_transfer_row.'.currency_id') }} @endif
{!! Form::select('item_transfer[' . $item_transfer_row . '][tariff_fraction_id]', $tmp_transfer_tariff_fractions,old('item_transfer.' . $item_transfer_row . '.tariff_fraction_id',$item->tariff_fraction_id), ['class' => 'form-control input-sm col-transfer-tariff-fraction-id', 'placeholder' => __('general.text_select'),'id' => 'item_transfer_tariff_fraction_id_' . $item_transfer_row]) !!} @if ($errors->has('item_transfer.'.$item_transfer_row.'.tariff_fraction_id')) {{ $errors->first('item_transfer.'.$item_transfer_row.'.tariff_fraction_id') }} @endif
{!! Form::text('item_transfer[' . $item_transfer_row . '][uuid_ext]', old('item_transfer.' . $item_transfer_row . '.uuid_ext',$item->uuid_ext), ['class' => 'form-control input-sm col-transfer-uuid-ext','id' => 'item_transfer_uuid_ext_' . $item_transfer_row]) !!} @if ($errors->has('item_transfer.'.$item_transfer_row.'.uuid_ext')) {{ $errors->first('item.'.$item_transfer_row.'.uuid_ext') }} @endif
{!! Form::text('item_transfer[' . $item_transfer_row . '][petition]', old('item_transfer.' . $item_transfer_row . '.petition',$item->petition), ['class' => 'form-control input-sm col-transfer-uuid-ext','id' => 'item_transfer_petition_' . $item_transfer_row, 'maxlength' => 21]) !!} @if ($errors->has('item_transfer.'.$item_transfer_row.'.petition')) {{ $errors->first('item.'.$item_transfer_row.'.petition') }} @endif

{{__('sales/customer_transfer.text_transport_type_01')}}

{!! html_entity_decode(Form::label('permit_type_id', __('sales/customer_transfer.entry_permit_type_id') . ' *', ['class' => 'control-label'])) !!} {!! Form::select('permit_type_id', $permit_types,old('permit_type_id',($customer_transfer_transfer->permit_type_id ?? '')), ['class' => 'form-control', 'placeholder' => __('general.text_select'), 'required']) !!} @if ($errors->has('permit_type_id')) {{ $errors->first('permit_type_id') }} @endif
{!! html_entity_decode(Form::label('permit_number', __('sales/customer_transfer.entry_permit_number') . ' *', ['class' => 'control-label'])) !!} {!! Form::text('permit_number', old('permit_number',($customer_transfer_transfer->permit_number ?? '')), ['class' => 'form-control', 'placeholder' => __('sales/customer_transfer.entry_permit_number'), 'required', 'maxlength' => 50]) !!} @if ($errors->has('permit_number')) {{ $errors->first('permit_number') }} @endif
{!! html_entity_decode(Form::label('setting_transport_id', __('sales/customer_transfer.entry_setting_transport_id') . ' *', ['class' => 'control-label'])) !!} {!! Form::select('setting_transport_id', $setting_transports,old('setting_transport_id',($customer_transfer_transfer->setting_transport_id ?? '')), ['class' => 'form-control', 'placeholder' => __('general.text_select'), 'required']) !!} @if ($errors->has('setting_transport_id')) {{ $errors->first('setting_transport_id') }} @endif
{!! html_entity_decode(Form::label('vehicle', __('sales/customer_transfer.entry_vehicle') . ' *', ['class' => 'control-label'])) !!} {!! Form::number('vehicle', old('vehicle',($customer_transfer_transfer->vehicle ?? '')), ['class' => 'form-control', 'placeholder' => __('sales/customer_transfer.entry_vehicle'), 'required', 'maxlength' => 4]) !!} @if ($errors->has('vehicle')) {{ $errors->first('vehicle') }} @endif
{!! html_entity_decode(Form::label('vehicle_number', __('sales/customer_transfer.entry_vehicle_number') . ' *', ['class' => 'control-label'])) !!} {!! Form::text('vehicle_number', old('vehicle_number',($customer_transfer_transfer->vehicle_number ?? '')), ['class' => 'form-control', 'placeholder' => __('sales/customer_transfer.entry_vehicle_number'), 'required', 'maxlength' => 7]) !!} @if ($errors->has('vehicle_number')) {{ $errors->first('vehicle_number') }} @endif
{!! html_entity_decode(Form::label('name_insurer', __('sales/customer_transfer.entry_name_insurer') . ' *', ['class' => 'control-label'])) !!} {!! Form::text('name_insurer', old('name_insurer',($customer_transfer_transfer->name_insurer ?? '')), ['class' => 'form-control', 'placeholder' => __('sales/customer_transfer.entry_name_insurer'), 'required', 'maxlength' => 50]) !!} @if ($errors->has('name_insurer')) {{ $errors->first('name_insurer') }} @endif
{!! html_entity_decode(Form::label('policy_number', __('sales/customer_transfer.entry_policy_number') . ' *', ['class' => 'control-label'])) !!} {!! Form::text('policy_number', old('policy_number',($customer_transfer_transfer->policy_number ?? '')), ['class' => 'form-control', 'placeholder' => __('sales/customer_transfer.entry_policy_number'), 'required', 'maxlength' => 30]) !!} @if ($errors->has('policy_number')) {{ $errors->first('policy_number') }} @endif
{!! html_entity_decode(Form::label('name_insurer2', __('sales/customer_transfer.entry_name_insurer2') . '', ['class' => 'control-label'])) !!} {!! Form::text('name_insurer2', old('name_insurer2',($customer_transfer_transfer->name_insurer2 ?? '')), ['class' => 'form-control', 'placeholder' => __('sales/customer_transfer.entry_name_insurer2'), 'maxlength' => 50]) !!} @if ($errors->has('name_insurer2')) {{ $errors->first('name_insurer2') }} @endif
{!! html_entity_decode(Form::label('policy_number2', __('sales/customer_transfer.entry_policy_number2') . '', ['class' => 'control-label'])) !!} {!! Form::text('policy_number2', old('policy_number2',($customer_transfer_transfer->policy_number2 ?? '')), ['class' => 'form-control', 'placeholder' => __('sales/customer_transfer.entry_policy_number2'), 'maxlength' => 30]) !!} @if ($errors->has('policy_number2')) {{ $errors->first('policy_number2') }} @endif
{!! html_entity_decode(Form::label('name_insurer3', __('sales/customer_transfer.entry_name_insurer3') . '', ['class' => 'control-label'])) !!} {!! Form::text('name_insurer3', old('name_insurer3',($customer_transfer_transfer->name_insurer3 ?? '')), ['class' => 'form-control', 'placeholder' => __('sales/customer_transfer.entry_name_insurer3'), 'maxlength' => 50]) !!} @if ($errors->has('name_insurer3')) {{ $errors->first('name_insurer3') }} @endif
{!! html_entity_decode(Form::label('policy_number3', __('sales/customer_transfer.entry_policy_number3') . '', ['class' => 'control-label'])) !!} {!! Form::text('policy_number3', old('policy_number3',($customer_transfer_transfer->policy_number3 ?? '')), ['class' => 'form-control', 'placeholder' => __('sales/customer_transfer.entry_policy_number3'), 'maxlength' => 30]) !!} @if ($errors->has('policy_number3')) {{ $errors->first('policy_number3') }} @endif
{!! html_entity_decode(Form::label('insurance_value', __('sales/customer_transfer.entry_insurance_value') . '', ['class' => 'control-label'])) !!} {!! Form::number('insurance_value', old('insurance_value',($customer_transfer_transfer->insurance_value ?? '')), ['class' => 'form-control', 'placeholder' => __('sales/customer_transfer.entry_insurance_value'), 'step' => 'any']) !!} @if ($errors->has('insurance_value')) {{ $errors->first('insurance_value') }} @endif

{{__('sales/customer_transfer.entry_trailers')}}

@lang('sales/customer_transfer.entry_trailer_type_id') @lang('sales/customer_transfer.entry_trailer_number')
{!! Form::select('trailer_type_id_1', $trailer_types,old('trailer_type_id_1',($customer_transfer_transfer->trailer_type_id_1 ?? '')), ['class' => 'form-control', 'placeholder' => __('general.text_select')]) !!} @if ($errors->has('trailer_type_id_1')) {{ $errors->first('trailer_type_id_1') }} @endif
{!! Form::text('trailer_number_1', old('trailer_number_1',($customer_transfer_transfer->trailer_number_1 ?? '')), ['class' => 'form-control', 'placeholder' => __('sales/customer_transfer.entry_trailer_number'), 'maxlength' => 7]) !!} @if ($errors->has('trailer_number_1')) {{ $errors->first('trailer_number_1') }} @endif
{!! Form::select('trailer_type_id_2', $trailer_types,old('trailer_type_id_2',($customer_transfer_transfer->trailer_type_id_2 ?? '')), ['class' => 'form-control', 'placeholder' => __('general.text_select')]) !!} @if ($errors->has('trailer_type_id_2')) {{ $errors->first('trailer_type_id_2') }} @endif
{!! Form::text('trailer_number_2', old('trailer_number_2',($customer_transfer_transfer->trailer_number_2 ?? '')), ['class' => 'form-control', 'placeholder' => __('sales/customer_transfer.entry_trailer_number'), 'maxlength' => 7]) !!} @if ($errors->has('trailer_number_2')) {{ $errors->first('trailer_number_2') }} @endif
{!! Form::select('trailer_type_id_3', $trailer_types,old('trailer_type_id_3',($customer_transfer_transfer->trailer_type_id_3 ?? '')), ['class' => 'form-control', 'placeholder' => __('general.text_select')]) !!} @if ($errors->has('trailer_type_id_3')) {{ $errors->first('trailer_type_id_3') }} @endif
{!! Form::text('trailer_number_3', old('trailer_number_3',($customer_transfer_transfer->trailer_number_3 ?? '')), ['class' => 'form-control', 'placeholder' => __('sales/customer_transfer.entry_trailer_number'), 'maxlength' => 7]) !!} @if ($errors->has('trailer_number_3')) {{ $errors->first('trailer_number_3') }} @endif
@php $item_row = 1; $items = old('item',$customer_transfer->customerActiveInvoiceLines); @endphp @foreach ($items as $item_row => $item) @php $item = !empty(old('item.' . $item_row . '')) ? (object) old('item.' . $item_row) : $item; $tmp_products = []; if(!empty(old('item.' . $item_row . '.product_id',$item->product_id))){ $tmp_products = \App\Models\Catalogs\Product::where('id','=',old('item.' . $item_row . '.product_id',$item->product_id))->get()->pluck('text_select2','id'); } $tmp_unit_measures = []; if(!empty(old('item.' . $item_row . '.unit_measure_id',$item->unit_measure_id))){ $tmp_unit_measures = \App\Models\Catalogs\UnitMeasure::where('id','=',old('item.' . $item_row . '.unit_measure_id',$item->unit_measure_id))->get()->pluck('description_select2','id'); } $tmp_sat_products = []; if(!empty(old('item.' . $item_row . '.sat_product_id',$item->sat_product_id))){ $tmp_sat_products = \App\Models\Catalogs\SatProduct::where('id','=',old('item.' . $item_row . '.sat_product_id',$item->sat_product_id))->get()->pluck('description_select2','id'); } @endphp @endforeach @php $item_row++; @endphp
@lang('general.column_actions') @lang('sales/customer_transfer.column_line_product_id') @lang('sales/customer_transfer.column_line_name') * @lang('sales/customer_transfer.column_line_unit_measure_id') * @lang('sales/customer_transfer.column_line_sat_product_id') * @lang('sales/customer_transfer.column_line_quantity') * @lang('sales/customer_transfer.column_line_price_unit') * @lang('sales/customer_transfer.column_line_discount') @lang('sales/customer_transfer.column_line_taxes') @lang('sales/customer_transfer.column_line_tax_object') @lang('sales/customer_transfer.column_line_amount_untaxed')
{!! Form::select('item[' . $item_row . '][product_id]', $tmp_products,old('item.' . $item_row . '.product_id',$item->product_id), ['class' => 'form-control input-sm col-product-id', 'placeholder' => __('general.text_select'),'id' => 'item_product_id_' . $item_row,'data-row' => $item_row]) !!}
{!! Form::textarea('item[' . $item_row . '][name]', old('item.' . $item_row . '.name',$item->name), ['class' => 'form-control input-sm ym-auto-resize col-name-id', 'required','autocomplete'=>'off','id' => 'item_name_' . $item_row, 'placeholder' => __('sales/customer_transfer.column_line_name'),'rows' => 2, 'maxlength' => 1000]) !!} @if ($errors->has('item.'.$item_row.'.name')) {{ $errors->first('item.'.$item_row.'.name') }} @endif
{!! Form::select('item[' . $item_row . '][unit_measure_id]', $tmp_unit_measures,old('item.' . $item_row . '.unit_measure_id',$item->unit_measure_id), ['class' => 'form-control input-sm col-unit-measure-id', 'placeholder' => __('general.text_select'),'required','id' => 'item_unit_measure_id_' . $item_row]) !!}
@if ($errors->has('item.'.$item_row.'.unit_measure_id')) {{ $errors->first('item.'.$item_row.'.unit_measure_id') }} @endif
{!! Form::select('item[' . $item_row . '][sat_product_id]', $tmp_sat_products,old('item.' . $item_row . '.sat_product_id',$item->sat_product_id), ['class' => 'form-control input-sm col-sat-product-id', 'placeholder' => __('general.text_select'),'required','id' => 'item_sat_product_id_' . $item_row]) !!}
@if ($errors->has('item.'.$item_row.'.sat_product_id')) {{ $errors->first('item.'.$item_row.'.sat_product_id') }} @endif
{!! Form::number('item[' . $item_row . '][quantity]', old('item.' . $item_row . '.quantity',round($item->quantity,2)), ['class' => 'form-control input-sm text-right col-quantity', 'required','id' => 'item_quantity_' . $item_row, 'step' => 'any']) !!} @if ($errors->has('item.'.$item_row.'.quantity')) {{ $errors->first('item.'.$item_row.'.quantity') }} @endif
{!! Form::number('item[' . $item_row . '][price_unit]', old('item.' . $item_row . '.price_unit',round($item->price_unit,2)), ['class' => 'form-control input-sm text-right col-price-unit', 'required','id' => 'item_price_unit_' . $item_row, 'step' => 'any']) !!} @if ($errors->has('item.'.$item_row.'.price_unit')) {{ $errors->first('item.'.$item_row.'.price_unit') }} @endif
{!! Form::number('item[' . $item_row . '][discount]', old('item.' . $item_row . '.discount',round($item->discount,2)), ['class' => 'form-control input-sm text-center col-discount', 'id' => 'item_discount_' . $item_row, 'step' => 'any']) !!} @if ($errors->has('item.'.$item_row.'.discount')) {{ $errors->first('item.'.$item_row.'.discount') }} @endif
{!! Form::select('item[' . $item_row . '][taxes][]', $taxes,old('item.' . $item_row . '.taxes',$item->taxes ?? []), ['class' => 'form-control input-sm my-select2 col-taxes','multiple','id' => 'item_taxes_' . $item_row]) !!}
{!! Form::select('item[' . $item_row . '][tax_object]', $tax_objects,old('item.' . $item_row . '.tax_object',$item->tax_object ?? ''), ['class' => 'form-control input-sm col-tax-object','id' => 'item_tax_object_' . $item_row]) !!}
0
@lang('general.text_amount_untaxed') 0
@lang('general.text_amount_total') 0

{{__('sales/customer_transfer.text_operator')}}

{!! html_entity_decode(Form::label('operator_taxid', __('sales/customer_transfer.entry_operator_taxid') . ' *', ['class' => 'control-label'])) !!} {!! Form::text('operator_taxid', old('operator_taxid',($customer_transfer_transfer->operator_taxid ?? '')), ['class' => 'form-control', 'placeholder' => __('sales/customer_transfer.entry_operator_taxid')]) !!} @if ($errors->has('operator_taxid')) {{ $errors->first('operator_taxid') }} @endif
{!! html_entity_decode(Form::label('operator_license', __('sales/customer_transfer.entry_operator_license') . ' *', ['class' => 'control-label'])) !!} {!! Form::text('operator_license', old('operator_license',($customer_transfer_transfer->operator_license ?? '')), ['class' => 'form-control', 'placeholder' => __('sales/customer_transfer.entry_operator_license')]) !!} @if ($errors->has('operator_license')) {{ $errors->first('operator_license') }} @endif
{!! html_entity_decode(Form::label('operator_name', __('sales/customer_transfer.entry_operator_name') . '', ['class' => 'control-label'])) !!} {!! Form::text('operator_name', old('operator_name',($customer_transfer_transfer->operator_name ?? '')), ['class' => 'form-control', 'placeholder' => __('sales/customer_transfer.entry_operator_name')]) !!} @if ($errors->has('operator_name')) {{ $errors->first('operator_name') }} @endif
{!! html_entity_decode(Form::label('operator_tr_country_id', __('sales/customer_transfer.entry_operator_tr_country_id') . '', ['class' => 'control-label'])) !!} {!! Form::select('operator_tr_country_id', $countries2,old('operator_tr_country_id',($customer_transfer_transfer->operator_tr_country_id ?? '')), ['class' => 'form-control my-select2', 'placeholder' => __('general.text_select')]) !!} @if ($errors->has('operator_tr_country_id')) {{ $errors->first('operator_tr_country_id') }} @endif
{!! html_entity_decode(Form::label('operator_numid', __('sales/customer_transfer.entry_operator_numid') . '', ['class' => 'control-label'])) !!} {!! Form::text('operator_numid', old('operator_numid',($customer_transfer_transfer->operator_numid ?? '')), ['class' => 'form-control', 'placeholder' => __('sales/customer_transfer.entry_operator_numid')]) !!} @if ($errors->has('operator_numid')) {{ $errors->first('operator_numid') }} @endif
@php $owner_taxid = old('owner_taxid',($customer_transfer_transfer->owner_taxid ?? '')); @endphp

  {{__('sales/customer_transfer.text_owner')}}

{!! html_entity_decode(Form::label('owner_taxid', __('sales/customer_transfer.entry_owner_taxid') . '', ['class' => 'control-label'])) !!} {!! Form::text('owner_taxid', old('owner_taxid',($customer_transfer_transfer->owner_taxid ?? '')), ['class' => 'form-control', 'placeholder' => __('sales/customer_transfer.entry_owner_taxid')]) !!} @if ($errors->has('owner_taxid')) {{ $errors->first('owner_taxid') }} @endif
{!! html_entity_decode(Form::label('owner_name', __('sales/customer_transfer.entry_owner_name') . '', ['class' => 'control-label'])) !!} {!! Form::text('owner_name', old('owner_name',($customer_transfer_transfer->owner_name ?? '')), ['class' => 'form-control', 'placeholder' => __('sales/customer_transfer.entry_owner_name')]) !!} @if ($errors->has('owner_name')) {{ $errors->first('owner_name') }} @endif
{!! html_entity_decode(Form::label('owner_tr_country_id', __('sales/customer_transfer.entry_owner_tr_country_id') . '', ['class' => 'control-label'])) !!} {!! Form::select('owner_tr_country_id', $countries2,old('owner_tr_country_id',($customer_transfer_transfer->owner_tr_country_id ?? '')), ['class' => 'form-control my-select2', 'placeholder' => __('general.text_select')]) !!} @if ($errors->has('owner_tr_country_id')) {{ $errors->first('owner_tr_country_id') }} @endif
{!! html_entity_decode(Form::label('owner_numid', __('sales/customer_transfer.entry_owner_numid') . '', ['class' => 'control-label'])) !!} {!! Form::text('owner_numid', old('owner_numid',($customer_transfer_transfer->owner_numid ?? '')), ['class' => 'form-control', 'placeholder' => __('sales/customer_transfer.entry_owner_numid')]) !!} @if ($errors->has('owner_numid')) {{ $errors->first('owner_numid') }} @endif
{!! html_entity_decode(Form::label('owner_transport_part_id', __('sales/customer_transfer.entry_owner_transport_part_id') . '', ['class' => 'control-label'])) !!} {!! Form::select('owner_transport_part_id', $transport_parts,old('owner_transport_part_id',($customer_transfer_transfer->owner_transport_part_id ?? '')), ['class' => 'form-control my-select2', 'placeholder' => __('general.text_select')]) !!} @if ($errors->has('owner_transport_part_id')) {{ $errors->first('owner_transport_part_id') }} @endif

{!! html_entity_decode(Form::label('owner_address_1', __('sales/customer_transfer.entry_owner_address_1') . '', ['class' => 'control-label'])) !!} {!! Form::text('owner_address_1', old('owner_address_1',($customer_transfer_transfer->owner_address_1 ?? '')), ['class' => 'form-control', 'placeholder' => __('sales/customer_transfer.entry_owner_address_1')]) !!}
{!! html_entity_decode(Form::label('owner_address_2', __('sales/customer_transfer.entry_owner_address_2') . '', ['class' => 'control-label'])) !!} {!! Form::text('owner_address_2', old('owner_address_2',($customer_transfer_transfer->owner_address_2 ?? '')), ['class' => 'form-control', 'placeholder' => __('sales/customer_transfer.entry_owner_address_2')]) !!}
{!! html_entity_decode(Form::label('owner_address_3', __('sales/customer_transfer.entry_owner_address_3') . '', ['class' => 'control-label'])) !!} {!! Form::text('owner_address_3', old('owner_address_3',($customer_transfer_transfer->owner_address_3 ?? '')), ['class' => 'form-control', 'placeholder' => __('sales/customer_transfer.entry_owner_address_3')]) !!}
{!! html_entity_decode(Form::label('owner_address_4', __('sales/customer_transfer.entry_owner_address_4') . '', ['class' => 'control-label'])) !!} {!! Form::text('owner_address_4', old('owner_address_4',($customer_transfer_transfer->owner_address_4 ?? '')), ['class' => 'form-control', 'placeholder' => __('sales/customer_transfer.entry_owner_address_4')]) !!}
{!! html_entity_decode(Form::label('owner_address_5', __('sales/customer_transfer.entry_owner_address_5') . '', ['class' => 'control-label'])) !!} {!! Form::text('owner_address_5', old('owner_address_5',($customer_transfer_transfer->owner_address_5 ?? '')), ['class' => 'form-control', 'placeholder' => __('sales/customer_transfer.entry_owner_address_5')]) !!}
{!! html_entity_decode(Form::label('owner_address_6', __('sales/customer_transfer.entry_owner_address_6') . '', ['class' => 'control-label'])) !!} {!! Form::text('owner_address_6', old('owner_address_6',($customer_transfer_transfer->owner_address_6 ?? '')), ['class' => 'form-control', 'placeholder' => __('sales/customer_transfer.entry_owner_address_6')]) !!}
{!! html_entity_decode(Form::label('owner_country_id', __('sales/customer_transfer.entry_owner_country_id') . '', ['class' => 'control-label'])) !!} {!! Form::select('owner_country_id', $countries,old('owner_country_id',($customer_transfer_transfer->owner_country_id ?? '')), ['class' => 'form-control my-select2', 'placeholder' => __('general.text_select')]) !!} @if ($errors->has('owner_country_id')) {{ $errors->first('owner_country_id') }} @endif
{!! html_entity_decode(Form::label('owner_state_id', __('sales/customer_transfer.entry_owner_state_id') . '', ['class' => 'control-label'])) !!} {!! Form::select('owner_state_id', [],null, ['class' => 'form-control my-select2', 'placeholder' => __('general.text_select')]) !!}
{!! html_entity_decode(Form::label('owner_city_id', __('sales/customer_transfer.entry_owner_city_id') . '', ['class' => 'control-label'])) !!} {!! Form::select('owner_city_id', [],null, ['class' => 'form-control my-select2', 'placeholder' => __('general.text_select')]) !!}
{!! html_entity_decode(Form::label('owner_postcode', __('sales/customer_transfer.entry_owner_postcode') . '', ['class' => 'control-label'])) !!} {!! Form::text('owner_postcode', old('owner_postcode', ($customer_transfer_transfer->owner_postcode ?? '')), ['class' => 'form-control', 'placeholder' => __('sales/customer_transfer.entry_owner_postcode')]) !!}
@php $lessee_taxid = old('lessee_taxid',($customer_transfer_transfer->lessee_taxid ?? '')); @endphp

  {{__('sales/customer_transfer.text_lessee')}}

{!! html_entity_decode(Form::label('lessee_taxid', __('sales/customer_transfer.entry_lessee_taxid') . '', ['class' => 'control-label'])) !!} {!! Form::text('lessee_taxid', old('lessee_taxid',($customer_transfer_transfer->lessee_taxid ?? '')), ['class' => 'form-control', 'placeholder' => __('sales/customer_transfer.entry_lessee_taxid')]) !!} @if ($errors->has('lessee_taxid')) {{ $errors->first('lessee_taxid') }} @endif
{!! html_entity_decode(Form::label('lessee_name', __('sales/customer_transfer.entry_lessee_name') . '', ['class' => 'control-label'])) !!} {!! Form::text('lessee_name', old('lessee_name',($customer_transfer_transfer->lessee_name ?? '')), ['class' => 'form-control', 'placeholder' => __('sales/customer_transfer.entry_lessee_name')]) !!} @if ($errors->has('lessee_name')) {{ $errors->first('lessee_name') }} @endif
{!! html_entity_decode(Form::label('lessee_tr_country_id', __('sales/customer_transfer.entry_lessee_tr_country_id') . '', ['class' => 'control-label'])) !!} {!! Form::select('lessee_tr_country_id', $countries2,old('lessee_tr_country_id',($customer_transfer_transfer->lessee_tr_country_id ?? '')), ['class' => 'form-control my-select2', 'placeholder' => __('general.text_select')]) !!} @if ($errors->has('lessee_tr_country_id')) {{ $errors->first('lessee_tr_country_id') }} @endif
{!! html_entity_decode(Form::label('lessee_numid', __('sales/customer_transfer.entry_lessee_numid') . '', ['class' => 'control-label'])) !!} {!! Form::text('lessee_numid', old('lessee_numid',($customer_transfer_transfer->lessee_numid ?? '')), ['class' => 'form-control', 'placeholder' => __('sales/customer_transfer.entry_lessee_numid')]) !!} @if ($errors->has('lessee_numid')) {{ $errors->first('lessee_numid') }} @endif
{!! html_entity_decode(Form::label('lessee_transport_part_id', __('sales/customer_transfer.entry_lessee_transport_part_id') . '', ['class' => 'control-label'])) !!} {!! Form::select('lessee_transport_part_id', $transport_parts,old('lessee_transport_part_id',($customer_transfer_transfer->lessee_transport_part_id ?? '')), ['class' => 'form-control my-select2', 'placeholder' => __('general.text_select')]) !!} @if ($errors->has('lessee_transport_part_id')) {{ $errors->first('lessee_transport_part_id') }} @endif

{!! html_entity_decode(Form::label('lessee_address_1', __('sales/customer_transfer.entry_lessee_address_1') . '', ['class' => 'control-label'])) !!} {!! Form::text('lessee_address_1', old('lessee_address_1',($customer_transfer_transfer->lessee_address_1 ?? '')), ['class' => 'form-control', 'placeholder' => __('sales/customer_transfer.entry_lessee_address_1')]) !!}
{!! html_entity_decode(Form::label('lessee_address_2', __('sales/customer_transfer.entry_lessee_address_2') . '', ['class' => 'control-label'])) !!} {!! Form::text('lessee_address_2', old('lessee_address_2',($customer_transfer_transfer->lessee_address_2 ?? '')), ['class' => 'form-control', 'placeholder' => __('sales/customer_transfer.entry_lessee_address_2')]) !!}
{!! html_entity_decode(Form::label('lessee_address_3', __('sales/customer_transfer.entry_lessee_address_3') . '', ['class' => 'control-label'])) !!} {!! Form::text('lessee_address_3', old('lessee_address_3',($customer_transfer_transfer->lessee_address_3 ?? '')), ['class' => 'form-control', 'placeholder' => __('sales/customer_transfer.entry_lessee_address_3')]) !!}
{!! html_entity_decode(Form::label('lessee_address_4', __('sales/customer_transfer.entry_lessee_address_4') . '', ['class' => 'control-label'])) !!} {!! Form::text('lessee_address_4', old('lessee_address_4',($customer_transfer_transfer->lessee_address_4 ?? '')), ['class' => 'form-control', 'placeholder' => __('sales/customer_transfer.entry_lessee_address_4')]) !!}
{!! html_entity_decode(Form::label('lessee_address_5', __('sales/customer_transfer.entry_lessee_address_5') . '', ['class' => 'control-label'])) !!} {!! Form::text('lessee_address_5', old('lessee_address_5',($customer_transfer_transfer->lessee_address_5 ?? '')), ['class' => 'form-control', 'placeholder' => __('sales/customer_transfer.entry_lessee_address_5')]) !!}
{!! html_entity_decode(Form::label('lessee_address_6', __('sales/customer_transfer.entry_lessee_address_6') . '', ['class' => 'control-label'])) !!} {!! Form::text('lessee_address_6', old('lessee_address_6',($customer_transfer_transfer->lessee_address_6 ?? '')), ['class' => 'form-control', 'placeholder' => __('sales/customer_transfer.entry_lessee_address_6')]) !!}
{!! html_entity_decode(Form::label('lessee_country_id', __('sales/customer_transfer.entry_lessee_country_id') . '', ['class' => 'control-label'])) !!} {!! Form::select('lessee_country_id', $countries,old('lessee_country_id',($customer_transfer_transfer->lessee_country_id ?? '')), ['class' => 'form-control my-select2', 'placeholder' => __('general.text_select')]) !!} @if ($errors->has('lessee_country_id')) {{ $errors->first('lessee_country_id') }} @endif
{!! html_entity_decode(Form::label('lessee_state_id', __('sales/customer_transfer.entry_lessee_state_id') . '', ['class' => 'control-label'])) !!} {!! Form::select('lessee_state_id', [],null, ['class' => 'form-control my-select2', 'placeholder' => __('general.text_select')]) !!}
{!! html_entity_decode(Form::label('lessee_city_id', __('sales/customer_transfer.entry_lessee_city_id') . '', ['class' => 'control-label'])) !!} {!! Form::select('lessee_city_id', [],null, ['class' => 'form-control my-select2', 'placeholder' => __('general.text_select')]) !!}
{!! html_entity_decode(Form::label('lessee_postcode', __('sales/customer_transfer.entry_lessee_postcode') . '', ['class' => 'control-label'])) !!} {!! Form::text('lessee_postcode', old('lessee_postcode', ($customer_transfer_transfer->lessee_postcode ?? '')), ['class' => 'form-control', 'placeholder' => __('sales/customer_transfer.entry_lessee_postcode')]) !!}
{!! html_entity_decode(Form::label('cfdi_relation_id', __('sales/customer_transfer.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')]) !!} @if ($errors->has('cfdi_relation_id')) {{ $errors->first('cfdi_relation_id') }} @endif
@php $item_relation_row = 1; $items_relation = old('item_relation',$customer_transfer->customerInvoiceRelations); @endphp @foreach ($items_relation as $item_relation_row => $item) @php $item = !empty(old('item_relation.' . $item_relation_row . '')) ? (object) old('item_relation.' . $item_relation_row) : $item; $tmp_customer_transfer_relations = []; if(!empty(old('item_relation.' . $item_relation_row . '.relation_id',$item->relation_id))){ $tmp = \App\Models\Sales\CustomerInvoice::find(old('item_relation.' . $item_relation_row . '.relation_id',$item->relation_id)); $tmp_customer_transfer_relations = $tmp->get()->pluck('text_select2','id'); } @endphp @endforeach @php $item_relation_row++; @endphp
@lang('general.column_actions') @lang('sales/customer_transfer.column_relation_relation_id') @lang('sales/customer_transfer.column_relation_uuid')
{!! Form::select('item_relation[' . $item_relation_row . '][relation_id]', $tmp_customer_transfer_relations,old('item_relation.' . $item_relation_row . '.relation_id',$item->relation_id), ['class' => 'form-control input-sm col-relation-id', 'placeholder' => __('general.text_select'),'id' => 'item_relation_relation_id_' . $item_relation_row,'data-row' => $item_relation_row]) !!} @if ($errors->has('item_relation.'.$item_relation_row.'.relation_id')) {{ $errors->first('item_relation.'.$item_relation_row.'.relation_id') }} @endif
{!! Form::text('item_relation[' . $item_relation_row . '][uuid_related]',old('item_relation.' . $item_relation_row . '.uuid_related',$item->uuid_related), ['class' => 'form-control text-center input-sm col-uuid-related','required','id' => 'item_relation_uuid_related_' . $item_relation_row,'data-row' => $item_relation_row]) !!} @if ($errors->has('item_relation.'.$item_relation_row.'.uuid_related')) {{ $errors->first('item_relation.'.$item_relation_row.'.uuid_related') }} @endif
{!! Form::close() !!}