@php //Obtiene datos del Cfdi33 $draft = (int) $customer_lease->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_lease->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 @if(!empty($customer_lease->company->comercial_name)) {{ mb_strtoupper($customer_lease->company->comercial_name) }}

@endif {{ mb_strtoupper($customer_lease->company->name) }} @if(!empty($customer_lease->company->address_1) || !empty($customer_lease->company->address_2) || !empty($customer_lease->company->address_3) || !empty($customer_lease->company->address_4))
{{ $customer_lease->company->address_1 ?? '' }} {{ $customer_lease->company->address_2 ?? '' }} {{ $customer_lease->company->address_3 ?? '' }} {{ $customer_lease->company->address_4 ?? '' }} @endif @if(!empty($customer_lease->company->city->name) || !empty($customer_lease->company->state->name))
{{ !empty($customer_lease->company->city->name) ? $customer_lease->company->city->name . ', ' : '' }}{{ $customer_lease->company->state->name ?? '' }} @endif
{{ $customer_lease->company->country->name ?? '' }}{!! ($customer_lease->company->postcode ? '  ' . __('base/company.entry_postcode') . ': ' . $customer_lease->company->postcode : '') !!}
{{ mb_strtoupper($customer_lease->company->taxid) }}
---
{{ $customer_lease->company->phone ?? ' ' }}
{{ $customer_lease->company->email ?? ' ' }}
@lang('general.text_issued_in')
@if(!empty($customer_lease->branchOffice->address_1) || !empty($customer_lease->branchOffice->address_2))
{{ $customer_lease->branchOffice->address_1 ?? '' }} {{ $customer_lease->branchOffice->address_2 ?? '' }} @endif @if(!empty($customer_lease->branchOffice->address_3) || !empty($customer_lease->branchOffice->address_4))
{{ $customer_lease->branchOffice->address_3 ?? '' }} {{ $customer_lease->branchOffice->address_4 ?? '' }} @endif @if(!empty($customer_lease->branchOffice->city->name) || !empty($customer_lease->branchOffice->state->name))
{{ $customer_lease->branchOffice->city->name ?? '' }}, {{ $customer_lease->branchOffice->state->name ?? '' }} @endif
{{ $customer_lease->branchOffice->country->name ?? '' }}{!! ($customer_lease->branchOffice->postcode ? '  ' . __('base/branch_office.entry_postcode') . ': ' . $customer_lease->branchOffice->postcode : '') !!}
@lang('sales/customer_lease.entry_date') {{ mb_strtoupper($customer_lease->documentType->name) }}
{!! str_replace(' ','
',\App\Helpers\Helper::convertSqlToDateTime($customer_lease->date)) !!}
{{ $customer_lease->name }}
 
@lang('general.text_cfdi_uuid')
{{ $customer_lease->customerInvoiceCfdi->uuid ?? '' }}
{{mb_strtoupper(__('base/company.column_tax_regimen'))}}: {{ $data['tax_regimen'] ?? ($customer_lease->taxRegimen->name_sat ?? $customer_lease->company->taxRegimen->name_sat) }}
@lang('general.text_customer')
{{ mb_strtoupper(!empty($cfdi33->Receptor['Nombre']) ? $cfdi33->Receptor['Nombre'] : $customer_lease->customer->name) }}
@lang('sales/customer_lease.entry_taxid'): {{ mb_strtoupper($cfdi33->Receptor['Rfc'] ?? $customer_lease->customer->taxid) }}
@lang('sales/customer_lease.entry_tax_regimen_customer_id2'): {{ $data['tax_regimen_customer'] ?? ($customer_lease->taxRegimenCustomer->name_sat ?? $customer_lease->customer->taxRegimen->name_sat) }}
@if(!empty($customer_lease->customer->address_1) || !empty($customer_lease->customer->address_2) || !empty($customer_lease->customer->address_3) || !empty($customer_lease->customer->address_4)) {{ $customer_lease->customer->address_1 ?? '' }} {{ $customer_lease->customer->address_2 ?? '' }} {{ $customer_lease->customer->address_3 ?? '' }} {{ $customer_lease->customer->address_4 ?? '' }}
@endif @if(!empty($customer_lease->customer->city->name) || !empty($customer_lease->customer->state->name)) {{ !empty($customer_lease->customer->city->name) ? $customer_lease->customer->city->name . ', ' : '' }}{{ $customer_lease->customer->state->name ?? '' }}
@endif {{ $customer_lease->customer->country->name ?? '' }}{!! ($customer_lease->customer->postcode ? '  ' . __('sales/customer.entry_postcode') . ': ' . $customer_lease->customer->postcode : '') !!}
@if($customer_lease->status == \App\Models\Sales\CustomerInvoice::CANCEL)
@if(!empty($customer_lease->customerInvoiceCfdi->uuid)) @lang('general.text_canceled_cfdi') @else @lang('general.text_canceled') @endif
@endif @if($draft)
@lang('general.text_pre_lease')
@endif
@if($conceptos) @foreach($conceptos as $result) @php //Complemento concepto @endphp @endforeach @else @foreach($customer_lease->customerActiveInvoiceLines as $result) @endforeach @endif
{{ mb_strtoupper(__('sales/customer_lease.column_line_sat_product_id')) }} {{ mb_strtoupper(__('sales/customer_lease.column_line_quantity')) }} {{ mb_strtoupper(__('sales/customer_lease.column_line_name')) }} {{ mb_strtoupper(__('sales/customer_lease.column_line_unit_measure_id')) }} {{ mb_strtoupper(__('sales/customer_lease.column_line_price_unit')) }} {{ mb_strtoupper(__('sales/customer_lease.column_line_discount')) }} {{ mb_strtoupper(__('sales/customer_lease.column_line_amount_untaxed')) }}
{{ $result['ClaveProdServ'] }} {{ \App\Helpers\Helper::numberFormatRealDecimalPlace($result['Cantidad']) }} @if(!empty(setting('show_product_code_on_pdf'))) {{$result['NoIdentificacion'] ?? 'N/A'}} - @endif {!! nl2br($result['Descripcion']) !!} @php echo '
'; echo __('sales/customer_lease.column_line_tax_object') . ': '.$result['ObjetoImp'].'
'; @endphp @php //Numero predial foreach(($result)() as $result2){ if((string)$result2 == 'CuentaPredial'){ echo '

'; echo __('sales/customer_lease.column_line_numero_predial') . ': '.$result2['Numero'].'
'; break; } } @endphp
[{{ $result['ClaveUnidad'] }}] {{ $result['Unidad'] }} {{ \App\Helpers\Helper::numberFormatMoney($result['ValorUnitario'],\App\Helpers\Helper::companyProductPriceDecimalPlace($customer_lease->company_id)) }} {{ \App\Helpers\Helper::numberFormat(!empty($result['Descuento']) ? $result['Descuento']/$result['Importe'] : 0,2) }} {{ money($result['Importe'],$customer_lease->currency->code,true) }}
{{ $result->satProduct->code }} {{ \App\Helpers\Helper::numberFormat($result->quantity,$result->unitMeasure->decimal_place) }} @if(!empty(setting('show_product_code_on_pdf'))) {{$result->product->code ?? 'N/A'}} - @endif {!! nl2br($result->name) !!} {{ $result->unitMeasure->name_sat }} {{ \App\Helpers\Helper::numberFormatMoney($result->price_unit,\App\Helpers\Helper::companyProductPriceDecimalPlace($customer_lease->company_id)) }} {{ \App\Helpers\Helper::numberFormat($result->discount,2) }} {{ money($result->amount_untaxed,$customer_lease->currency->code,true) }}
{!! nl2br($customer_lease->comment) !!}
***({{\App\Helpers\Helper::numberToWordCurrency($customer_lease->amount_total,$customer_lease->currency->code,$customer_lease->currency->decimal_place)}})*** @lang('general.text_amount_untaxed')
@if($customer_lease->customerInvoiceTaxes->isNotEmpty()) @foreach($customer_lease->customerInvoiceTaxes as $result) {{$result->name}}
@endforeach @endif {{ mb_strtoupper(__('general.text_amount_total')) }}
{{ money($customer_lease->amount_untaxed,$customer_lease->currency->code,true) }}
@if($customer_lease->customerInvoiceTaxes->isNotEmpty()) @foreach($customer_lease->customerInvoiceTaxes as $result) {{money(abs($result->amount_tax),$customer_lease->currency->code,true)}}
@endforeach @endif {{ money($customer_lease->amount_total,$customer_lease->currency->code,true) }}
@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 @if(!empty($customer_lease->cfdi_relation_id))

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

@if($customer_lease->customerInvoiceRelations->isNotEmpty()) @foreach($customer_lease->customerInvoiceRelations as $result) {{$result->relation->name ?? ''}}
@endforeach @endif
@if($customer_lease->customerInvoiceRelations->isNotEmpty()) @foreach($customer_lease->customerInvoiceRelations as $result) {{$result->uuid_related}}
@endforeach @endif
@endif
@if(!empty($cfdi33)) @endif @lang('base/document_type.entry_cfdi_type_id'):
@lang('sales/customer_lease.entry_date'):
@lang('sales/customer_lease.entry_date_due'):
@if(!empty($cfdi33)) @lang('general.text_cfdi_tfd_fecha_timbrado'):
@lang('general.text_cfdi_certificado'):
@lang('general.text_cfdi_tfd_no_certificado_sat'):
@endif @lang('sales/customer_lease.entry_payment_way_id'):
@lang('sales/customer_lease.entry_payment_method_id'):
@lang('sales/customer_lease.entry_payment_term_id'):
@lang('sales/customer_lease.entry_cfdi_use_id'):
{{ $customer_lease->documentType->cfdiType->name_sat ?? '' }}
{{\App\Helpers\Helper::convertSqlToDateTime($customer_lease->date)}}
{{ \App\Helpers\Helper::convertSqlToDate($customer_lease->date_due) }}
@if(!empty($cfdi33)) {{ \App\Helpers\Helper::convertSqlToDateTime(str_replace('T',' ',$cfdi33->complemento->timbreFiscalDigital['FechaTimbrado'])) }}
{{ $cfdi33['NoCertificado'] }}
{{ $cfdi33->complemento->timbreFiscalDigital['NoCertificadoSAT'] }}
@endif {{ $customer_lease->paymentWay->name_sat }}
{{ $customer_lease->paymentMethod->name_sat }}
{{ $customer_lease->paymentTerm->name }}
{{ $customer_lease->cfdiUse->name_sat }}
@lang('sales/customer_lease.entry_currency_id'):
@lang('sales/customer_lease.entry_currency_value'):
{{ $customer_lease->currency->code }}
{!! ($customer_lease->currency->code!='MXN' ? round($customer_lease->currency_value,4) :'') !!}