diff --git a/app/Services/System/AnalysisService.php b/app/Services/System/AnalysisService.php index ea12293..8f2db93 100644 --- a/app/Services/System/AnalysisService.php +++ b/app/Services/System/AnalysisService.php @@ -62,8 +62,8 @@ public function getMyAttendance(User $user, ?Carbon $startDate = null, ?Carbon $ ]; } - $start = $startDate ?? Carbon::today()->startOfMonth(); - $end = $endDate ?? Carbon::today()->endOfMonth(); + $start = $startDate ?? ($employee->join_date ? Carbon::parse($employee->join_date) : Carbon::today()->startOfMonth()); + $end = $endDate ?? Carbon::today(); $totalDays = 0; $presentDays = 0;