@if($logoComercioBase64 ?? null)
Logo comercio
@endif

{{ config('simpleapi.dte.razon_social', 'EMPRESA') }}

{{ collect([config('simpleapi.dte.direccion', ''), config('simpleapi.dte.comuna', '')])->filter()->implode(', ') }}
Giro: {{ config('simpleapi.dte.giro', '') }}
RUT: {{ \App\Services\SimpleAPIService::formatearRut(config('simpleapi.dte.rut_emisor', '')) }}
{{ $tipoDocumentoLabel ?? 'DOCUMENTO TRIBUTARIO ELECTRÓNICO' }}
RUT: {{ \App\Services\SimpleAPIService::formatearRut(config('simpleapi.dte.rut_emisor', '')) }} | Folio: {{ $numeroFactura ?? 'N/A' }} | Fecha: {{ \Carbon\Carbon::parse($venta->fechaHora_venta)->format('d/m/Y H:i') }}

Emisor

{{ config('simpleapi.dte.razon_social', '') }}

Giro: {{ config('simpleapi.dte.giro', '') }}

Dirección: {{ config('simpleapi.dte.direccion', '') }}, {{ config('simpleapi.dte.comuna', '') }}

Receptor

@if($cliente && ($cliente->razon_cliente ?? null))

{{ $cliente->razon_cliente }}

@if($cliente->rut_cliente ?? null)

RUT: {{ \App\Services\SimpleAPIService::formatearRut($cliente->rut_cliente) }}

@endif @if($cliente->direccion_cliente ?? null)

Dirección: {{ $cliente->direccion_cliente }}@if($cliente->comuna_cliente ?? null), {{ $cliente->comuna_cliente }}@endif

@endif @else

PÚBLICO GENERAL / CONSUMIDOR FINAL

RUT: 66.666.666-6 (SII)

@endif
Detalle de productos
@foreach($venta->detalles as $detalle) @php $cant = floatval($detalle->cantidad_ventaDetalle); $precio = floatval($detalle->precioVenta_ventaDetalle); $dto = floatval($detalle->dto_ventaDetalle ?? 0); $subtotal = $cant * $precio; if ($dto > 0 && $dto < 100) { $subtotal -= $subtotal * ($dto/100); } if ($dto == 100) { $subtotal = 0; } @endphp @endforeach
Código Descripción Cant. P.Unitario Dto% Total
{{ $detalle->producto->codigo_producto ?? '-' }} {{ $detalle->producto->nombre_producto ?? 'Producto' }} {{ number_format($cant, 0, ',', '.') }} {{ \App\Helpers\FormatoMonedaHelper::formatCurrencyWithSymbol($precio) }} {{ $dto > 0 ? number_format($dto, 0) . '%' : '-' }} {{ \App\Helpers\FormatoMonedaHelper::formatCurrencyWithSymbol($subtotal) }}
Totales
@php $totalConIva = floatval($venta->totalVenta_venta); $totalSinIva = floatval($venta->totalSinIVA_venta ?? 0); if ($totalSinIva <= 0) { $totalSinIva = $totalConIva / 1.19; } $iva = $totalConIva - $totalSinIva; @endphp @if($iva > 0) @endif
Neto:{{ \App\Helpers\FormatoMonedaHelper::formatCurrencyWithSymbol($totalSinIva) }}
IVA 19%:{{ \App\Helpers\FormatoMonedaHelper::formatCurrencyWithSymbol($iva) }}
Total:{{ \App\Helpers\FormatoMonedaHelper::formatCurrencyWithSymbol($totalConIva) }}
@if($dteTrackId ?? null) @endif @if($dteTimbre ?? null)
Timbre electrónico SII
@elseif($tieneFactura ?? false) @endif