@php //Obtiene datos del Cfdi33 $draft = (int) $customer_fee->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_fee->customerInvoiceCfdi->pac->test)

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

@endif

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

# {{ $customer_fee->name }} {{ \App\Helpers\Helper::convertSqlToDateTime($customer_fee->date) }}

@lang('general.text_amount_total') @lang('sales/customer_fee.entry_date_due')
{{ money($customer_fee->amount_total,$customer_fee->currency->code,true) }} {{ \App\Helpers\Helper::convertSqlToDate($customer_fee->date_due) }}
{{ mb_strtoupper($customer_fee->company->comercial_name) }}
@if(!empty(setting('enabled_projects')) && !empty(setting('projects_logo_docs'))) @elseif(!empty(setting('branch_office_logo_docs'))) @else @endif
{{ mb_strtoupper($customer_fee->company->name) }}
{{ $data['tax_regimen'] ?? ($customer_fee->taxRegimen->name_sat ?? $customer_fee->company->taxRegimen->name_sat) }} @if(!empty($customer_fee->company->address_1) || !empty($customer_fee->company->address_2) || !empty($customer_fee->company->address_3) || !empty($customer_fee->company->address_4))
{{ $customer_fee->company->address_1 ?? '' }} {{ $customer_fee->company->address_2 ?? '' }} {{ $customer_fee->company->address_3 ?? '' }} {{ $customer_fee->company->address_4 ?? '' }} @endif @if(!empty($customer_fee->company->city->name) || !empty($customer_fee->company->state->name))
{{ !empty($customer_fee->company->city->name) ? $customer_fee->company->city->name . ', ' : '' }}{{ $customer_fee->company->state->name ?? '' }} @endif
{{ $customer_fee->company->country->name ?? '' }}{!! ($customer_fee->company->postcode ? '  ' . __('base/company.entry_postcode') . ': ' . $customer_fee->company->postcode : '') !!}
{{ mb_strtoupper($customer_fee->company->taxid) }}
---
{{ $customer_fee->company->phone ?? ' ' }} | {{ $customer_fee->company->email ?? ' ' }}
@lang('general.text_cfdi_uuid'): {{ $customer_fee->customerInvoiceCfdi->uuid ?? '' }}
@lang('base/document_type.entry_cfdi_type_id'): {{ $customer_fee->documentType->cfdiType->name_sat ?? '' }}
@lang('sales/customer_fee.entry_payment_term_id'): {{ $customer_fee->paymentTerm->name }}
@lang('sales/customer_fee.entry_cfdi_use_id'): {{ $customer_fee->cfdiUse->name_sat }}
@lang('general.text_issued_in'): {{ $customer_fee->branchOffice->name ?? '' }} {!! ($customer_fee->branchOffice->postcode ? '  ' . __('base/branch_office.entry_postcode') . ': ' . $customer_fee->branchOffice->postcode : '') !!}
{{ (__('general.text_customer')) }}

