@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($cfdi33)) @else @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) }}


{{ mb_strtoupper($customer_invoice->company->comercial_name) }}

@lang('base/company.text_transmitter'):
{{ mb_strtoupper($customer_invoice->company->name) }} @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 ?? ' ' }}
@lang('base/company.column_tax_regimen'):
{{ $data['tax_regimen'] ?? ($customer_invoice->taxRegimen->name_sat ?? $customer_invoice->company->taxRegimen->name_sat) }}
@lang('general.text_issued_in'): @if(!empty($customer_invoice->branchOffice->address_1) || !empty($customer_invoice->branchOffice->address_2))
{{ $customer_invoice->branchOffice->address_1 ?? '' }} {{ $customer_invoice->branchOffice->address_2 ?? '' }} @endif @if(!empty($customer_invoice->branchOffice->address_3) || !empty($customer_invoice->branchOffice->address_4))
{{ $customer_invoice->branchOffice->address_3 ?? '' }} {{ $customer_invoice->branchOffice->address_4 ?? '' }} @endif @if(!empty($customer_invoice->branchOffice->city->name) || !empty($customer_invoice->branchOffice->state->name))
{{ $customer_invoice->branchOffice->city->name ?? '' }}, {{ $customer_invoice->branchOffice->state->name ?? '' }} @endif
{{ $customer_invoice->branchOffice->country->name ?? '' }}{!! ($customer_invoice->branchOffice->postcode ? '  ' . __('base/branch_office.entry_postcode') . ': ' . ($cfdi33['LugarExpedicion'] ?? $customer_invoice->branchOffice->postcode) : '') !!}
 
@lang('general.text_cfdi_uuid'):
{{ $customer_invoice->customerInvoiceCfdi->uuid ?? '' }}
@lang('sales/customer_invoice.entry_date'):
{{ str_replace(' ',' ',\App\Helpers\Helper::convertSqlToDateTime($customer_invoice->date)) }}
@lang('sales/customer_invoice.entry_date_due'):
{{ \App\Helpers\Helper::convertSqlToDate($customer_invoice->date_due) }}
@lang('general.text_cfdi_tfd_fecha_timbrado'):
{{ \App\Helpers\Helper::convertSqlToDateTime(str_replace('T',' ',$cfdi33->complemento->timbreFiscalDigital['FechaTimbrado'])) }}
@lang('general.text_cfdi_certificado'):
{{ $cfdi33['NoCertificado'] }}
@lang('general.text_cfdi_tfd_no_certificado_sat'):
{{ $cfdi33->complemento->timbreFiscalDigital['NoCertificadoSAT'] }}
 
{{ mb_strtoupper(!empty($cfdi33->Receptor['Nombre']) ? $cfdi33->Receptor['Nombre'] : $customer_invoice->customer->name) }}
{{ mb_strtoupper($cfdi33->Receptor['Rfc'] ?? $customer_invoice->customer->taxid) }}
@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_invoice.entry_cfdi_use_id'): {{ $customer_invoice->cfdiUse->name_sat }}
@if(!empty($customer_invoice->origin)) @endif
@lang('sales/customer_invoice.entry_name') {{ $customer_invoice->name }}
@lang('base/document_type.entry_cfdi_type_id') {{ $customer_invoice->documentType->cfdiType->name_sat ?? ''}}
@lang('sales/customer_invoice.entry_payment_way_id') {{ $customer_invoice->paymentWay->name_sat }}
@lang('sales/customer_invoice.entry_currency_id') {{ $customer_invoice->currency->code }} @if($customer_invoice->currency->code!='MXN') {{ '   ' . __('sales/customer_invoice.entry_currency_value') . ': '. round($customer_invoice->currency_value,4)}} @endif
@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 }}
@lang('sales/customer_invoice.entry_origin') {{ $customer_invoice->origin }}
@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')) }} @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_unit_measure_id')) }} {{ 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']) }} @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
[{{ $result['ClaveUnidad'] }}] {{ $result['Unidad'] }} {{ \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) }} @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 {{ $result->unitMeasure->name_sat }} {{ \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) }}
{!! nl2br($customer_invoice->comment) !!}
***({{\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) }}
@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())
@foreach($customer_invoice->customerInvoiceTaxLegends as $result) @endforeach
@lang('general.text_complement_tax_legend')
@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($cfdi33))
@lang('general.text_cfdi_tfd_cadena_origen')
{{ $data['tfd_cadena_origen'] }}
@lang('general.text_cfdi_tfd_sello_cfdi')
{{ $cfdi33->complemento->timbreFiscalDigital['SelloCFD'] }}
@lang('general.text_cfdi_tfd_sello_sat')
{{ $cfdi33->complemento->timbreFiscalDigital['SelloSAT'] }}
@endif