update non numeric

This commit is contained in:
Nur Izzati
2026-03-11 14:06:18 +08:00
parent 4c8427af48
commit 412162705e
+4 -4
View File
@@ -38,10 +38,10 @@ class SAExportAudit implements FromCollection, WithHeadings, WithTitle, WithMapp
'No KP' => '', 'No KP' => '',
'Marhun' => '', 'Marhun' => '',
'Tempoh' => '', 'Tempoh' => '',
'Berat (g)' => $data->sum('Berat (g)'), 'Berat (g)' => $data->sum(fn($row) => floatval($row['Berat (g)'] ?? 0)),
'Nilai Marhun' => $data->sum('Nilai Marhun'), 'Nilai Marhun' => $data->sum(fn($row) => floatval($row['Nilai Marhun'] ?? 0)),
'Pinjaman' => $data->sum('Pinjaman'), 'Pinjaman' => $data->sum(fn($row) => floatval($row['Pinjaman'] ?? 0)),
'Baki Pinjaman' => $data->sum('Baki Pinjaman'), 'Baki Pinjaman' => $data->sum(fn($row) => floatval($row['Baki Pinjaman'] ?? 0)),
]; ];
$data->push($totals); $data->push($totals);