From cc6516c712344405434bcbaa7c28cdd189a13ab5 Mon Sep 17 00:00:00 2001 From: Muhammad Sulaiman Yusuf Date: Wed, 19 Oct 2022 14:32:02 +0700 Subject: [PATCH] bugfix date --- app/Http/Controllers/DashboardBoDController.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/Http/Controllers/DashboardBoDController.php b/app/Http/Controllers/DashboardBoDController.php index 315c0ca..4cebea1 100644 --- a/app/Http/Controllers/DashboardBoDController.php +++ b/app/Http/Controllers/DashboardBoDController.php @@ -326,7 +326,8 @@ class DashboardBoDController extends Controller if(!$alreadyHasReport) continue; - $minDate = Activity::where('version_gantt_id', $keyGantt['last_gantt_id'])->min("planned_start"); + /* $minDate = Activity::where('version_gantt_id', $keyGantt['last_gantt_id'])->min("planned_start"); */ + $minDate = Activity::where('version_gantt_id', $keyGantt['last_gantt_id'])->whereNull('parent_id')->pluck('start_date')->first(); $begin = new \DateTime($minDate.' Monday'); $maxDate = DB::table('assign_material_to_activity as ama')