diff --git a/app/Http/Controllers/Backend/ReportController.php b/app/Http/Controllers/Backend/ReportController.php index 82f657d..712405b 100644 --- a/app/Http/Controllers/Backend/ReportController.php +++ b/app/Http/Controllers/Backend/ReportController.php @@ -649,29 +649,29 @@ class ReportController extends Controller // Fetch semua forms berdasarkan periode range $forms = [ 'Up Country' => FormUpCountry::whereIn('user_id', $userIds) - ->whereBetween('tanggal', [$startDate, $endDate]) + ->whereBetween('final_approved_at', [$startDate, $endDate]) ->whereIn('status', ['Approved', 'Closed']) ->get(), 'Vehicle Running Cost' => FormVehicleRunningCost::whereIn('user_id', $userIds) - ->whereBetween('tanggal', [$startDate, $endDate]) + ->whereBetween('final_approved_at', [$startDate, $endDate]) ->whereIn('status', ['Approved', 'Closed']) ->get(), 'Entertainment' => FormEntertaimentPresentation::whereIn('user_id', $userIds) - ->whereBetween('tanggal', [$startDate, $endDate]) + ->whereBetween('final_approved_at', [$startDate, $endDate]) ->whereIn('status', ['Approved', 'Closed']) ->get(), 'Meeting / Seminar' => FormMeetingSeminar::whereIn('user_id', $userIds) - ->whereBetween('created_at', [$startDate, $endDate]) + ->whereBetween('final_approved_at', [$startDate, $endDate]) ->whereIn('status', ['Approved', 'Closed']) ->get(), ]; // Forms "Others" dikelompokkan berdasarkan kategori $otherForms = FormOthers::whereIn('user_id', $userIds) - ->whereBetween('tanggal', [$startDate, $endDate]) + ->whereBetween('final_approved_at', [$startDate, $endDate]) ->whereIn('status', ['Approved', 'Closed']) ->get();