@php $pagosUsados = $venta->pagos_usados; @endphp
Logo comercio
{{ config('simpleapi.dte.razon_social', 'Innova ERP') }}
{{ 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', '')) }}
@if(($tipoDocumentoLabel ?? null) || ($numeroFactura ?? null))
{{ $tipoDocumentoLabel ?? 'Comprobante' }} @if($numeroFactura ?? null)
Folio: {{ $numeroFactura }}@endif @if($dteTrackId ?? null)
Track ID: {{ $dteTrackId }}@endif
(Documento de Prueba - {{ ($tieneFactura ?? false) ? 'Mock SII' : 'No enviado al SII' }})
@endif
Nº Vta: {{ str_pad($venta->id_venta, 5, '0', STR_PAD_LEFT) }} | {{ \Carbon\Carbon::parse($venta->fechaHora_venta)->format('d/m/Y H:i') }}
DETALLE
@foreach($venta->detalles as $detalle) @php $nombre = $detalle->producto->nombre_producto ?? 'Producto'; $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
{{ strtoupper($nombre) }}
{{ $cant }} und {{ \App\Helpers\FormatoMonedaHelper::formatCurrencyWithSymbol($precio) }}/und @if($dto > 0){{ $dto }}% dto@endif
{{ \App\Helpers\FormatoMonedaHelper::formatCurrencyWithSymbol($subtotal) }}
@endforeach
FORMA DE PAGO
@forelse($pagosUsados as $pago)
{{ $pago['label'] ?? $pago['metodo'] ?? 'Pago' }}: {{ \App\Helpers\FormatoMonedaHelper::formatCurrencyWithSymbol($pago['monto'] ?? 0) }}
@empty
Total: {{ \App\Helpers\FormatoMonedaHelper::formatCurrencyWithSymbol($venta->totalVenta_venta) }}
@endforelse
TOTAL {{ \App\Helpers\FormatoMonedaHelper::formatCurrencyWithSymbol($venta->totalVenta_venta) }}