@php $tipoComprobante = strtoupper($data['factura']['tipoDeComprobante'] ?? 'I'); @endphp
@if($logo_base64) Logo @else {{ $config['nombre_comercial'] ?? $data['emisor']['razonSocial'] }} @endif @if($config && $config['pdf_header_text'])
{!! nl2br(e($config['pdf_header_text'])) !!}
@endif

@if($tipoComprobante == 'I') REPRESENTACION IMPRESA DE CFDI - INGRESO @elseif($tipoComprobante == 'E') REPRESENTACION IMPRESA DE CFDI - EGRESO @elseif($tipoComprobante == 'P') REPRESENTACION IMPRESA DE CFDI - PAGO @else COMPROBANTE FISCAL DIGITAL @endif

UUID: {{ $data['uuid'] ?? '—' }}
Serie/Folio: {{ $data['factura']['serie'] ?? '' }}{{ $data['factura']['folio'] ?? '—' }}
Fecha Expedición: {{ $data['fechaemision'] ?? '—' }}
Lugar Expedición: {{ $data['factura']['expedicion'] ?? '—' }}
DATOS DEL EMISOR
{{ $data['emisor']['razonSocial'] ?? '—' }}
RFC: {{ $data['emisor']['rfc'] ?? '—' }}
Régimen: {{ $data['emisor']['regimenFiscal'] ?? '—' }}
DATOS DEL RECEPTOR
{{ $data['receptor']['razonSocial'] ?? '—' }}
RFC: {{ $data['receptor']['rfc'] ?? '—' }}
Uso CFDI: {{ $data['receptor']['usoCfdi'] ?? '—' }}
@if(isset($data['relacionadas']) && is_array($data['relacionadas']) && count($data['relacionadas']) > 0)
CFDI RELACIONADOS
@foreach($data['relacionadas'] as $rel) @endforeach
Tipo Relación: @php $tr = $data['relacionadas'][0]['tipo'] ?? ''; if($tr == '01') echo '01 - Nota de crédito de los documentos relacionados'; elseif($tr == '03') echo '03 - Devolución de mercancía'; else echo $tr; @endphp
UUID Relacionado: {{ $rel['uuid'] }}
@endif @if($tipoComprobante !== 'P')
Forma de Pago: {{ $data['factura']['formaPago'] ?? '—' }} Método de Pago: {{ $data['factura']['metodoPago'] ?? '—' }} Moneda: {{ $data['factura']['moneda'] ?? 'MXN' }}
@endif @if($tipoComprobante === 'P')
DOCUMENTOS RELACIONADOS AL PAGO
@if(isset($data['pagos_relacionados']) && is_array($data['pagos_relacionados']) && count($data['pagos_relacionados']) > 0) @foreach($data['pagos_relacionados'] as $pagoRel) @endforeach @endif
UUID Factura Base Imp. Saldo Anterior Importe Pagado Imp. Saldo Insoluto Parc.
{{ $pagoRel['uuid'] }} ${{ number_format((float)($pagoRel['saldo_anterior'] ?? 0), 2) }} ${{ number_format((float)($pagoRel['importe_pagado'] ?? 0), 2) }} ${{ number_format((float)($pagoRel['saldo_insoluto'] ?? 0), 2) }} {{ $pagoRel['parcialidad'] ?? '1' }}
@else @php $widths = $config['pdf_column_widths'] ?? [ 'clave' => 12, 'cantidad' => 8, 'unidad' => 10, 'descripcion' => 38, 'precio' => 10, 'descuento' => 10, 'importe' => 12 ]; @endphp @if(isset($data['concepto']) && is_array($data['concepto'])) @foreach($data['concepto'] as $concepto) @endforeach @endif
Clave SAT Cant. Unidad Descripción Precio Unit. Descuento Importe
{{ $concepto['productoSat'] ?? '—' }} {{ number_format((float)($concepto['cantidad'] ?? 1), 2) }} {{ $concepto['unidadSat'] ?? '' }} ({{ $concepto['unidad'] ?? '' }}) {{ $concepto['descripcion'] ?? '—' }} @if(isset($concepto['impuestos']) && is_array($concepto['impuestos']))
Impuestos: @foreach($concepto['impuestos'] as $imp) {{ $imp['tipo'] == 'traslado' ? 'Trsl' : 'Ret' }} {{ $imp['codigo'] == '002' ? 'IVA' : 'ISR' }} @if(isset($imp['tasa']))({{ number_format((float)$imp['tasa']*100, 1) }}%)@endif ${{ number_format((float)$imp['importe'], 2) }} @endforeach
@endif
${{ number_format((float)($concepto['precio'] ?? 0), 2) }} -${{ number_format((float)($concepto['descuento'] ?? 0), 2) }} ${{ number_format((float)($concepto['importe'] ?? 0), 2) }}
@endif
IMPORTE CON LETRA:
{{ $importe_letra ?? '—' }}
@if($tipoComprobante === 'P') @php $montoPagoAcumulado = 0; if (isset($data['pagos_relacionados']) && is_array($data['pagos_relacionados'])) { foreach ($data['pagos_relacionados'] as $pr) { $montoPagoAcumulado += (float)($pr['importe_pagado'] ?? 0); } } @endphp
SUBTOTAL: $0.00
TOTAL: $0.00
PAGO RECIBIDO: ${{ number_format($montoPagoAcumulado, 2) }}
@else @if(isset($data['factura']['descuento']) && $data['factura']['descuento'] > 0) @endif @if(isset($data['impuestos_federales']) && is_array($data['impuestos_federales'])) @foreach($data['impuestos_federales'] as $impFed) @endforeach @endif
SUBTOTAL: ${{ number_format((float)($data['factura']['subtotal'] ?? 0), 2) }}
DESCUENTO: -${{ number_format((float)$data['factura']['descuento'], 2) }}
{{ $impFed['codigo'] == '002' ? 'IVA' : 'ISR' }} ({{ $impFed['tipo'] }}): ${{ number_format((float)$impFed['importe'], 2) }}
TOTAL: ${{ number_format((float)($data['factura']['total'] ?? 0), 2) }}
@endif
@if($qr_base64) QR SAT @endif
Certificado SAT: {{ $data['certificadosat'] ?? '—' }}
Certificado Emisor: {{ $data['certificadoemisor'] ?? '—' }}
Versión CFDI: {{ $data['versionCfdi'] ?? '3.3' }}
Sello Emisor:
{{ $data['sellocfd'] ?? $data['sellodigital'] ?? '—' }}
Sello SAT:
{{ $data['sellosat'] ?? '—' }}
@if($config && $config['pdf_footer_text']) @endif