@php $fmt = fn($n) => number_format((float) $n, 2, ',', '.'); @endphp @forelse($registros as $r) @empty @endforelse
Presupuesto Fecha Cliente Operación Total Facturado Pendiente Comprobantes Facturados
{{ str_pad($r['sucursal'], 5, '0', STR_PAD_LEFT) }}-{{ str_pad($r['numero'], 8, '0', STR_PAD_LEFT) }} {{ $r['fecha'] ? date('d/m/Y', strtotime($r['fecha'])) : '' }} {{ $r['cliente_nombre'] }} {{ $r['operacion_descripcion'] ?? '' }} $ {{ $fmt($r['total']) }} $ {{ $fmt($r['facturada']) }} $ {{ $fmt($r['pendiente']) }} @if(empty($r['comprobantes'])) Sin facturar @else @foreach($r['comprobantes'] as $c)
{{ $c['tipo'] }} {{ $c['numero'] }} @if(!empty($c['fecha'])) ({{ date('d/m/Y', strtotime($c['fecha'])) }}) @endif $ {{ $fmt($c['monto']) }}
@endforeach @endif
Sin registros.
TOTALES $ {{ $fmt($totales['total']) }} $ {{ $fmt($totales['facturado']) }} $ {{ $fmt($totales['pendiente']) }}