{{ $okCount }} OK • {{ $fixedCount }} Fixed • {{ $okCount + $fixedCount }} total vehicle-product pairs checked
| # | Vehicle | Product | Ledger (Truth) | Was (Batches) | Was (Agg) | Status |
|---|---|---|---|---|---|---|
| {{ $i + 1 }} | {{ $row['vehicle'] }} | {{ $row['product'] }} | {{ number_format($row['ledger'], 3) }} | {{ number_format($row['was_vsb'], 3) }} | {{ $row['was_agg'] !== null ? number_format($row['was_agg'], 3) : '—' }} | @if ($row['status'] === 'OK') OK @else Fixed @endif |
Ledger (Truth) = SUM(debit_qty - credit_qty) from inventory_ledger_entries.
Re-run at any time — this operation is safe and idempotent.