@php //Obtiene datos del Cfdi33 $draft = (int) $customer_invoice->status == \App\Models\Sales\CustomerInvoice::DRAFT ? true : false; $cfdi33 = empty($data['cfdi33']) ? null : $data['cfdi33']; $conceptos = null; if($cfdi33){ $conceptos = $cfdi33->conceptos; $conceptos = $conceptos(); } @endphp
@if($cfdi33 && $customer_invoice->customerInvoiceCfdi->pac->test)

*** @lang('general.text_test_cfdi') ***

@endif
@if(!empty(setting('enabled_projects')) && !empty(setting('projects_logo_docs'))) @elseif(!empty(setting('branch_office_logo_docs'))) @else @endif

{{ mb_strtoupper($customer_invoice->documentType->name) }}


{{ $customer_invoice->name }}


{{ mb_strtoupper($customer_invoice->company->comercial_name) }}
@lang('general.text_cfdi_uuid'): {{ $customer_invoice->customerInvoiceCfdi->uuid ?? '' }}
@lang('sales/customer_invoice.entry_date'): {{ \App\Helpers\Helper::convertSqlToDateTime($customer_invoice->date) }}
@lang('sales/customer_invoice.entry_date_due'): {{ \App\Helpers\Helper::convertSqlToDate($customer_invoice->date_due) }}
@if(!empty($cfdi33)) @lang('general.text_cfdi_certificado'): {{ $cfdi33['NoCertificado'] }}
@lang('general.text_cfdi_tfd_no_certificado_sat'): {{ $cfdi33->complemento->timbreFiscalDigital['NoCertificadoSAT'] }}
@lang('general.text_cfdi_tfd_fecha_timbrado'): {{ \App\Helpers\Helper::convertSqlToDateTime(str_replace('T',' ',$cfdi33->complemento->timbreFiscalDigital['FechaTimbrado'])) }}
@endif
{{mb_strtoupper(__('base/company.text_transmitter'))}}
{{ mb_strtoupper($customer_invoice->company->name) }}
{{ $data['tax_regimen'] ?? ($customer_invoice->taxRegimen->name_sat ?? $customer_invoice->company->taxRegimen->name_sat) }} @if(!empty($customer_invoice->company->address_1) || !empty($customer_invoice->company->address_2) || !empty($customer_invoice->company->address_3) || !empty($customer_invoice->company->address_4))
{{ $customer_invoice->company->address_1 ?? '' }} {{ $customer_invoice->company->address_2 ?? '' }} {{ $customer_invoice->company->address_3 ?? '' }} {{ $customer_invoice->company->address_4 ?? '' }} @endif @if(!empty($customer_invoice->company->city->name) || !empty($customer_invoice->company->state->name))
{{ !empty($customer_invoice->company->city->name) ? $customer_invoice->company->city->name . ', ' : '' }}{{ $customer_invoice->company->state->name ?? '' }} @endif
{{ $customer_invoice->company->country->name ?? '' }}{!! ($customer_invoice->company->postcode ? '  ' . __('base/company.entry_postcode') . ': ' . $customer_invoice->company->postcode : '') !!}
{{ mb_strtoupper($customer_invoice->company->taxid) }}
---
{{ $customer_invoice->company->phone ?? ' ' }}
{{ $customer_invoice->company->email ?? ' ' }}
{{mb_strtoupper(__('sales/customer.text_receiver'))}}
{{ mb_strtoupper(!empty($cfdi33->Receptor['Nombre']) ? $cfdi33->Receptor['Nombre'] : $customer_invoice->customer->name) }} @if(!empty($customer_invoice->customer->address_1) || !empty($customer_invoice->customer->address_2) || !empty($customer_invoice->customer->address_3) || !empty($customer_invoice->customer->address_4))
{{ $customer_invoice->customer->address_1 ?? '' }} {{ $customer_invoice->customer->address_2 ?? '' }} {{ $customer_invoice->customer->address_3 ?? '' }} {{ $customer_invoice->customer->address_4 ?? '' }} @endif @if(!empty($customer_invoice->customer->city->name) || !empty($customer_invoice->customer->state->name))
{{ !empty($customer_invoice->customer->city->name) ? $customer_invoice->customer->city->name . ', ' : '' }}{{ $customer_invoice->customer->state->name ?? '' }} @endif
{{ $customer_invoice->customer->country->name ?? '' }}{!! ($customer_invoice->customer->postcode ? '  ' . __('sales/customer.entry_postcode') . ': ' . $customer_invoice->customer->postcode : '') !!}
@lang('sales/customer.entry_taxid'): {{ mb_strtoupper($cfdi33->Receptor['Rfc'] ?? $customer_invoice->customer->taxid) }}
@lang('sales/customer_invoice.entry_cfdi_use_id'): {{ $customer_invoice->cfdiUse->name_sat }}
{{mb_strtoupper(__('base/document_type.entry_cfdi_type_id'))}} {{mb_strtoupper(__('sales/customer_invoice.entry_payment_way_id'))}} {{mb_strtoupper(__('sales/customer_invoice.entry_currency_id'))}} {{mb_strtoupper(__('sales/customer_invoice.entry_currency_value'))}}
{{ $customer_invoice->documentType->cfdiType->name_sat ?? '' }} {{ $customer_invoice->paymentWay->name_sat }} {{ $customer_invoice->currency->code }} {{ $customer_invoice->currency->code!='MXN' ? round($customer_invoice->currency_value,4) :'' }}
@if($customer_invoice->status == \App\Models\Sales\CustomerInvoice::CANCEL)
@if(!empty($customer_invoice->customerInvoiceCfdi->uuid)) @lang('general.text_canceled_cfdi') @else @lang('general.text_canceled') @endif
@endif @if($draft)
@lang('general.text_pre_invoice')
@endif
@if($conceptos) @foreach($conceptos as $result) @php //Complemento concepto @endphp @endforeach @else @foreach($customer_invoice->customerActiveInvoiceLines as $result) @endforeach @endif
{{ mb_strtoupper(__('sales/customer_invoice.column_line_quantity')) }} {{ mb_strtoupper(__('sales/customer_invoice.column_line_unit_measure_id')) }} @if(!empty(setting('show_product_code_on_pdf'))) {{ mb_strtoupper(__('sales/customer_invoice.column_line_product_id')) }} - {{ mb_strtoupper(__('sales/customer_invoice.column_line_name')) . ' - ' . mb_strtoupper(__('sales/customer_invoice.column_line_sat_product_id')) }} @else {{ mb_strtoupper(__('sales/customer_invoice.column_line_sat_product_id')) . ' - ' . mb_strtoupper(__('sales/customer_invoice.column_line_name')) }} @endif {{ mb_strtoupper(__('sales/customer_invoice.column_line_price_unit')) }} {{ mb_strtoupper(__('sales/customer_invoice.column_line_discount')) }} {{ mb_strtoupper(__('sales/customer_invoice.column_line_amount_untaxed')) }}
{{ \App\Helpers\Helper::numberFormatRealDecimalPlace($result['Cantidad']) }} [{{ $result['ClaveUnidad'] }}] {{ $result['Unidad'] }} @if(!empty(setting('show_product_code_on_pdf'))) {{$result['NoIdentificacion'] ?? 'N/A'}} - {!! nl2br($result['Descripcion']) !!} ({{ $result['ClaveProdServ'] }}) @else {{ $result['ClaveProdServ'] }} - {!! nl2br($result['Descripcion']) !!} @endif @php //Complemento IEDU foreach(($result->ComplementoConcepto)() as $result2){ if((string)$result2 == 'instEducativas'){ echo '

