diff --git a/src/services/attendance.service.ts b/src/services/attendance.service.ts index 0323081..a31d66f 100644 --- a/src/services/attendance.service.ts +++ b/src/services/attendance.service.ts @@ -406,9 +406,10 @@ export async function getWorkfund(year: number) { } } - const userFund = Math.max(0, (bizDaysToDate - holidayDays) * 8); + const userFund = bizDaysToDate * 8; const workedRound = Math.round(worked * 10) / 10; - const leaveHours = vacationHours + sickHours; + const holidayHours = holidayDays * 8; + const leaveHours = vacationHours + sickHours + holidayHours; const covered = Math.round((worked + leaveHours) * 10) / 10; const missing = Math.max(0, Math.round((userFund - covered) * 10) / 10); const overtime = Math.max(0, Math.round((covered - userFund) * 10) / 10);