Monitoring Stok Opname (SO) — Tahun {{ $tahun }}

Dicetak: {{ now()->format('d-m-Y H:i') }}  |  Menampilkan SO berstatus Selesai

@foreach($bulan as $b) @endforeach @php $i = 0; $prevTipe = null; $nowMonth = (int) now()->format('n'); $nowYear = (int) now()->format('Y'); @endphp @foreach($rows as $r) @php $i++; $isPusat = $r['tipe'] === 'pusat'; if ($prevTipe !== null && $prevTipe !== $r['tipe']) { // visual separator row } $prevTipe = $r['tipe']; @endphp @for($m = 1; $m <= 12; $m++) @php $val = $r['m'.$m] ?? 0; $isFuture = ($tahun == $nowYear && $m > $nowMonth); $cssClass = $isFuture ? 'cell-future' : ($val > 0 ? 'cell-ok' : 'cell-zero'); @endphp @endfor @endforeach @php $grandTotal = 0; @endphp @for($m = 1; $m <= 12; $m++) @php $mTotal = array_sum(array_column($rows, 'm'.$m)); $grandTotal += $mTotal; @endphp @endfor
No. Gudang Faskes (KSO){{ $b }}Total
{{ $i }} {{ $r['nama_gudang'] }} {{ $r['tipe'] === 'faskes' ? $r['nama_faskes'] : '—' }}{{ $isFuture ? '·' : ($val > 0 ? $val : '0') }}{{ $r['total'] }}
Grand Total{{ $mTotal }}{{ $grandTotal }}

• Hijau = SO sudah dilakukan   • Merah = belum ada SO   • Titik (·) = bulan belum berlalu