'; echo __('sales/customer_invoice.column_line_iedu_iedu_nombre_alumno') . ': '.$result2['nombreAlumno'].'
'; echo __('sales/customer_invoice.column_line_iedu_iedu_curp') . ': '.$result2['CURP'].'
'; echo __('sales/customer_invoice.column_line_iedu_iedu_nivel_educativo') . ': '.$result2['nivelEducativo'].'
'; echo __('sales/customer_invoice.column_line_iedu_iedu_aut_rvoe') . ': '.$result2['autRVOE'].'
'; if(!empty($result2['rfcPago'])){ echo __('sales/customer_invoice.column_line_iedu_iedu_rfc_pago') . ': '.$result2['rfcPago'].'
'; } break; } } //Numero pedimento foreach(($result)() as $result2){ if((string)$result2 == 'InformacionAduanera'){ echo '

'; echo __('sales/customer_invoice.column_line_numero_pedimento') . ': '.$result2['NumeroPedimento'].'
'; break; } } @endphp
{{ \App\Helpers\Helper::numberFormatMoneyRealDecimalPlace($result['ValorUnitario'], $customer_invoice->currency->code) }} {{ \App\Helpers\Helper::numberFormatMoney(!empty($result['Descuento']) ? $result['Descuento'] : 0,2, $customer_invoice->currency->code) }} {{ money($result['Importe'],$customer_invoice->currency->code,true) }}
{{ \App\Helpers\Helper::numberFormat($result->quantity,$result->unitMeasure->decimal_place) }} {{ $result->unitMeasure->name_sat }} @if(!empty(setting('show_product_code_on_pdf'))) {{$result->product->code ?? 'N/A'}} - {!! nl2br($result->name) !!} ({{ $result->satProduct->code }}) @else {{ $result->satProduct->code }} - {!! nl2br($result->name) !!} @endif {{ \App\Helpers\Helper::numberFormatMoney($result->price_unit,!empty($result->product->price_decimal_place) ? $result->product->price_decimal_place : \App\Helpers\Helper::companyProductPriceDecimalPlace($customer_invoice->company_id), $customer_invoice->currency->code) }} {{ $result->discount_type == 'A' ? \App\Helpers\Helper::numberFormatMoney($result->discount,2, $customer_invoice->currency->code) : \App\Helpers\Helper::numberFormatPercentRealDecimalPlace($result->discount) }} {{ money($result->amount_untaxed,$customer_invoice->currency->code,true) }}
***({{\App\Helpers\Helper::numberToWordCurrency($customer_invoice->amount_total,$customer_invoice->currency->code,$customer_invoice->currency->decimal_place)}})*** @lang('general.text_amount_untaxed')
@if($customer_invoice->customerInvoiceTaxes->isNotEmpty()) @foreach($customer_invoice->customerInvoiceTaxes as $result) {{$result->name}}
@endforeach @endif {{ mb_strtoupper(__('general.text_amount_total')) }}
{{ money($customer_invoice->amount_untaxed,$customer_invoice->currency->code,true) }}
@if($customer_invoice->customerInvoiceTaxes->isNotEmpty()) @foreach($customer_invoice->customerInvoiceTaxes as $result) {{money(abs($result->amount_tax),$customer_invoice->currency->code,true)}}
@endforeach @endif {{ money($customer_invoice->amount_total,$customer_invoice->currency->code,true) }}
@lang('sales/customer_invoice.entry_payment_method_id'): {{ $customer_invoice->paymentMethod->name_sat }}
@lang('sales/customer_invoice.entry_payment_term_id'): {{ $customer_invoice->paymentTerm->name }}
@if(!empty($customer_invoice->origin)) @lang('sales/customer_invoice.entry_origin'): {{ $customer_invoice->origin }}
@endif @lang('general.text_issued_in'): {{ $customer_invoice->branchOffice->name ?? '' }} {!! ($customer_invoice->branchOffice->postcode ? '  ' . __('base/branch_office.entry_postcode') . ': ' . ($cfdi33['LugarExpedicion'] ?? $customer_invoice->branchOffice->postcode) : '') !!}
@if(!empty($customer_invoice->cfdi_relation_id))