{{ mb_strtoupper($customer_fee->customer->name) }} @if(!empty($customer_fee->customer->address_1) || !empty($customer_fee->customer->address_2) || !empty($customer_fee->customer->address_3) || !empty($customer_fee->customer->address_4))
{{ $customer_fee->customer->address_1 ?? '' }} {{ $customer_fee->customer->address_2 ?? '' }} {{ $customer_fee->customer->address_3 ?? '' }} {{ $customer_fee->customer->address_4 ?? '' }}, @endif @if(!empty($customer_fee->customer->city->name) || !empty($customer_fee->customer->state->name))
{{ !empty($customer_fee->customer->city->name) ? $customer_fee->customer->city->name . ', ' : '' }}{{ $customer_fee->customer->state->name ?? '' }} @endif
{{ $customer_fee->customer->country->name ?? '' }}{!! ($customer_fee->customer->postcode ? '  ' . __('sales/customer.entry_postcode') . ': ' . $customer_fee->customer->postcode : '') !!}
{{ mb_strtoupper($customer_fee->customer->taxid) }}
@if($customer_fee->status == \App\Models\Sales\CustomerInvoice::CANCEL)
@if(!empty($customer_fee->customerInvoiceCfdi->uuid)) @lang('general.text_canceled_cfdi') @else @lang('general.text_canceled') @endif
@endif @if($draft)
@lang('general.text_pre_fee')
@endif
@if($conceptos) @foreach($conceptos as $result) @php //Complemento concepto @endphp @endforeach @else @foreach($customer_fee->customerActiveInvoiceLines as $result) @endforeach @endif
{{ mb_strtoupper(__('sales/customer_fee.column_line_name')) }} {{ mb_strtoupper(__('sales/customer_fee.column_line_sat_product_id')) }} {{ mb_strtoupper(__('sales/customer_fee.column_line_unit_measure_id')) }} {{ mb_strtoupper(__('sales/customer_fee.column_line_quantity')) }} {{ mb_strtoupper(__('sales/customer_fee.column_line_price_unit')) }} {{ mb_strtoupper(__('sales/customer_fee.column_line_discount')) }} {{ mb_strtoupper(__('sales/customer_fee.column_line_amount_untaxed')) }}
@if(!empty(setting('show_product_code_on_pdf'))) {{$result['NoIdentificacion'] ?? 'N/A'}} - @endif {!! nl2br($result['Descripcion']) !!} {{ $result['ClaveProdServ'] }} [{{ $result['ClaveUnidad'] }}] {{ $result['Unidad'] }} {{ \App\Helpers\Helper::numberFormatRealDecimalPlace($result['Cantidad']) }} {{ \App\Helpers\Helper::numberFormatMoney($result['ValorUnitario'],\App\Helpers\Helper::companyProductPriceDecimalPlace($customer_fee->company_id)) }} {{ \App\Helpers\Helper::numberFormat(!empty($result['Descuento']) ? $result['Descuento']/$result['Importe'] : 0,2) }} {{ money($result['Importe'],$customer_fee->currency->code,true) }}
@if(!empty(setting('show_product_code_on_pdf'))) {{$result->product->code ?? 'N/A'}} - @endif {!! nl2br($result->name) !!} {{ $result->satProduct->code }} {{ $result->unitMeasure->name_sat }} {{ \App\Helpers\Helper::numberFormat($result->quantity,$result->unitMeasure->decimal_place) }} {{ \App\Helpers\Helper::numberFormatMoney($result->price_unit,\App\Helpers\Helper::companyProductPriceDecimalPlace($customer_fee->company_id)) }} {{ \App\Helpers\Helper::numberFormat($result->discount,2) }} {{ money($result->amount_untaxed,$customer_fee->currency->code,true) }}
***({{\App\Helpers\Helper::numberToWordCurrency($customer_fee->amount_total,$customer_fee->currency->code,$customer_fee->currency->decimal_place)}})*** @lang('general.text_amount_untaxed')
@if($customer_fee->customerInvoiceTaxes->isNotEmpty()) @foreach($customer_fee->customerInvoiceTaxes as $result) {{$result->name}}
@endforeach @endif {{ mb_strtoupper(__('general.text_amount_total')) }}
{{ money($customer_fee->amount_untaxed,$customer_fee->currency->code,true) }}
@if($customer_fee->customerInvoiceTaxes->isNotEmpty()) @foreach($customer_fee->customerInvoiceTaxes as $result) {{money(abs($result->amount_tax),$customer_fee->currency->code,true)}}
@endforeach @endif {{ money($customer_fee->amount_total,$customer_fee->currency->code,true) }}
@lang('sales/customer_fee.entry_payment_way_id'): {{ $customer_fee->paymentWay->name_sat }}
@lang('sales/customer_fee.entry_payment_method_id'): {{ $customer_fee->paymentMethod->name_sat }}
@lang('sales/customer_fee.entry_currency_id'): {{ $customer_fee->currency->code }}{!! ($customer_fee->currency->code!='MXN' ? '   '.__('sales/customer_fee.entry_currency_value').': '.round($customer_fee->currency_value,4) :'') !!}
@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
@if(!empty($customer_fee->cfdi_relation_id))

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

@if($customer_fee->customerInvoiceRelations->isNotEmpty()) @foreach($customer_fee->customerInvoiceRelations as $result) {{$result->relation->name ?? ''}}
@endforeach @endif
@if($customer_fee->customerInvoiceRelations->isNotEmpty()) @foreach($customer_fee->customerInvoiceRelations as $result) {{$result->uuid_related}}
@endforeach @endif
@endif @if(!empty($customer_fee->comment))

@lang('sales/customer_fee.entry_comment')

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