@lang('sales/recurring_customer_invoice.document_title')

@include('flash::message')
@php //Obtiene datos del Cfdi33 $cfdi33 = !empty($data['cfdi33']) ? $data['cfdi33'] : []; @endphp

{{ mb_strtoupper($recurring_customer_invoice->company->name) }}
{{ $recurring_customer_invoice->company->taxRegimen->name_sat }}
{{ $recurring_customer_invoice->company->address_1 ?? '' }} {{ $recurring_customer_invoice->company->address_2 ?? '' }} {{ $recurring_customer_invoice->company->address_3 ?? '' }} {{ $recurring_customer_invoice->company->address_4 ?? '' }}
{{ $recurring_customer_invoice->company->city->name ?? '' }} , {{ ($recurring_customer_invoice->company->state->name ?? '') }}
{{ $recurring_customer_invoice->company->country->name ?? '' }}{!! ($recurring_customer_invoice->company->postcode ? '  ' . __('base/company.entry_postcode') . ': ' . $recurring_customer_invoice->company->postcode : '') !!}
{{ mb_strtoupper($recurring_customer_invoice->company->taxid) }}
---
{{ $recurring_customer_invoice->company->phone ?? ' ' }}
{{ $recurring_customer_invoice->company->email ?? ' ' }}

# {{ $recurring_customer_invoice->name }} {!! \App\Helpers\Helper::statusHumanRich($recurring_customer_invoice->status) !!}

@lang('sales/recurring_customer_invoice.entry_date_start') : {{ \App\Helpers\Helper::convertSqlToDate($recurring_customer_invoice->date_start) }}
@lang('sales/recurring_customer_invoice.entry_date_end') : {{ !empty($recurring_customer_invoice->date_end) ? \App\Helpers\Helper::convertSqlToDate($recurring_customer_invoice->date_end): '' }}
@lang('sales/recurring_customer_invoice.entry_date_last') : {{ !empty($recurring_customer_invoice->date_last) ? \App\Helpers\Helper::convertSqlToDate($recurring_customer_invoice->date_last): '' }}
@lang('sales/recurring_customer_invoice.entry_date_next') : {{ \App\Helpers\Helper::convertSqlToDate($recurring_customer_invoice->date_next) }}
@lang('sales/recurring_customer_invoice.entry_payment_term_id') : {{ $recurring_customer_invoice->paymentTerm->name }}
@lang('sales/recurring_customer_invoice.entry_cfdi_use_id') : {{ $recurring_customer_invoice->cfdiUse->name_sat }}
@lang('general.text_issued_in') : {{ $recurring_customer_invoice->branchOffice->name ?? '' }} {!! ($recurring_customer_invoice->branchOffice->postcode ? '  ' . __('base/branch_office.entry_postcode') . ': ' . $recurring_customer_invoice->branchOffice->postcode : '') !!}

{{ mb_strtoupper(__('general.text_customer')) }}

{{ mb_strtoupper($recurring_customer_invoice->customer->name) }}
{{ $recurring_customer_invoice->customer->address_1 ?? '' }} {{ $recurring_customer_invoice->customer->address_2 ?? '' }} {{ $recurring_customer_invoice->customer->address_3 ?? '' }} {{ $recurring_customer_invoice->customer->address_4 ?? '' }}
{{ $recurring_customer_invoice->customer->city->name ?? '' }} , {{ $recurring_customer_invoice->customer->state->name ?? '' }}
{{ $recurring_customer_invoice->customer->country->name ?? '' }}{!! ($recurring_customer_invoice->customer->postcode ? '  ' . __('sales/customer.entry_postcode') . ': ' . $recurring_customer_invoice->customer->postcode : '') !!}
{{ mb_strtoupper($recurring_customer_invoice->customer->taxid) }}
@lang('sales/recurring_customer_invoice.entry_tax_regimen_customer_id2') : {{ $recurring_customer_invoice->taxRegimenCustomer->name_sat ?? ($recurring_customer_invoice->customer->taxRegimen->name_sat ?? '') }}
@foreach($recurring_customer_invoice->recurringCustomerActiveInvoiceLines as $result) @endforeach
{{ mb_strtoupper(__('sales/recurring_customer_invoice.column_line_name')) }} {{ mb_strtoupper(__('sales/recurring_customer_invoice.column_line_sat_product_id')) }} {{ mb_strtoupper(__('sales/recurring_customer_invoice.column_line_unit_measure_id')) }} {{ mb_strtoupper(__('sales/recurring_customer_invoice.column_line_quantity')) }} {{ mb_strtoupper(__('sales/recurring_customer_invoice.column_line_price_unit')) }} {{ mb_strtoupper(__('sales/recurring_customer_invoice.column_line_discount')) }} {{ mb_strtoupper(__('sales/recurring_customer_invoice.column_line_amount_untaxed')) }}
{{ $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,!empty($result->product_id) ? $result->product->price_decimal_place : \App\Helpers\Helper::companyProductPriceDecimalPlace($recurring_customer_invoice->company_id)) }} {{ \App\Helpers\Helper::numberFormat($result->discount,2) }} {{ money($result->amount_untaxed,$recurring_customer_invoice->currency->code,true) }}
@lang('sales/recurring_customer_invoice.entry_payment_way_id') : {{ $recurring_customer_invoice->paymentWay->name_sat }}
@lang('sales/recurring_customer_invoice.entry_payment_method_id') : {{ $recurring_customer_invoice->paymentMethod->name_sat }}
@lang('sales/recurring_customer_invoice.entry_currency_id') : {{ $recurring_customer_invoice->currency->code }}{!! ($recurring_customer_invoice->currency->code!='MXN' ? '   '.__('sales/recurring_customer_invoice.entry_currency_value').': '.round($recurring_customer_invoice->currency_value,4) :'') !!}
@if($recurring_customer_invoice->recurringCustomerInvoiceTaxes->isNotEmpty()) @foreach($recurring_customer_invoice->recurringCustomerInvoiceTaxes as $result) @endforeach @endif
@lang('general.text_amount_untaxed') {{ money($recurring_customer_invoice->amount_untaxed,$recurring_customer_invoice->currency->code,true) }}
{{$result->name}} {{ money(abs($result->amount_tax),$recurring_customer_invoice->currency->code,true) }}
{{ mb_strtoupper(__('general.text_amount_total')) }} {{ money($recurring_customer_invoice->amount_total,$recurring_customer_invoice->currency->code,true) }}
@if(!empty($recurring_customer_invoice->comment))

@lang('sales/recurring_customer_invoice.entry_comment')

{{ $recurring_customer_invoice->comment }}
@endif