@lang('sales/customer_payment.document_title')

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

{{ $customer_payment->name }}

{!! Form::model($customer_payment,['route' => ['customer-payments.update',$customer_payment->id],'method' => 'PUT','class' => '','role' => 'form','id' => 'form']) !!} {!! Form::hidden('amount_reconciled', old('amount_reconciled',0)) !!}
@if($tax_regimens->isNotEmpty())
{!! html_entity_decode(Form::label('tax_regimen_id', __('sales/customer_payment.entry_tax_regimen_id') . ' ', ['class' => 'control-label'])) !!} {!! Form::select('tax_regimen_id', $tax_regimens,old('tax_regimen_id', !empty($customer_payment->tax_regimen_id) ? $customer_payment->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
{!! html_entity_decode(Form::label('date', __('sales/customer_payment.entry_date') . ' *', ['class' => 'control-label'])) !!}
{!! Form::text('date', old('date',\App\Helpers\Helper::dateTime(Date::parse($customer_payment->date))), ['class' => 'form-control', 'placeholder' => __('sales/customer_payment.entry_date'),'required','autocomplete'=>'off']) !!}
@if ($errors->has('date')) {{ $errors->first('date') }} @endif
{!! html_entity_decode(Form::label('date_payment', __('sales/customer_payment.entry_date_payment') . ' *', ['class' => 'control-label'])) !!}
{!! Form::text('date_payment', old('date_payment',\App\Helpers\Helper::dateTime(Date::parse($customer_payment->date_payment))), ['class' => 'form-control', 'placeholder' => __('sales/customer_payment.entry_date_payment'),'required','autocomplete'=>'off']) !!}
@if ($errors->has('date_payment')) {{ $errors->first('date_payment') }} @endif
{!! html_entity_decode(Form::label('reference', __('sales/customer_payment.entry_reference') . '', ['class' => 'control-label'])) !!} {!! Form::text('reference', old('reference'), ['class' => 'form-control', 'placeholder' => __('sales/customer_payment.entry_reference'),'autocomplete'=>'off']) !!}
@php $tmp_customers = []; $tmp_customer_bank_accounts = []; if(!empty(old('customer_id',$customer_payment->customer_id))){ $tmp = \App\Models\Sales\Customer::where('id',old('customer_id',$customer_payment->customer_id))->get(); $tmp_customers = $tmp->pluck('text_select2','id'); $tmp_customer_bank_accounts = $tmp->first()->customerActiveBankAccounts->pluck('name','id'); } @endphp {!! html_entity_decode(Form::label('customer_id', __('sales/customer_payment.entry_customer_id') . ' *', ['class' => 'control-label'])) !!}
{!! Form::select('customer_id', $tmp_customers,old('customer_id'), ['class' => 'form-control', 'placeholder' => __('general.text_select'),'required']) !!}
@if ($errors->has('customer_id')) {{ $errors->first('customer_id') }} @endif
{!! html_entity_decode(Form::label('tax_regimen_customer_id', __('sales/customer_payment.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('payment_way_id', __('sales/customer_payment.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'),'required']) !!} @if ($errors->has('payment_way_id')) {{ $errors->first('payment_way_id') }} @endif
{!! html_entity_decode(Form::label('branch_office_id', __('sales/customer_payment.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_payment.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_payment.entry_currency_value') . ' *', ['class' => 'control-label'])) !!} {!! Form::number('currency_value', old('currency_value',round($customer_payment->currency_value,4)), ['class' => 'form-control text-center', 'placeholder' => __('sales/customer_payment.entry_currency_value'),'required','step' => 'any']) !!} @if ($errors->has('currency_value')) {{ $errors->first('currency_value') }} @endif
{!! html_entity_decode(Form::label('amount', __('sales/customer_payment.entry_amount') . ' *', ['class' => 'control-label'])) !!} {!! Form::number('amount', old('amount',round($customer_payment->amount,2)), ['class' => 'form-control text-right', 'placeholder' => __('sales/customer_payment.entry_amount'),'required', 'step' => 'any', 'autocomplete' => 'off']) !!} @if ($errors->has('amount')) {{ $errors->first('amount') }} @endif
{!! html_entity_decode(Form::label('cfdi', __('sales/customer_payment.entry_cfdi') , ['class' => 'control-label'])) !!}
@if(!empty(setting('enabled_projects')))
{!! html_entity_decode(Form::label('project_id', __('sales/customer_payment.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

@lang('sales/customer_payment.entry_amount'):     @lang('sales/customer_payment.text_reconciled'):     @lang('sales/customer_payment.text_per_reconciled'):

* @lang('sales/customer_payment.help_payment_reconciled')

@php $item_reconciled_row = 1; $items_reconciled = (empty(old('item_reconciled')) ? [] : old('item_reconciled')); @endphp @foreach ($items_reconciled as $item_reconciled_row => $item) @php $tmp_name = ''; $tmp_date = ''; $tmp_date_due = ''; $tmp_currency_code = ''; $tmp_amount_total = ''; $tmp_balance = ''; if(!empty(old('item_reconciled.' . $item_reconciled_row . '.reconciled_id'))){ $tmp_currency = \App\Models\Catalogs\Currency::find(old('currency_id')); $tmp = \App\Models\Sales\CustomerInvoice::find(old('item_reconciled.' . $item_reconciled_row . '.reconciled_id')); $tmp_name =!empty($tmp) ? $tmp->name : ''; $tmp_date = !empty($tmp) ? \App\Helpers\Helper::convertSqlToDateTime($tmp->date) : ''; $tmp_date_due = !empty($tmp) ? \App\Helpers\Helper::convertSqlToDate($tmp->date_due) : ''; $tmp_payment_method = !empty($tmp) ? $tmp->paymentMethod->code : ''; $tmp_currency_code = !empty($tmp) ? $tmp->currency->code : ''; $tmp_amount_total = !empty($tmp) ? money($tmp->amount_total,$tmp->currency->code,true) : ''; $tmp_balance = ''. money(\App\Helpers\Helper::convertBalanceCurrency($tmp_currency,$tmp->balance,$tmp->currency->code,old('item_reconciled.' . $item_reconciled_row . '.currency_value')),$tmp->currency->code,true).''; } @endphp @endforeach @php $item_reconciled_row++; @endphp
@lang('sales/customer_payment.column_reconciled_name') @lang('sales/customer_payment.column_reconciled_date') @lang('sales/customer_payment.column_reconciled_date_due') @lang('sales/customer_payment.column_reconciled_payment_method') @lang('sales/customer_payment.column_reconciled_currency') @lang('sales/customer_payment.column_reconciled_amount_total') @lang('sales/customer_payment.column_reconciled_balance') @lang('sales/customer_payment.column_reconciled_currency_value') @lang('sales/customer_payment.column_reconciled_amount_reconciled')
{{$tmp_name}} {{$tmp_date}} {{$tmp_date_due}} {{$tmp_payment_method}} {{$tmp_currency_code}} {{$tmp_amount_total}} {!!$tmp_balance!!} @if(!empty($tmp_currency) && $tmp_currency->code == 'MXN' && $tmp->currency->code != 'MXN')
{!! Form::number('item_reconciled[' . $item_reconciled_row . '][currency_value]', old('item_reconciled.' . $item_reconciled_row . '.currency_value'), ['class' => 'form-control input-sm text-center col-currency-value', 'required','id' => 'item_reconciled_currency_value_' . $item_reconciled_row, 'step' => 'any']) !!} @if ($errors->has('item_reconciled.'.$item_reconciled_row.'.currency_value')) {{ $errors->first('item_reconciled.'.$item_reconciled_row.'.currency_value') }} @endif
@else --- @endif
{!! Form::number('item_reconciled[' . $item_reconciled_row . '][amount_reconciled]', old('item_reconciled.' . $item_reconciled_row . '.amount_reconciled'), ['class' => 'form-control input-sm text-right col-amount-reconciled','id' => 'item_reconciled_amount_reconciled_' . $item_reconciled_row, 'step' => 'any']) !!} @if ($errors->has('item_reconciled.'.$item_reconciled_row.'.amount_reconciled')) {{ $errors->first('item_reconciled.'.$item_reconciled_row.'.amount_reconciled') }} @endif
@if(setting('cfdi_version') == 'cfdi40')

@lang('sales/customer_payment.help_manual_reconcileds')
@lang('sales/customer_payment.help_manual_reconcileds2')
@lang('sales/customer_payment.help_manual_reconcileds3')

@endif
@php $item_manual_reconciled_row = 1; $items_manual_reconciled = old('item_manual_reconciled',$customer_payment->customerActiveManualPaymentReconcileds); @endphp @foreach ($items_manual_reconciled as $item_manual_reconciled_row => $item) @php $item = !empty(old('item_manual_reconciled.' . $item_manual_reconciled_row . '')) ? (object) old('item_manual_reconciled.' . $item_manual_reconciled_row) : $item; @endphp @endforeach @php $item_manual_reconciled_row++; @endphp
@lang('general.column_actions') @lang('sales/customer_payment.column_reconciled_uuid')* @lang('sales/customer_payment.column_reconciled_serie') @lang('sales/customer_payment.column_reconciled_folio') @lang('sales/customer_payment.column_reconciled_currency')* @lang('sales/customer_payment.column_reconciled_currency_value') @lang('sales/customer_payment.column_reconciled_payment_method')* {!! __('sales/customer_payment.column_reconciled_taxes') !!} @lang('sales/customer_payment.column_reconciled_amount_total')* @lang('sales/customer_payment.column_reconciled_number_of_payment')* @lang('sales/customer_payment.column_reconciled_last_balance')* @lang('sales/customer_payment.column_reconciled_amount_reconciled2')* @lang('sales/customer_payment.column_reconciled_currenct_balance')*
{!! Form::text('item_manual_reconciled[' . $item_manual_reconciled_row . '][uuid_related]', old('item_manual_reconciled.' . $item_manual_reconciled_row . '.uuid_related',$item->uuid_related), ['class' => 'form-control input-sm text-center col-manual-uuid-related','id' => 'item_manual_reconciled_uuid_related_' . $item_manual_reconciled_row,'required', 'data-row' => $item_manual_reconciled_row]) !!} @if ($errors->has('item_manual_reconciled.'.$item_manual_reconciled_row.'.uuid_related')) {{ $errors->first('item_manual_reconciled.'.$item_manual_reconciled_row.'.uuid_related') }} @endif
{!! Form::text('item_manual_reconciled[' . $item_manual_reconciled_row . '][serie_related]', old('item_manual_reconciled.' . $item_manual_reconciled_row . '.serie_related',$item->serie_related), ['class' => 'form-control input-sm text-center col-serie-related','id' => 'item_manual_reconciled_serie_related_' . $item_manual_reconciled_row]) !!}
{!! Form::text('item_manual_reconciled[' . $item_manual_reconciled_row . '][folio_related]', old('item_manual_reconciled.' . $item_manual_reconciled_row . '.folio_related',$item->folio_related), ['class' => 'form-control input-sm text-center col-folio-related','id' => 'item_manual_reconciled_folio_related_' . $item_manual_reconciled_row]) !!}
{!! Form::select('item_manual_reconciled[' . $item_manual_reconciled_row . '][currency_code_related]', $currency_codes, old('item_manual_reconciled.' . $item_manual_reconciled_row . '.currency_code_related',$item->currency_code_related), ['class' => 'form-control input-sm text-center col-currency-code-related','id' => 'item_manual_reconciled_currency_code_related_' . $item_manual_reconciled_row, 'placeholder' => __('general.text_select'),'required']) !!} @if ($errors->has('item_manual_reconciled.'.$item_manual_reconciled_row.'.currency_code_related')) {{ $errors->first('item_manual_reconciled.'.$item_manual_reconciled_row.'.currency_code_related') }} @endif
{!! Form::number('item_manual_reconciled[' . $item_manual_reconciled_row . '][currency_value]', old('item_manual_reconciled.' . $item_manual_reconciled_row . '.currency_value',!empty($item->currency_value) ? round($item->currency_value,4) : ''), ['class' => 'form-control input-sm text-center col-currency_value','id' => 'item_manual_reconciled_currency_value_' . $item_manual_reconciled_row, 'step' => 'any']) !!} @if ($errors->has('item_manual_reconciled.'.$item_manual_reconciled_row.'.currency_value')) {{ $errors->first('item_manual_reconciled.'.$item_manual_reconciled_row.'.currency_value') }} @endif
{!! Form::select('item_manual_reconciled[' . $item_manual_reconciled_row . '][payment_method_code_related]', $payment_method_codes, old('item_manual_reconciled.' . $item_manual_reconciled_row . '.payment_method_code_related',$item->payment_method_code_related), ['class' => 'form-control input-sm text-center col-payment-method-code-related','id' => 'item_manual_reconciled_payment_method_code_related_' . $item_manual_reconciled_row, 'placeholder' => __('general.text_select'),'required']) !!} @if ($errors->has('item_manual_reconciled.'.$item_manual_reconciled_row.'.payment_method_code_related')) {{ $errors->first('item_manual_reconciled.'.$item_manual_reconciled_row.'.payment_method_code_related') }} @endif
{!! Form::select('item_manual_reconciled[' . $item_manual_reconciled_row . '][tax_id_1]', $taxes,old('item_manual_reconciled.' . $item_manual_reconciled_row . '.tax_id_1',$item->tax_id_1), ['class' => 'form-control input-sm','placeholder' => __('general.text_select'), 'id' => 'item_manual_reconciled_tax_id_1_' . $item_manual_reconciled_row]) !!} {!! Form::number('item_manual_reconciled[' . $item_manual_reconciled_row . '][amount_base_1]', old('item_manual_reconciled.' . $item_manual_reconciled_row . '.amount_base_1', round($item->amount_base_1, 2)), ['class' => 'form-control input-sm text-right','id' => 'item_manual_reconciled_amount_base_1_' . $item_manual_reconciled_row, 'placeholder' => __('sales/customer_payment.column_reconciled_amount_base'), 'step' => 'any']) !!}
{!! Form::select('item_manual_reconciled[' . $item_manual_reconciled_row . '][tax_id_2]', $taxes,old('item_manual_reconciled.' . $item_manual_reconciled_row . '.tax_id_2',$item->tax_id_2), ['class' => 'form-control input-sm','placeholder' => __('general.text_select'), 'id' => 'item_manual_reconciled_tax_id_2_' . $item_manual_reconciled_row]) !!} {!! Form::number('item_manual_reconciled[' . $item_manual_reconciled_row . '][amount_base_2]', old('item_manual_reconciled.' . $item_manual_reconciled_row . '.amount_base_2', round($item->amount_base_2, 2)), ['class' => 'form-control input-sm text-right','id' => 'item_manual_reconciled_amount_base_2_' . $item_manual_reconciled_row, 'placeholder' => __('sales/customer_payment.column_reconciled_amount_base'), 'step' => 'any']) !!}
{!! Form::select('item_manual_reconciled[' . $item_manual_reconciled_row . '][tax_id_3]', $taxes,old('item_manual_reconciled.' . $item_manual_reconciled_row . '.tax_id_3',$item->tax_id_3), ['class' => 'form-control input-sm','placeholder' => __('general.text_select'), 'id' => 'item_manual_reconciled_tax_id_3_' . $item_manual_reconciled_row]) !!} {!! Form::number('item_manual_reconciled[' . $item_manual_reconciled_row . '][amount_base_3]', old('item_manual_reconciled.' . $item_manual_reconciled_row . '.amount_base_3', round($item->amount_base_3, 2)), ['class' => 'form-control input-sm text-right','id' => 'item_manual_reconciled_amount_base_3_' . $item_manual_reconciled_row, 'placeholder' => __('sales/customer_payment.column_reconciled_amount_base'), 'step' => 'any']) !!}
{!! Form::select('item_manual_reconciled[' . $item_manual_reconciled_row . '][tax_id_4]', $taxes,old('item_manual_reconciled.' . $item_manual_reconciled_row . '.tax_id_4',$item->tax_id_4), ['class' => 'form-control input-sm','placeholder' => __('general.text_select'), 'id' => 'item_manual_reconciled_tax_id_4_' . $item_manual_reconciled_row]) !!} {!! Form::number('item_manual_reconciled[' . $item_manual_reconciled_row . '][amount_base_4]', old('item_manual_reconciled.' . $item_manual_reconciled_row . '.amount_base_4', round($item->amount_base_4, 2)), ['class' => 'form-control input-sm text-right','id' => 'item_manual_reconciled_amount_base_4_' . $item_manual_reconciled_row, 'placeholder' => __('sales/customer_payment.column_reconciled_amount_base'), 'step' => 'any']) !!}
{!! Form::select('item_manual_reconciled[' . $item_manual_reconciled_row . '][tax_id_5]', $taxes,old('item_manual_reconciled.' . $item_manual_reconciled_row . '.tax_id_5',$item->tax_id_5), ['class' => 'form-control input-sm','placeholder' => __('general.text_select'), 'id' => 'item_manual_reconciled_tax_id_5_' . $item_manual_reconciled_row]) !!} {!! Form::number('item_manual_reconciled[' . $item_manual_reconciled_row . '][amount_base_5]', old('item_manual_reconciled.' . $item_manual_reconciled_row . '.amount_base_5', round($item->amount_base_5, 2)), ['class' => 'form-control input-sm text-right','id' => 'item_manual_reconciled_amount_base_5_' . $item_manual_reconciled_row, 'placeholder' => __('sales/customer_payment.column_reconciled_amount_base'), 'step' => 'any']) !!}
{!! Form::number('item_manual_reconciled[' . $item_manual_reconciled_row . '][amount_total]', old('item_manual_reconciled.' . $item_manual_reconciled_row . '.amount_total',round($item->amount_total,2)), ['class' => 'form-control input-sm text-right col-last-balance','id' => 'item_manual_reconciled_amount_total_' . $item_manual_reconciled_row,'required', 'step' => 'any']) !!} @if ($errors->has('item_manual_reconciled.'.$item_manual_reconciled_row.'.amount_total')) {{ $errors->first('item_manual_reconciled.'.$item_manual_reconciled_row.'.amount_total') }} @endif
{!! Form::number('item_manual_reconciled[' . $item_manual_reconciled_row . '][number_of_payment]', old('item_manual_reconciled.' . $item_manual_reconciled_row . '.number_of_payment',$item->number_of_payment), ['class' => 'form-control input-sm text-center col-number-of-payment','id' => 'item_manual_reconciled_number_of_payment_' . $item_manual_reconciled_row,'required', 'step' => 'any']) !!} @if ($errors->has('item_manual_reconciled.'.$item_manual_reconciled_row.'.number_of_payment')) {{ $errors->first('item_manual_reconciled.'.$item_manual_reconciled_row.'.number_of_payment') }} @endif
{!! Form::number('item_manual_reconciled[' . $item_manual_reconciled_row . '][last_balance]', old('item_manual_reconciled.' . $item_manual_reconciled_row . '.last_balance',round($item->last_balance,2)), ['class' => 'form-control input-sm text-right col-last-balance','id' => 'item_manual_reconciled_last_balance_' . $item_manual_reconciled_row,'required', 'step' => 'any']) !!} @if ($errors->has('item_manual_reconciled.'.$item_manual_reconciled_row.'.last_balance')) {{ $errors->first('item_manual_reconciled.'.$item_manual_reconciled_row.'.last_balance') }} @endif
{!! Form::number('item_manual_reconciled[' . $item_manual_reconciled_row . '][amount_reconciled]', old('item_manual_reconciled.' . $item_manual_reconciled_row . '.amount_reconciled',round($item->amount_reconciled,2)), ['class' => 'form-control input-sm text-right col-amount-reconciled','id' => 'item_manual_reconciled_amount_reconciled_' . $item_manual_reconciled_row,'required', 'step' => 'any']) !!} @if ($errors->has('item_manual_reconciled.'.$item_manual_reconciled_row.'.amount_reconciled')) {{ $errors->first('item_manual_reconciled.'.$item_manual_reconciled_row.'.amount_reconciled') }} @endif
{!! Form::number('item_manual_reconciled[' . $item_manual_reconciled_row . '][current_balance]', old('item_manual_reconciled.' . $item_manual_reconciled_row . '.current_balance',round($item->current_balance,2)), ['class' => 'form-control input-sm text-right col-current-balance','id' => 'item_manual_reconciled_current_balance_' . $item_manual_reconciled_row,'required', 'step' => 'any', 'readonly']) !!} @if ($errors->has('item_manual_reconciled.'.$item_manual_reconciled_row.'.current_balance')) {{ $errors->first('item_manual_reconciled.'.$item_manual_reconciled_row.'.current_balance') }} @endif
{!! html_entity_decode(Form::label('tipo_cadena_pago', __('sales/customer_payment.entry_tipo_cadena_pago') . ' ', ['class' => 'control-label'])) !!} {!! Form::select('tipo_cadena_pago', $tipo_cadena_pagos,old('tipo_cadena_pago'), ['class' => 'form-control', 'placeholder' => __('general.text_select')]) !!}
{!! html_entity_decode(Form::label('certificado_pago', __('sales/customer_payment.entry_certificado_pago') . '', ['class' => 'control-label'])) !!} {!! Form::textarea('certificado_pago', old('certificado_pago'), ['class' => 'form-control', 'placeholder' => __('sales/customer_payment.entry_certificado_pago'),'rows' => '3']) !!} @if ($errors->has('certificado_pago')) {{ $errors->first('certificado_pago') }} @endif
{!! html_entity_decode(Form::label('cadena_pago', __('sales/customer_payment.entry_cadena_pago') . '', ['class' => 'control-label'])) !!} {!! Form::textarea('cadena_pago', old('cadena_pago'), ['class' => 'form-control', 'placeholder' => __('sales/customer_payment.entry_cadena_pago'),'rows' => '3']) !!} @if ($errors->has('cadena_pago')) {{ $errors->first('cadena_pago') }} @endif
{!! html_entity_decode(Form::label('sello_pago', __('sales/customer_payment.entry_sello_pago') . '', ['class' => 'control-label'])) !!} {!! Form::textarea('sello_pago', old('sello_pago'), ['class' => 'form-control', 'placeholder' => __('sales/customer_payment.entry_sello_pago'),'rows' => '3']) !!} @if ($errors->has('sello_pago')) {{ $errors->first('sello_pago') }} @endif
{!! html_entity_decode(Form::label('cfdi_relation_id', __('sales/customer_payment.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_payment->customerPaymentRelations); @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_uuid = ''; $tmp_customer_payment_relations = []; if(!empty(old('item_relation.' . $item_relation_row . '.relation_id',$item->relation_id))){ $tmp = \App\Models\Sales\CustomerPayment::find(old('item_relation.' . $item_relation_row . '.relation_id',$item->relation_id)); $tmp_customer_payment_relations = $tmp->get()->pluck('text_select2','id'); } @endphp @endforeach @php $item_relation_row++; @endphp
@lang('general.column_actions') @lang('sales/customer_payment.column_relation_relation_id') @lang('sales/customer_payment.column_relation_uuid')
{!! Form::select('item_relation[' . $item_relation_row . '][relation_id]', $tmp_customer_payment_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',$item->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() !!}