From df734c2482364dcc2e24ca299495579962bb3d45 Mon Sep 17 00:00:00 2001 From: Nur Izzati Date: Sun, 22 Feb 2026 15:31:11 +0800 Subject: [PATCH] update laporan peti besi --- app/Http/Controllers/Reports/OutstandingController.php | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/app/Http/Controllers/Reports/OutstandingController.php b/app/Http/Controllers/Reports/OutstandingController.php index 8043739..7e70c3e 100644 --- a/app/Http/Controllers/Reports/OutstandingController.php +++ b/app/Http/Controllers/Reports/OutstandingController.php @@ -127,10 +127,12 @@ class OutstandingController extends Controller if (!empty($endDate)) { $queryAll->where('tarikh', '=', $endDate); } - - return array_merge( - $queryAll->first()->toArray() - ); + $record = $queryAll->first(); + + return $record + ? $record->toArray() + : ['bakieod' => 0]; + }, $active_cawangan_db_connection); // Combine data with branch info