@lang('sales/customer_invoice.document_title')
@include('flash::message')
@if (!$errors->isEmpty())
{{ __('general.error_form') }}
@endif
{{ $customer_invoice->name }}
{!! Form::model($customer_invoice,['route' => ['customer-invoices.update',$customer_invoice->id],'method' => 'PUT','class' => '','role' => 'form','id' => 'form']) !!}
{!! Form::hidden('amount_total_tmp', old('amount_total_tmp',0)) !!}
@if(!empty(setting('enabled_projects')))
@endif
{!! Form::close() !!}
@if($tax_regimens->isNotEmpty())
@endif
{!! html_entity_decode(Form::label('tax_regimen_id', __('sales/customer_invoice.entry_tax_regimen_id') . ' ', ['class' => 'control-label'])) !!}
{!! Form::select('tax_regimen_id', $tax_regimens,old('tax_regimen_id', !empty($customer_invoice->tax_regimen_id) ? $customer_invoice->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
@php
$tmp_customers = [];
if(!empty(old('customer_id',$customer_invoice->customer_id))){
$tmp_customers = \App\Models\Sales\Customer::where('id','=',old('customer_id',$customer_invoice->customer_id))->get()->pluck('text_select2','id');
}
@endphp
{!! html_entity_decode(Form::label('customer_id', __('sales/customer_invoice.entry_customer_id') . ' *', ['class' => 'control-label'])) !!}
{!! Form::select('customer_id', $tmp_customers,old('customer_id',$customer_invoice->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_invoice.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_invoice.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_invoice.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_invoice.entry_currency_value') . ' *', ['class' => 'control-label'])) !!}
{!! Form::number('currency_value', old('currency_value',round($customer_invoice->currency_value,4)), ['class' => 'form-control text-center', 'placeholder' => __('sales/customer_invoice.entry_currency_value'),'required','step' => 'any']) !!}
@if ($errors->has('currency_value'))
{{ $errors->first('currency_value') }}
@endif
{!! html_entity_decode(Form::label('date', __('sales/customer_invoice.entry_date') . ' *', ['class' => 'control-label'])) !!}
{!! Form::text('date', old('date',\App\Helpers\Helper::dateTime(Date::parse($customer_invoice->date))), ['class' => 'form-control', 'placeholder' => __('sales/customer_invoice.entry_date'),'required','autocomplete'=>'off']) !!}
@if ($errors->has('date'))
{{ $errors->first('date') }}
@endif
{!! 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'),'required']) !!}
@if ($errors->has('payment_term_id'))
{{ $errors->first('payment_term_id') }}
@endif
{!! html_entity_decode(Form::label('date_due', __('sales/customer_invoice.entry_date_due') . '', ['class' => 'control-label'])) !!}
{!! Form::text('date_due', old('date_due',\App\Helpers\Helper::date(Date::parse($customer_invoice->date_due))), ['class' => 'form-control', 'placeholder' => __('sales/customer_invoice.entry_date_due'),'autocomplete'=>'off']) !!}
@if ($errors->has('date_due'))
{{ $errors->first('date_due') }}
@endif
{!! 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'),'required']) !!}
@if ($errors->has('payment_way_id'))
{{ $errors->first('payment_way_id') }}
@endif
{!! 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'),'required']) !!}
@if ($errors->has('payment_method_id'))
{{ $errors->first('payment_method_id') }}
@endif
{!! 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'),'required']) !!}
@if ($errors->has('cfdi_use_id'))
{{ $errors->first('cfdi_use_id') }}
@endif
{!! html_entity_decode(Form::label('project_id', __('sales/customer_invoice.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
@if ($errors->has('item'))
{{ $errors->first('item') }}
@endif
@foreach(old('delete_item',[]) as $tmp)
@endforeach
| @lang('general.column_actions') | @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_quantity') * | @lang('sales/customer_invoice.column_line_price_unit') * | @lang('sales/customer_invoice.column_line_discount') | @lang('sales/customer_invoice.column_line_taxes') | @lang('sales/customer_invoice.column_line_tax_object') | @lang('sales/customer_invoice.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_invoice.column_line_name'),'rows' => 2, 'maxlength' => 1000]) !!}
@if ($errors->has('item.'.$item_row.'.name'))
{{ $errors->first('item.'.$item_row.'.name') }}
@endif
@if(\App\Helpers\Helper::companyComplementoCfdiIedu($customer_invoice->company_id))
{!! Form::select('item[' . $item_row . '][customer_iedu_id]', $tmp_customer_iedus,old('item.' . $item_row . '.customer_iedu_id',$item->customer_iedu_id), ['class' => 'form-control input-sm col-customer-iedu-id', 'placeholder' => __('general.text_select_customer_iedu'),'required','id' => 'item_iedu_customer_iedu_id_' . $item_row]) !!}
@if ($errors->has('item.'.$item_row.'.customer_iedu_id'))
{{ $errors->first('item.'.$item_row.'.customer_iedu_id') }}
@endif
{!! Form::text('item[' . $item_row . '][iedu_rfc_pago]', old('item.' . $item_row . '.iedu_rfc_pago',$item->customerInvoiceLineComplement->iedu_rfc_pago ?? $item->iedu_rfc_pago ?? ''), ['class' => 'form-control input-sm col-iedu-rfc-pago','id' => 'item_iedu_iedu_rfc_pago_' . $item_row, 'placeholder' => __('sales/customer_invoice.column_line_iedu_iedu_rfc_pago')]) !!}
@if ($errors->has('item.'.$item_row.'.iedu_rfc_pago'))
{{ $errors->first('item.'.$item_row.'.iedu_rfc_pago') }}
@endif
@else
@if(empty(setting('disable_pedimento')))
{!! Form::text('item[' . $item_row . '][numero_pedimento]', old('item.' . $item_row . '.numero_pedimento',$item->customerInvoiceLineComplement->numero_pedimento ?? $item->numero_pedimento ?? '' ), ['class' => 'form-control input-sm col-numero-pedimento','id' => 'item_numero_pedimento_' . $item_row, 'placeholder' => __('sales/customer_invoice.column_line_numero_pedimento')]) !!}
@if ($errors->has('item.'.$item_row.'.numero_pedimento'))
{{ $errors->first('item.'.$item_row.'.numero_pedimento') }}
@endif
@endif
@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',\App\Helpers\Helper::numberFormatRealDecimalPlace($item->price_unit,false)), ['class' => 'form-control input-sm text-right col-price-unit', 'required','id' => 'item_price_unit_' . $item_row, 'step' => 'any']) !!}
@if(empty(setting('disable_includes_iva_fix_amount_untaxed')))
|
{!! 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', 'style' => 'width: 55%;']) !!}
{!! Form::select('item[' . $item_row . '][discount_type]', $discount_types,old('item.' . $item_row . '.discount_type',$item->discount_type), ['class' => 'form-control input-sm col-discount-type','id' => 'item_discount_type_' . $item_row, 'style' => 'width: 45%;']) !!}
@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 | |
| {!! Form::textarea('comment', old('comment'), ['class' => 'form-control input-sm ym-auto-resize', 'placeholder' => __('sales/customer_invoice.entry_comment'),'rows' => '3']) !!} | @lang('general.text_amount_untaxed') | 0 | ||||||||
| @lang('general.text_amount_total') | 0 | |||||||||
{!! 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')]) !!}
@if ($errors->has('cfdi_relation_id'))
{{ $errors->first('cfdi_relation_id') }}
@endif
@foreach(old('delete_item_relation',[]) as $tmp)
@endforeach
| @lang('general.column_actions') | @lang('sales/customer_invoice.column_relation_relation_id') | @lang('sales/customer_invoice.column_relation_uuid') |
|---|---|---|
|
{!! Form::select('item_relation[' . $item_relation_row . '][relation_id]', $tmp_customer_invoice_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
|
||
@php
$global_periodicity = old('global_periodicity', $customer_invoice->global_periodicity ?? '');
$taxid = old('taxid',($customer_invoice ? $customer_invoice->customer->taxid : ''));
@endphp
{{__('general.text_cfdi_global')}}
{!! html_entity_decode(Form::label('global_periodicity', __('sales/customer_invoice.entry_global_periodicity') . '', ['class' => 'control-label'])) !!}
{!! Form::select('global_periodicity', $global_periodicities,old('global_periodicity', $customer_invoice->global_periodicity ?? '01'), ['class' => 'form-control', 'placeholder' => __('general.text_select')]) !!}
@if ($errors->has('global_periodicity'))
{{ $errors->first('global_periodicity') }}
@endif
{!! html_entity_decode(Form::label('global_month', __('sales/customer_invoice.entry_global_month') . '', ['class' => 'control-label'])) !!}
{!! Form::select('global_month', $global_months,old('global_month', $customer_invoice->global_month ?? date('m')), ['class' => 'form-control', 'placeholder' => __('general.text_select')]) !!}
@if ($errors->has('global_month'))
{{ $errors->first('global_month') }}
@endif
{!! html_entity_decode(Form::label('global_year', __('sales/customer_invoice.entry_global_year') . '', ['class' => 'control-label'])) !!}
{!! Form::select('global_year', $global_years,old('global_year', $customer_invoice->global_year ?? date('Y')), ['class' => 'form-control', 'placeholder' => __('general.text_select')]) !!}
@if ($errors->has('global_year'))
{{ $errors->first('global_year') }}
@endif
@php
$item_tax_legend_row = 1;
$items_tax_legend = old('item_tax_legend',$customer_invoice->customerActiveInvoiceTaxLegends->isNotEmpty() ? $customer_invoice->customerActiveInvoiceTaxLegends : []);
@endphp
@foreach(old('delete_item_tax_legend',[]) as $tmp)
@endforeach
{{__('general.text_complement_tax_legend')}}
| @lang('general.column_actions') | @lang('sales/customer_invoice.column_tax_legend_disposicion_fiscal') | @lang('sales/customer_invoice.column_tax_legend_norma') | @lang('sales/customer_invoice.column_tax_legend_texto_leyenda') |
|---|---|---|---|
|
{!! Form::text('item_tax_legend[' . $item_tax_legend_row . '][disposicion_fiscal]',old('item_tax_legend.' . $item_tax_legend_row . '.disposicion_fiscal',$item->disposicion_fiscal), ['class' => 'form-control text-center input-sm col-disposicion-fiscal','id' => 'item_tax_legend_disposicion_fiscal_' . $item_tax_legend_row,'data-row' => $item_tax_legend_row]) !!}
@if ($errors->has('item_tax_legend.'.$item_tax_legend_row.'.disposicion_fiscal'))
{{ $errors->first('item_tax_legend.'.$item_tax_legend_row.'.disposicion_fiscal') }}
@endif
|
{!! Form::text('item_tax_legend[' . $item_tax_legend_row . '][norma]',old('item_tax_legend.' . $item_tax_legend_row . '.norma',$item->norma), ['class' => 'form-control text-center input-sm col-norma','id' => 'item_tax_legend_norma_' . $item_tax_legend_row,'data-row' => $item_tax_legend_row]) !!}
@if ($errors->has('item_tax_legend.'.$item_tax_legend_row.'.norma'))
{{ $errors->first('item_tax_legend.'.$item_tax_legend_row.'.norma') }}
@endif
|
{!! Form::text('item_tax_legend[' . $item_tax_legend_row . '][texto_leyenda]',old('item_tax_legend.' . $item_tax_legend_row . '.texto_leyenda',$item->texto_leyenda), ['class' => 'form-control text-left input-sm col-texto-leyenda','required','id' => 'item_tax_legend_texto_leyenda_' . $item_tax_legend_row,'data-row' => $item_tax_legend_row]) !!}
@if ($errors->has('item_tax_legend.'.$item_tax_legend_row.'.texto_leyenda'))
{{ $errors->first('item_tax_legend.'.$item_tax_legend_row.'.texto_leyenda') }}
@endif
|
|
@php
$item_ine_row = 1;
$ine_process_type = old('ine_process_type', $customer_invoice_complement->ine_process_type ?? '');
$items_ine = old('item_ine',$customer_invoice->customerActiveInvoiceInes->isNotEmpty() ? $customer_invoice->customerActiveInvoiceInes : []);
@endphp
@foreach(old('delete_item_ine',[]) as $tmp)
@endforeach
{{__('general.text_complement_ine')}}
{!! html_entity_decode(Form::label('ine_process_type', __('sales/customer_invoice.entry_ine_process_type') . '', ['class' => 'control-label'])) !!}
{!! Form::select('ine_process_type', $ine_process_types,old('ine_process_type', $customer_invoice_complement->ine_process_type ?? ''), ['class' => 'form-control', 'placeholder' => __('general.text_select')]) !!}
@if ($errors->has('ine_process_type'))
{{ $errors->first('ine_process_type') }}
@endif
{!! html_entity_decode(Form::label('ine_committee_type', __('sales/customer_invoice.entry_ine_committee_type') . '', ['class' => 'control-label'])) !!}
{!! Form::select('ine_committee_type', $ine_committee_types,old('ine_committee_type', $customer_invoice_complement->ine_committee_type ?? ''), ['class' => 'form-control', 'placeholder' => __('general.text_select')]) !!}
@if ($errors->has('ine_committee_type'))
{{ $errors->first('ine_committee_type') }}
@endif
{!! html_entity_decode(Form::label('ine_id_accounting', __('sales/customer_invoice.entry_ine_id_accounting') . ' ', ['class' => 'control-label'])) !!}
{!! Form::number('ine_id_accounting', old('ine_id_accounting', $customer_invoice_complement->ine_id_accounting ?? ''), ['class' => 'form-control text-center', 'placeholder' => __('sales/customer_invoice.entry_ine_id_accounting')]) !!}
@if ($errors->has('ine_id_accounting'))
{{ $errors->first('ine_id_accounting') }}
@endif
| @lang('general.column_actions') | @lang('sales/customer_invoice.column_ine_ine_entity') | @lang('sales/customer_invoice.column_ine_ambit') | @lang('sales/customer_invoice.column_ine_id_accounting') |
|---|---|---|---|
|
{!! Form::select('item_ine[' . $item_ine_row . '][ine_entity]', $ine_entities,old('item_ine.' . $item_ine_row . '.ine_entity',$item->ine_entity), ['class' => 'form-control text-left input-sm col-ine-entity', 'placeholder' => __('general.text_select'),'required','id' => 'item_ine_ine_entity_' . $item_ine_row,'data-row' => $item_ine_row]) !!}
@if ($errors->has('item_ine.'.$item_ine_row.'.ine_entity'))
{{ $errors->first('item_ine.'.$item_ine_row.'.ine_entity') }}
@endif
|
{!! Form::select('item_ine[' . $item_ine_row . '][ambit]', $ine_ambits,old('item_ine.' . $item_ine_row . '.ambit',$item->ambit), ['class' => 'form-control text-left input-sm col-ine-entity', 'placeholder' => __('general.text_select'),'id' => 'item_ine_ine_entity_' . $item_ine_row,'data-row' => $item_ine_row]) !!}
@if ($errors->has('item_ine.'.$item_ine_row.'.ambit'))
{{ $errors->first('item_ine.'.$item_ine_row.'.ambit') }}
@endif
|
{!! Form::text('item_ine[' . $item_ine_row . '][id_accounting]',old('item_ine.' . $item_ine_row . '.id_accounting',$item->id_accounting), ['class' => 'form-control text-left input-sm col-id-accounting','id' => 'item_ine_id_accounting_' . $item_ine_row,'data-row' => $item_ine_row]) !!}
@if ($errors->has('item_ine.'.$item_ine_row.'.id_accounting'))
{{ $errors->first('item_ine.'.$item_ine_row.'.id_accounting') }}
@endif
|
|
{!! Form::textarea('addenda', old('addenda'), ['class' => 'form-control input-sm ym-auto-resize', 'placeholder' => __('sales/customer_invoice.entry_addenda'),'rows' => '20']) !!}