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

@if(!empty(setting('enabled_projects')) && !empty(setting('projects_logo_docs'))) @elseif(!empty(setting('branch_office_logo_docs'))) @else @endif {{ mb_strtoupper($customer_foreign_trade->company->name) }}
{{ $data['tax_regimen'] ?? ($customer_foreign_trade->taxRegimen->name_sat ?? $customer_foreign_trade->company->taxRegimen->name_sat) }}
{{ $customer_foreign_trade->company->address_1 ?? '' }} {{ $customer_foreign_trade->company->address_2 ?? '' }} {{ $customer_foreign_trade->company->address_3 ?? '' }} {{ $customer_foreign_trade->company->address_4 ?? '' }}
{{ $customer_foreign_trade->company->city->name ?? '' }}, {{ ($customer_foreign_trade->company->state->name ?? '') }}
{{ $customer_foreign_trade->company->country->name ?? '' }}{!! ($customer_foreign_trade->company->postcode ? '  ' . __('base/company.entry_postcode') . ': ' . $customer_foreign_trade->company->postcode : '') !!}
{{ mb_strtoupper($customer_foreign_trade->company->taxid) }}
---
{{ $customer_foreign_trade->company->phone ?? ' ' }}
{{ $customer_foreign_trade->company->email ?? ' ' }}
# {{ $customer_foreign_trade->name }} {{ mb_strtoupper(__('general.text_customer')) }}
@lang('general.text_cfdi_uuid') : {{ $customer_foreign_trade->customerInvoiceCfdi->uuid ?? '' }}
@lang('base/document_type.entry_cfdi_type_id') : {{ $customer_foreign_trade->documentType->cfdiType->name_sat ?? '' }}
@lang('sales/customer_foreign_trade.entry_date') : {{ \App\Helpers\Helper::convertSqlToDateTime($customer_foreign_trade->date) }}
@lang('sales/customer_foreign_trade.entry_date_due') : {{ \App\Helpers\Helper::convertSqlToDate($customer_foreign_trade->date_due) }}
@lang('sales/customer_foreign_trade.entry_payment_term_id') : {{ $customer_foreign_trade->paymentTerm->name }}
@lang('sales/customer_foreign_trade.entry_cfdi_use_id') : {{ $customer_foreign_trade->cfdiUse->name_sat }}
@lang('general.text_issued_in') : {{ $customer_foreign_trade->branchOffice->name ?? '' }} {!! ($customer_foreign_trade->branchOffice->postcode ? '  ' . __('base/branch_office.entry_postcode') . ': ' . $customer_foreign_trade->branchOffice->postcode : '') !!}
{{ mb_strtoupper($customer_foreign_trade->customer->name) }}
{{ $customer_foreign_trade->customer->address_1 ?? '' }} {{ $customer_foreign_trade->customer->address_2 ?? '' }} {{ $customer_foreign_trade->customer->address_3 ?? '' }} {{ $customer_foreign_trade->customer->address_4 ?? '' }}
{{ $customer_foreign_trade->customer->city->name ?? '' }} , {{ $customer_foreign_trade->customer->state->name ?? '' }}
{{ $customer_foreign_trade->customer->country->name ?? '' }}{!! ($customer_foreign_trade->customer->postcode ? '  ' . __('sales/customer.entry_postcode') . ': ' . $customer_foreign_trade->customer->postcode : '') !!}
@lang('sales/customer_foreign_trade.entry_taxid'): {{ $customer_foreign_trade->customer->taxid }}
@lang('sales/customer_foreign_trade.entry_tax_regimen_customer_id2'): {{ $customer_foreign_trade->taxRegimenCustomer->name_sat ?? ($customer_foreign_trade->customer->taxRegimen->name_sat ?? '') }}
@lang('general.text_invalid_cfdi')
@foreach($customer_foreign_trade->customerActiveInvoiceLines as $result) @endforeach
{{ mb_strtoupper(__('sales/customer_foreign_trade.column_line_name')) }} {{ mb_strtoupper(__('sales/customer_foreign_trade.column_line_sat_product_id')) }} {{ mb_strtoupper(__('sales/customer_foreign_trade.column_line_unit_measure_id')) }} {{ mb_strtoupper(__('sales/customer_foreign_trade.column_line_quantity')) }} {{ mb_strtoupper(__('sales/customer_foreign_trade.column_line_price_unit')) }} {{ mb_strtoupper(__('sales/customer_foreign_trade.column_line_discount')) }} {{ mb_strtoupper(__('sales/customer_foreign_trade.column_line_amount_untaxed')) }}
{!! 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_foreign_trade->company_id)) }} {{ \App\Helpers\Helper::numberFormat($result->discount,2) }} {{ money($result->amount_untaxed,$customer_foreign_trade->currency->code,true) }}
***({{\App\Helpers\Helper::numberToWordCurrency($customer_foreign_trade->amount_total,$customer_foreign_trade->currency->code,$customer_foreign_trade->currency->decimal_place)}} )*** @lang('general.text_amount_untaxed')
@if($customer_foreign_trade->customerInvoiceTaxes->isNotEmpty()) @foreach($customer_foreign_trade->customerInvoiceTaxes as $result) {{$result->name}}
@endforeach @endif {{ mb_strtoupper(__('general.text_amount_total')) }}
{{ money($customer_foreign_trade->amount_untaxed,$customer_foreign_trade->currency->code,true) }}
@if($customer_foreign_trade->customerInvoiceTaxes->isNotEmpty()) @foreach($customer_foreign_trade->customerInvoiceTaxes as $result) {{ money(abs($result->amount_tax),$customer_foreign_trade->currency->code,true) }}
@endforeach @endif {{ money($customer_foreign_trade->amount_total,$customer_foreign_trade->currency->code,true) }}
@lang('sales/customer_foreign_trade.entry_payment_way_id') : {{ $customer_foreign_trade->paymentWay->name_sat }}
@lang('sales/customer_foreign_trade.entry_payment_method_id') : {{ $customer_foreign_trade->paymentMethod->name_sat }}
@lang('sales/customer_foreign_trade.entry_currency_id') : {{ $customer_foreign_trade->currency->code }}{!! ($customer_foreign_trade->currency->code!='MXN' ? '   '.__('sales/customer_foreign_trade.entry_currency_value').': '.round($customer_foreign_trade->currency_value,4) :'') !!}
@if(!empty($customer_foreign_trade->cfdi_relation_id))

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

@if($customer_foreign_trade->customerInvoiceRelations->isNotEmpty()) @foreach($customer_foreign_trade->customerInvoiceRelations as $result) {{$result->relation->name}}
@endforeach @endif
@if($customer_foreign_trade->customerInvoiceRelations->isNotEmpty()) @foreach($customer_foreign_trade->customerInvoiceRelations as $result) {{$result->relation->customerInvoiceCfdi->uuid}}
@endforeach @endif
@endif @if(!empty($customer_foreign_trade->comment))

@lang('sales/customer_foreign_trade.entry_comment')

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