{{-- New-Unity ERP | app/Modules/Billing/Resources/Views/Mexico/formats/classic.blade.php | v1.0 | 05/08/2026 --}} {{-- v1.0 — Formato clásico BYNET: diseño de UnityERP/print.blade.php adaptado a variables de New-Unity ERP. --}} {{-- Variables: $data (objeto), $details (colección), $invoice_cfdi (objeto con qr/cadena_original/tdf). --}} @php $themeColor = $data->color ?? '#2c3e50'; @endphp {{ __('invoices.invoice') }} {{-- ═══════════════════════════ BANDA SUPERIOR — NOMBRE EMPRESA ═══════════════════════════ --}}
{{ strtoupper($data->company_name ?? '') }}
{{-- ═══════════════════════════ LOGOTIPOS + TIPO COMPROBANTE + FOLIO ═══════════════════════════ --}}
@if(!empty($data->company_logo)) @endif @if(!empty($data->sponsor_logo_1 ?? '')) @endif @if(!empty($data->sponsor_logo_3 ?? '')) @endif @if(!empty($data->tdf['TipoDeComprobante'] ?? '')) {{ __('invoices.cfdi_tipo_'.$data->tdf['TipoDeComprobante']) }} @else {{ __('invoices.INVOICE') }} @endif
{{ $data->folio ?? '' }} @if(!empty($data->serie ?? '')) · Serie {{ $data->serie }} @endif
{{-- ═══════════════════════════ EMISOR | CERTIFICACIÓN | RECEPTOR + DATOS DE PAGO ═══════════════════════════ --}} {{-- Datos del emisor --}} {{-- Datos de certificación --}} {{-- Receptor + datos de pago --}}
RFC: {{ $data->contributor->rfc ?? '' }}
{{ $data->contributor->street ?? '' }}
@if(!empty($data->contributor->street2 ?? '')) {{ $data->contributor->street2 }}
@endif @php $emisorParts = array_filter([ mb_strtoupper($data->contributor->city ?? '', 'UTF-8'), mb_strtoupper($data->contributor->state ?? '', 'UTF-8'), mb_strtoupper($data->contributor->country ?? '', 'UTF-8'), ]); @endphp {{ implode(', ', $emisorParts) }}
@if(!empty($data->contributor->postal_code ?? '')) CP {{ $data->contributor->postal_code }}
@endif @if(!empty($data->contributor->phone ?? '')) Tel. {{ $data->contributor->phone }} @endif
{{ __('invoices.certification_date') }}:
{{ $data->tdf['FechaTimbrado'] ?? '—' }}

{{ __('invoices.certificate') }}:
{{ $data->tdf['NoCertificado'] ?? '—' }}

{{ __('invoices.fiscal_folio') }}:
{{ $data->tdf['UUID'] ?? '—' }}

