@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 Firma Total Facturado Pendiente % Fact.
{{ 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'] }} @if(!empty($r['firma_descripcion'])) {{ $r['firma_descripcion'] }} @else @endif $ {{ $fmt($r['total']) }} $ {{ $fmt($r['facturada']) }} $ {{ $fmt($r['pendiente']) }} {{ $fmt($r['porcentaje_facturado']) }} %
Sin registros.
TOTALES $ {{ $fmt($totales['total']) }} $ {{ $fmt($totales['facturado']) }} $ {{ $fmt($totales['pendiente']) }}