fix: adjust attendance date range logic to use employee join date when available, ensuring accurate attendance tracking
This commit is contained in:
parent
f34406afae
commit
2e516bcd06
@ -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;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user