fix: monthly cards and table show same +/- using prorated fund for current month
Backend: per-user missing/overtime in current month now calculated against bizDaysToDate (working days up to today), not full month. Frontend: monthly card percentage and fulfilled check also use fund_to_date for current month. Now both the yearly summary table and the monthly cards agree. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -406,7 +406,7 @@ export async function getWorkfund(year: number) {
|
||||
}
|
||||
}
|
||||
|
||||
const userFund = Math.max(0, (bizDays - holidayDays) * 8);
|
||||
const userFund = Math.max(0, (bizDaysToDate - holidayDays) * 8);
|
||||
const workedRound = Math.round(worked * 10) / 10;
|
||||
const leaveHours = vacationHours + sickHours;
|
||||
const covered = Math.round((worked + leaveHours) * 10) / 10;
|
||||
|
||||
Reference in New Issue
Block a user