@php $fmt = fn($n) => number_format((float) $n, 2, ',', '.'); @endphp
| Número | Fecha | Cliente | Descripción | Cant. | Precio Unit. | Costo Unit. | Subt. Venta | Subt. Costo | 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['descripcion'] }} | {{ $fmt($r['cantidades']) }} | $ {{ $fmt($r['neto']) }} | $ {{ $fmt($r['costo_real']) }} | $ {{ $fmt($r['subtotal_venta']) }} | $ {{ $fmt($r['subtotal_costo']) }} | $ {{ $fmt($r['resultado']) }} | {{ $fmt($r['margen']) }} % |
| Sin registros. | ||||||||||
| TOTALES | $ {{ $fmt($totales['subtotal_venta']) }} | $ {{ $fmt($totales['subtotal_costo']) }} | $ {{ $fmt($totales['resultado']) }} | {{ $fmt($totales['margen']) }} % | ||||||