{{-- Cabecera --}}
@if(!empty($company['logo'])) logo @endif

{{ $company['razon_social'] }}

@if($company['nombre_comercial'] !== $company['razon_social'])
{{ $company['nombre_comercial'] }}
@endif
{{ $company['direccion'] }}
R.U.C. {{ $company['ruc'] }}

{{ $order->document_type === 'Ticket' ? 'NOTA DE VENTA' : strtoupper($order->document_type) . ' ELECTRÓNICA' }}

{{ $order->full_number ?? '#'.str_pad($order->id,8,'0',STR_PAD_LEFT) }}

{{-- Datos del cliente --}}
Cliente: {{ $order->client_name ?: 'Cliente Varios' }}
{{ $order->document_type === 'Factura' ? 'RUC' : 'DNI' }}: {{ $order->client_document ?: '—' }}
Fecha emisión: {{ $order->created_at->format('d/m/Y H:i') }}
Moneda: SOLES (S/)
{{-- Tabla de items --}} @foreach($order->details as $d) @endforeach @if($order->details->count() < 8) @for($i = 0; $i < 8 - $order->details->count(); $i++) @endfor @endif
Cant. Descripción P. Unit. Importe
{{ $d->quantity }} {{ $d->product->name ?? '—' }} {{ number_format($d->price, 2) }} {{ number_format($d->price * $d->quantity, 2) }}
 
{{-- Totales --}}
@if($order->total_exonerada > 0) @else @endif
Op. Exonerada:S/ {{ number_format($order->total_exonerada, 2) }}
IGV (Exonerado):S/ 0.00
Op. Gravada:S/ {{ number_format($order->total_gravada, 2) }}
IGV ({{ $config->igvRate() }}%):S/ {{ number_format($order->igv, 2) }}
TOTAL:S/ {{ number_format($order->total, 2) }}
{{-- Pie: QR + leyenda --}} @if($order->hash)
Resumen XML (DigestValue): {{ $order->hash }}
@endif