-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
issueNeeds to be fixedNeeds to be fixed
Description
countUsableWorkdays only counts Mon–Fri via isWeekday, but createScheduleException applies hours across up to 7 days based on input.numberOfWorkDays. If numberOfWorkDays includes weekends (6 or 7), your hours-per-day calculation is based on weekday-only counts, but exceptions may allocate hours to weekends too → misallocation.
How to fix: Align day counting with numberOfWorkDays:
- If
workDays <= 5, count only Mon–Fri. - If
workDays == 6, count Mon–Sat. - If
workDays == 7, count all days.
You can implement anisWorkingDay(Date d, Integer workDays)helper and use it both for counting and splitting.
File: ScheduleHoursDistributor.cls (countUsableWorkdays, isWeekday, createScheduleException)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
issueNeeds to be fixedNeeds to be fixed