@php $fmt = fn($n) => number_format((float) $n, 2, ',', '.'); $badgeEstado = function ($id) { return match((int) $id) { 2 => 'badge-aprobado', 1 => 'badge-borrador', 3 => 'badge-anulado', default => 'badge-default', }; }; @endphp @forelse($registros as $r) @empty @endforelse
NĂºmero Fecha Cliente Estado Neto Costo Real Resultado % Margen
{{ 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['estado_descripcion'] }} $ {{ $fmt($r['neto']) }} $ {{ $fmt($r['costo_real_total']) }} $ {{ $fmt($r['resultado']) }} {{ $fmt($r['margen']) }} %
Sin registros.
TOTALES $ {{ $fmt($totales['neto']) }} $ {{ $fmt($totales['costo_real']) }} $ {{ $fmt($totales['resultado']) }} {{ $fmt($totales['margen']) }} %