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

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

@endif

{{ mb_strtoupper($list_document_type2[$customer_transfer->document_type2]) }}

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

{{ mb_strtoupper($customer_transfer->company->name) }}

@if(!empty(setting('enabled_projects')) && !empty(setting('projects_logo_docs'))) @elseif(!empty(setting('branch_office_logo_docs'))) @else @endif {{ mb_strtoupper($customer_transfer->company->taxid) }} @if(!empty($customer_transfer->company->address_1) || !empty($customer_transfer->company->address_2) || !empty($customer_transfer->company->address_3) || !empty($customer_transfer->company->address_4))
{{ $customer_transfer->company->address_1 ?? '' }} {{ $customer_transfer->company->address_2 ?? '' }} {{ $customer_transfer->company->address_3 ?? '' }} {{ $customer_transfer->company->address_4 ?? '' }} @endif @if(!empty($customer_transfer->company->city->name) || !empty($customer_transfer->company->state->name))
{{ !empty($customer_transfer->company->city->name) ? $customer_transfer->company->city->name . ', ' : '' }}{{ $customer_transfer->company->state->name ?? '' }} @endif
{{ $customer_transfer->company->country->name ?? '' }}{!! ($customer_transfer->company->postcode ? '  ' . __('base/company.entry_postcode') . ': ' . $customer_transfer->company->postcode : '') !!}
---
{{ $customer_transfer->company->phone ?? ' ' }}
{{ $customer_transfer->company->email ?? ' ' }}
---
@lang('base/company.entry_tax_regimen_id'): {{ $data['tax_regimen'] ?? ($customer_transfer->taxRegimen->name_sat ?? $customer_transfer->company->taxRegimen->name_sat) }}
@lang('general.text_issued_in'): {{ $customer_transfer->branchOffice->name ?? '' }} {!! ($customer_transfer->branchOffice->postcode ? '  ' . __('base/branch_office.entry_postcode') . ': ' . $customer_transfer->branchOffice->postcode : '') !!}
@lang('sales/customer_transfer.entry_name'):
{{ $customer_transfer->name }}
@lang('general.text_cfdi_uuid'):
{{ $customer_transfer->customerInvoiceCfdi->uuid ?? '' }}
@if(!empty($cfdi33)) @lang('general.text_cfdi_certificado'):
{{ $cfdi33['NoCertificado'] }}
@endif @lang('sales/customer_transfer.entry_date'):
{{ \App\Helpers\Helper::convertSqlToDateTime($customer_transfer->date) }}
{{ mb_strtoupper($customer_transfer->customer->name) }} @if(!empty($customer_transfer->customer->address_1) || !empty($customer_transfer->customer->address_2) || !empty($customer_transfer->customer->address_3) || !empty($customer_transfer->customer->address_4))
{{ $customer_transfer->customer->address_1 ?? '' }} {{ $customer_transfer->customer->address_2 ?? '' }} {{ $customer_transfer->customer->address_3 ?? '' }} {{ $customer_transfer->customer->address_4 ?? '' }} @endif @if(!empty($customer_transfer->customer->city->name) || !empty($customer_transfer->customer->state->name))
{{ !empty($customer_transfer->customer->city->name) ? $customer_transfer->customer->city->name . ', ' : '' }}{{ $customer_transfer->customer->state->name ?? '' }} @endif
{{ $customer_transfer->customer->country->name ?? '' }}{!! ($customer_transfer->customer->postcode ? '  ' . __('sales/customer.entry_postcode') . ': ' . $customer_transfer->customer->postcode : '') !!}
@lang('sales/customer.entry_taxid'): {{ mb_strtoupper($customer_transfer->customer->taxid) }}
@lang('sales/customer_transfer.entry_cfdi_use_id'): {{ $customer_transfer->cfdiUse->name_sat }}
@if($customer_transfer->document_type2 == 'invoice') @lang('sales/customer_transfer.entry_date_due'): {{ \App\Helpers\Helper::convertSqlToDate($customer_transfer->date_due) }}
@endif @lang('sales/customer_transfer.entry_payment_term_id'): {{ $customer_transfer->paymentTerm->name }}
@lang('sales/customer_transfer.entry_currency_id'): {{ $customer_transfer->currency->code }} @if($customer_transfer->currency->code!='MXN') {{ '   ' . __('sales/customer_transfer.entry_currency_value') . ': '. round($customer_transfer->currency_value,4)}} @endif
@if($customer_transfer->status == \App\Models\Sales\CustomerInvoice::CANCEL)
@if(!empty($customer_transfer->customerInvoiceCfdi->uuid)) @lang('general.text_canceled_cfdi') @else @if($customer_transfer->document_type2 == 'invoice') @lang('general.text_pre_invoice') @else @lang('general.text_pre_transfer') @endif @endif
@endif @if($draft)
@lang('general.text_pre_invoice')
@endif
{{ mb_strtoupper(__('sales/customer_transfer.entry_source_name')) }} {{ mb_strtoupper(__('sales/customer_transfer.entry_destination_name')) }}
{{ mb_strtoupper($customer_transfer->source_name) ?? '' }}
@lang('sales/customer_transfer.entry_source_address'): {!! nl2br($customer_transfer->source_address) ?? '' !!}
@lang('sales/customer_transfer.entry_source_delivery_on'): {{ $customer_transfer->source_delivery_on ?? '' }}
{{ mb_strtoupper($customer_transfer->destination_name) ?? '' }}
@lang('sales/customer_transfer.entry_destination_address'): {!! nl2br($customer_transfer->destination_address) ?? '' !!}
@lang('sales/customer_transfer.entry_destination_delivery_on'): {{ $customer_transfer->destination_delivery_on ?? '' }}
@foreach($customer_transfer->customerActiveInvoiceLineTransfers as $result) @endforeach
{{ mb_strtoupper(__('sales/customer_transfer.column_line_transfer_name')) }} {{ mb_strtoupper(__('sales/customer_transfer.column_line_transfer_weight')) }} {{ mb_strtoupper(__('sales/customer_transfer.column_line_transfer_m3')) }} {{ mb_strtoupper(__('sales/customer_transfer.column_line_transfer_liters')) }}
{!! nl2br($result->name) !!} {{ $result->weight ?? '-' }} {{ $result->m3>0 ? \App\Helpers\Helper::numberFormat($result->m3,0) : '-' }} {{ $result->liters>0 ? \App\Helpers\Helper::numberFormat($result->liters,0) : '-' }}
@lang('sales/customer_transfer.entry_date_delivery'): {{ $customer_transfer->date_delivery ? \App\Helpers\Helper::convertSqlToDate($customer_transfer->date_delivery) : '' }} @lang('sales/customer_transfer.entry_valid_amount'): {{ money($customer_transfer->valid_amount,$customer_transfer->currency->code,true) }} @lang('sales/customer_transfer.entry_dangerous_material'): {{ $customer_transfer->dangerous_material ? __('general.text_yes') : __('general.text_no') }}
@if($conceptos) @foreach($conceptos as $result) @php //Complemento concepto @endphp @endforeach @else @foreach($customer_transfer->customerActiveInvoiceLines as $result) @endforeach @endif @if($customer_transfer->document_type2 == 'invoice') @endif
{{ mb_strtoupper(__('sales/customer_transfer.column_line_quantity')) }} {{ mb_strtoupper(__('sales/customer_transfer.column_line_unit_measure_id')) }} {{ mb_strtoupper(__('sales/customer_transfer.column_line_sat_product_id')) . ' - ' . mb_strtoupper(__('sales/customer_transfer.column_line_name')) }} {{ mb_strtoupper(__('sales/customer_transfer.column_line_price_unit')) }} {{ mb_strtoupper(__('sales/customer_transfer.column_line_discount')) }} {{ mb_strtoupper(__('sales/customer_transfer.column_line_amount_untaxed')) }}
{{ \App\Helpers\Helper::numberFormatRealDecimalPlace($result['Cantidad']) }} [{{ $result['ClaveUnidad'] }}] {{ $result['Unidad'] }} {{ $result['ClaveProdServ'] }} - {!! nl2br($result['Descripcion']) !!} {{ \App\Helpers\Helper::numberFormatMoney($result['ValorUnitario'],\App\Helpers\Helper::companyProductPriceDecimalPlace($customer_transfer->company_id)) }} {{ \App\Helpers\Helper::numberFormat(!empty($result['Descuento']) ? $result['Descuento']/$result['Importe'] : 0,2) }} {{ money($result['Importe'],$customer_transfer->currency->code,true) }}
{{ \App\Helpers\Helper::numberFormat($result->quantity,$result->unitMeasure->decimal_place) }} {{ $result->unitMeasure->name_sat }} {{ $result->satProduct->code }} - {!! nl2br($result->name) !!} {{ \App\Helpers\Helper::numberFormatMoney($result->price_unit,\App\Helpers\Helper::companyProductPriceDecimalPlace($customer_transfer->company_id)) }} {{ \App\Helpers\Helper::numberFormat($result->discount,2) }} {{ money($result->amount_untaxed,$customer_transfer->currency->code,true) }}
***({{\App\Helpers\Helper::numberToWordCurrency($customer_transfer->amount_total,$customer_transfer->currency->code,$customer_transfer->currency->decimal_place)}})*** @lang('general.text_amount_untaxed')
@if($customer_transfer->customerInvoiceTaxes->isNotEmpty()) @foreach($customer_transfer->customerInvoiceTaxes as $result) {{$result->name}}
@endforeach @endif {{ mb_strtoupper(__('general.text_amount_total')) }}
{{ money($customer_transfer->amount_untaxed,$customer_transfer->currency->code,true) }}
@if($customer_transfer->customerInvoiceTaxes->isNotEmpty()) @foreach($customer_transfer->customerInvoiceTaxes as $result) {{money(abs($result->amount_tax),$customer_transfer->currency->code,true)}}
@endforeach @endif {{ money($customer_transfer->amount_total,$customer_transfer->currency->code,true) }}
@if(!empty($customer_transfer->cfdi_relation_id))

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

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

@lang('sales/customer_transfer.entry_comment')

{!! nl2br($customer_transfer->comment) !!}
@endif @if(!empty($customer_transfer->compensation))
@lang('sales/customer_transfer.entry_compensation')
{!! nl2br($customer_transfer->compensation) !!}
@endif
@lang('sales/customer_transfer.entry_driver'): {{ $customer_transfer->driver }} @lang('sales/customer_transfer.entry_vehicle'): {{ $customer_transfer->vehicle }} @lang('sales/customer_transfer.entry_vehicle_number'): {{ $customer_transfer->vehicle_number }} @lang('sales/customer_transfer.entry_vehicle_counter'): {{ $customer_transfer->vehicle_counter }}