@lang('sales/customer_invoice.tab_relations') - {{ $customer_invoice->cfdiRelation->name_sat }}

@if($customer_invoice->customerInvoiceRelations->isNotEmpty()) @foreach($customer_invoice->customerInvoiceRelations as $result) {{$result->relation->name ?? ''}}
@endforeach @endif
@if($customer_invoice->customerInvoiceRelations->isNotEmpty()) @foreach($customer_invoice->customerInvoiceRelations as $result) {{$result->uuid_related}}
@endforeach @endif
@endif @if($customer_invoice->customerInvoiceTaxLegends->isNotEmpty())

@lang('general.text_complement_tax_legend')

@foreach($customer_invoice->customerInvoiceTaxLegends as $result) @endforeach
@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')
{{ $result->disposicion_fiscal }} {{ $result->norma }} {!! nl2br($result->texto_leyenda) !!}
@endif @if(!empty($customer_invoice_complement->ine_process_type))

@lang('general.text_complement_ine')

@lang('sales/customer_invoice.entry_ine_process_type'): {{$customer_invoice_complement->ine_process_type}}
@lang('sales/customer_invoice.entry_ine_committee_type'): {{$customer_invoice_complement->ine_committee_type}}
@lang('sales/customer_invoice.entry_ine_id_accounting'): {{$customer_invoice_complement->ine_id_accounting}}
@foreach($customer_invoice->customerActiveInvoiceInes as $result) @endforeach
@lang('sales/customer_invoice.column_ine_ine_entity') @lang('sales/customer_invoice.column_ine_ambit') @lang('sales/customer_invoice.column_ine_id_accounting')
{{ $result->ine_entity_s }} {{ $result->ambit }} {!! $result->id_accounting !!}
@endif @if(!empty($customer_invoice->comment))

@lang('sales/customer_invoice.entry_comment')

{!! nl2br($customer_invoice->comment) !!}
@endif