{{ __('invoices.certificate_sat') }}:
{{ $data->tdf['NoCertificado'] ?? '—' }}
{{ __('invoices.date') }}: {{ $data->date ?? '' }}
{{ __('invoices.customer') }}: {{ $data->customer_name ?? '' }}
{{ __('customers.taxid') }}: {{ $data->customer_rfc ?? '' }}
@if(($data->customer_rfc ?? '') !== 'XAXX010101000' && ($data->customer_rfc ?? '') !== 'XEXX010101000') {{ __('customers.address') }}: {{ $data->customer_address ?? '' }}
{{ __('customers.city') }}: {{ $data->customer_city ?? '' }}
{{ __('customers.state') }}: {{ $data->customer_state ?? '' }}   CP: {{ $data->customer_postal_code ?? '' }}
@else CP: {{ $data->customer_postal_code ?? '' }}
@endif
{{ __('invoices.payment_data') }}
{{ __('invoices.voucher_type') }}: @if(!empty($data->tdf['TipoDeComprobante'] ?? '')) {{ __('invoices.cfdi_tipo_'.$data->tdf['TipoDeComprobante']) }} @else Ingreso @endif
{{ __('invoices.cfdi_uso') }}: {{ $data->cfdi_uso ?? '—' }}
{{ __('invoices.payway') }}: {{ $data->payment_way ?? '—' }}
{{ __('invoices.paymethod') }}: {{ $data->payment_method ?? '—' }}
{{-- ═══════════════════════════ CONDICIONES DE PAGO ═══════════════════════════ --}} @if(!empty($data->petition ?? '')) @endif @if(isset($data->tdf['CfdiRelacionados']) && count($data->tdf['CfdiRelacionados'])) @endif
{{ __('invoices.pay_conditions') }}:
{{ $data->condition_pay ?? '—' }}
{{ __('invoices.payment_expiration') }}:
{{ isset($data->expiration_date) && $data->expiration_date !== '31-12-1969' ? $data->expiration_date : '—' }}
{{ __('invoices.purchase_order') }}:
{{ $data->purchase_order ?: '—' }}
{{ __('invoices.quote_number') }}:
{{ $data->quote_id ?? '—' }}
{{ __('invoices.petition') }}: {{ $data->petition }}
{{ __('invoices.tipo_rela') }}:
{{ array_key_first($data->tdf['CfdiRelacionados']) }}
{{ __('invoices.tipo_rela_uuid') }}:
@foreach($data->tdf['CfdiRelacionados'] as $rela => $UUIDs) @foreach($UUIDs as $UUID)
{{ $UUID }}
@endforeach @endforeach
{{-- ═══════════════════════════ TABLA DE CONCEPTOS / PARTIDAS ═══════════════════════════ --}} @php $totalProducts = count($details); @endphp @foreach($details as $nKey => $detail) @endforeach
{{ __('invoices.product_description') }}
{{ __('invoices.QUANTITY') }} {{ __('invoices.UNITY') }} {{ __('invoices.UNITY_CODE') }} {{ __('invoices.PART_NUMBER') }} {{ __('invoices.SAT_CODE') }} {{ __('invoices.CONCEPT') }} {{ __('invoices.UNIT_PRICE') }} Desc. {{ __('invoices.TOTAL') }}
{{ $detail->quantity }} {{ $detail->unity_name ?? $detail->unity }} {{ $detail->unity }} {{ $detail->product_id ?? '—' }} {{ $detail->tax_code ?? '' }} {!! html_entity_decode($detail->product_name, ENT_QUOTES, 'UTF-8') !!} @if($totalProducts === 1 && !empty($detail->description ?? ''))
{!! html_entity_decode($detail->description, ENT_QUOTES, 'UTF-8') !!} @endif
${{ number_format((float)$detail->sales_price, 2, '.', ',') }} {{ $detail->disc_per ?? 0 }}% ${{ number_format((float)$detail->amount, 2, '.', ',') }}
{{-- ═══════════════════════════ TOTAL CON LETRA + OBSERVACIONES + TOTALES ═══════════════════════════ --}}
{{ __('invoices.TOTAL_LETTER') }}: {{ strtoupper($data->total_letter ?? '') }} {{ $data->total_letter_decimal ?? '' }}
@if(!empty($data->observations ?? ''))
{{ __('invoices.OBSERVATIONS') }}: {{ $data->observations }}
@endif
{{ __('invoices.SUBTOTAL') }}: {{ $data->subtotal ?? '' }} {{ $data->currency ?? '' }}
{{ __('invoices.discount') }}: {{ $data->discount ?? '' }} {{ $data->currency ?? '' }}
{{ __('invoices.TAX') }} {{ $data->tax_perc ?? '' }}: {{ $data->tax ?? '' }} {{ $data->currency ?? '' }}
{{ __('invoices.TOTAL') }}: {{ $data->total ?? '' }} {{ $data->currency ?? '' }}
{{-- ═══════════════════════════ PIE DE PÁGINA FIJO (cadena, sellos, QR) ═══════════════════════════ --}}