@if(!empty($company['logo'])) @endif
{{ $company['nombre_comercial'] }}
RUC {{ $company['ruc'] }}
{{ $company['direccion'] }}
@if(!empty($company['telefono']))
Teléfono: {{ $company['telefono'] }}
@endif
@if($order->document_type === 'Ticket') NOTA DE VENTA
@else {{ strtoupper($order->document_type) }} DE VENTA ELECTRÓNICA
@endif {{ $order->full_number ?? '#'.str_pad($order->id,8,'0',STR_PAD_LEFT) }}

F. Emisión:{{ $order->created_at->format('Y-m-d') }}
H. Emisión:{{ $order->created_at->format('H:i:s') }}
F. Vencimiento:{{ $order->created_at->format('Y-m-d') }}
Cliente:{{ $order->client_name ?: 'Cliente Varios' }}
DNI/RUC:{{ $order->client_document ?: '-' }}
Dirección:{{ $order->client?->address ?: '-' }}

@foreach($order->details as $d) @endforeach
Cant Unid. Descripción P.Unit Total
{{ $d->quantity }} NIU {{ $d->product->name ?? '—' }} {{ number_format($d->price, 2) }} {{ number_format($d->price * $d->quantity, 2) }}
@if($order->total_exonerada > 0) @else @endif
Op. Exoneradas: S/{{ number_format($order->total_exonerada, 2) }}
IGV (Exonerado): S/0.00
Op. Gravadas: S/{{ number_format($order->total_gravada, 2) }}
IGV: S/{{ number_format($order->igv, 2) }}
Total a pagar: S/{{ number_format($order->total, 2) }}
Son: {{ strtoupper(\App\Services\Sunat\NumeroLetras::convert($order->total)) }} SOLES
@php $etiquetasPago = ['cash'=>'Efectivo','card'=>'Tarjeta','yape'=>'Yape','plin'=>'Plin','transferencia'=>'Transferencia']; $pmMostrar = $order->payment_method ?? 'cash'; @endphp
Pago: @if($pmMostrar === 'mixed') {{ $order->payments->map(fn($p) => ($etiquetasPago[$p->method] ?? ucfirst($p->method)) . ' S/' . number_format($p->amount,2))->implode(' + ') }} @else {{ $etiquetasPago[$pmMostrar] ?? ucfirst($pmMostrar) }} @endif
@if($qrBase64)
QR SUNAT
@endif
@if($order->document_type === 'Ticket') Documento interno, no válido como comprobante de pago SUNAT. @else Representación impresa del comprobante electrónico.
@if($order->sunat_status === 'ACCEPTED') ✔ Aceptado por SUNAT @else Estado: {{ $order->sunat_status }} @endif @endif

¡Gracias por su preferencia!