@if ($config->mostrar_logo_ticket && $config->logo) @endif
{{ $config->nombre_comercial ?: $config->nombre_empresa }}
@if ($config->nif)
RUC: {{ $config->nif }}
@endif @if ($config->direccion)
{{ $config->direccion }}
@endif
{{ trim(($config->codigo_postal ?? '').' '.($config->poblacion ?? '')) }}
@if ($config->telefono)
Tel: {{ $config->telefono }}
@endif
@if ($config->cabecera_ticket)
{{ $config->cabecera_ticket }}
@endif
@php $tipoDocNombre = match($venta->tipo) { 'factura' => 'FACTURA ELECTRÓNICA', 'boleta' => 'BOLETA DE VENTA ELECTRÓNICA', 'nota_credito' => 'NOTA DE CRÉDITO ELECTRÓNICA', 'nota_debito' => 'NOTA DE DÉBITO ELECTRÓNICA', 'guia_remision' => 'GUÍA DE REMISIÓN REMITENTE', 'cotizacion' => 'COTIZACIÓN / PROFORMA', default => 'NOTA DE VENTA (TICKET INTERNO)', }; @endphp @if ($venta->cliente) @if ($venta->cliente->nif) @endif @if ($venta->cliente->direccion) @endif @else @endif
{{ $tipoDocNombre }}
Número:{{ $venta->referencia }}
Fecha de emisión:{{ $venta->fecha->format('d/m/Y H:i') }}
Cajero / Vendedor:{{ $venta->user->name ?? '-' }}
Señor(es):{{ $venta->cliente->nombre_completo }}
{{ strlen($venta->cliente->nif) === 11 ? 'RUC:' : 'DNI:' }}{{ $venta->cliente->nif }}
Dirección:{{ $venta->cliente->direccion }}
Cliente:CLIENTES VARIOS
@foreach ($venta->detalles as $d) @if ($d->descuento_porcentaje > 0) @endif @endforeach
Articulo Cant. Precio Importe
{{ $d->descripcion }}
{{ rtrim(rtrim(number_format($d->cantidad, 2, '.', ''), '0'), '.') }} {{ formato_numero($d->precio_unitario, 2) }} {{ formato_numero($d->total, 2) }}
Dto. {{ formato_numero($d->descuento_porcentaje, 0) }}%
@if (($venta->op_gravadas ?? 0) > 0) @endif @if (($venta->op_exoneradas ?? 0) > 0) @endif @if ($venta->descuento_importe > 0) @endif
Op. Gravadas{{ formato_moneda($venta->op_gravadas) }}
Op. Exoneradas (Ley Libro){{ formato_moneda($venta->op_exoneradas) }}
Descuento ({{ formato_numero($venta->descuento_porcentaje, 0) }}%)-{{ formato_moneda($venta->descuento_importe) }}
IGV (18%){{ formato_moneda($venta->iva_importe) }}
TOTAL{{ formato_moneda($venta->total) }}
{{-- Monto en Letras SUNAT --}}
{{ numero_a_letras($venta->total) }}
@if ($venta->forma_pago === 'efectivo' && $venta->importe_entregado > 0) @endif @if ($venta->forma_pago === 'mixto') @endif @if ($venta->puntos_generados > 0) @endif
Forma de pago{{ $venta->forma_pago === 'yape_plin' ? 'Yape / Plin' : ucfirst($venta->forma_pago) }}
Entregado{{ formato_moneda($venta->importe_entregado) }}
Cambio / Vuelto{{ formato_moneda($venta->cambio) }}
Efectivo{{ formato_moneda($venta->importe_efectivo) }}
Tarjeta{{ formato_moneda($venta->importe_tarjeta) }}
Puntos obtenidos+{{ $venta->puntos_generados }}
{{-- Código QR de Representación Impresa (SUNAT) --}} @php $tipoSunat = match($venta->tipo) { 'factura' => '01', 'boleta' => '03', 'nota_credito' => '07', 'nota_debito' => '08', 'guia_remision' => '09', default => '00', }; $docCliente = $venta->cliente?->nif ?? '00000000'; $qrData = implode('|', [ $config->nif ?? '', $tipoSunat, $venta->serie, str_pad($venta->numero, 8, '0', STR_PAD_LEFT), number_format($venta->iva_importe, 2, '.', ''), number_format($venta->total, 2, '.', ''), $venta->fecha->format('Y-m-d'), strlen($docCliente) === 11 ? '6' : '1', $docCliente ]); $qrUrl = 'https://api.qrserver.com/v1/create-qr-code/?size=110x110&data=' . urlencode($qrData); @endphp
QR SUNAT

Representación impresa de Comprobante de Pago Electrónico

@if ($config->pie_ticket){{ $config->pie_ticket }}
@endif {{ now()->format('d/m/Y H:i') }}
@php $urlPubTicket = $venta->url_publica; $nomCli = $venta->cliente ? ($venta->cliente->nombre_completo ?? $venta->cliente->nombre) : 'Cliente'; $empNom = $config->nombre_comercial ?? $config->nombre_empresa ?? 'Librería'; $msgWsTicket = "Hola {$nomCli}, le compartimos su comprobante electrónico {$venta->referencia} por " . formato_moneda($venta->total) . " de {$empNom}.\n\nPuede visualizarlo aquí: {$urlPubTicket}"; $telWs = preg_replace('/[^0-9]/', '', $venta->cliente?->telefono ?? ''); if (strlen($telWs) === 9) $telWs = '51' . $telWs; $linkWsApp = $telWs ? "whatsapp://send?phone={$telWs}&text=" . rawurlencode($msgWsTicket) : "whatsapp://send?text=" . rawurlencode($msgWsTicket); @endphp 📱 WhatsApp