{{-- Encabezado de la tarjeta --}}
{{-- Botonera de descargas directa --}}
{{-- Datos del Cliente y Empresa --}}
{{-- Tabla de Ítems / Productos --}}
{{-- Totales y Liquidación --}}
{{-- Estado SUNAT si aplica --}}
@if (in_array($venta->tipo, ['factura', 'boleta']))
@if ($venta->sunat_hash)
@endif
{{ match($venta->tipo) { 'factura'=>'Factura Electrónica', 'boleta'=>'Boleta de Venta Electrónica', 'nota_credito'=>'Nota de Crédito', 'nota_debito'=>'Nota de Débito', default=>'Comprobante de Pago' } }}
{{-- Total destacado --}}
{{ $venta->referencia }}
Fecha de emisión: {{ $venta->fecha->format('d/m/Y H:i') }}
Total Pagado
{{ formato_moneda($venta->total) }}
{{ match($venta->forma_pago) { 'efectivo'=>'Efectivo', 'tarjeta'=>'Tarjeta', 'mixto'=>'Pago Mixto', default=>ucfirst($venta->forma_pago) } }}
Descargar PDF (A4)
Ver Formato Ticket (80mm)
@if ($venta->sunat_xml_path)
📄 Descargar XML
@endif
@if ($venta->sunat_cdr_path)
📦 Constancia CDR SUNAT
@endif
Datos del Cliente
{{ $venta->cliente ? ($venta->cliente->nombre_completo ?? $venta->cliente->nombre) : 'Cliente Contado / Consumidor Final' }}
@if ($venta->cliente?->nif)Doc / RUC: {{ $venta->cliente->nif }}
@endif @if ($venta->cliente?->direccion)Dirección: {{ $venta->cliente->direccion }}
@endif
Emisor
{{ $config?->nombre_empresa ?? $config?->nombre_comercial ?? 'Librería' }}
RUC: {{ $config?->nif ?? '20000000001' }}
@if ($config?->direccion){{ $config->direccion }}
@endifDetalle de la compra
| Ítem / Descripción | Cant. | Precio Unit. | Total |
|---|---|---|---|
|
{{ $det->descripcion }}
@if ($det->producto?->codigo)
Cód: {{ $det->producto->codigo }}
@endif
|
{{ number_format($det->cantidad, 0) }} | {{ formato_moneda($det->precio_unitario) }} | {{ formato_moneda($det->total) }} |
Subtotal:
{{ formato_moneda($venta->subtotal) }}
@if ($venta->descuento_importe > 0)
Descuento:
- {{ formato_moneda($venta->descuento_importe) }}
@endif
Base Imponible:
{{ formato_moneda($venta->base_imponible) }}
IGV (18%):
{{ formato_moneda($venta->iva_importe) }}
Total Cancelado:
{{ formato_moneda($venta->total) }}
Comprobante con Validez Electrónica SUNAT
Estado: {{ $venta->sunat_estado ?? 'Aceptado' }}
Hash: {{ $venta->sunat_hash }}
@endif