ItEr50S04ValidacionEProbasFuncionaisItEr49S04: [Bug #383] Fixing bug.
When limiting overassignability wrong argument was returned. It caused to always return the hours that could be worked that day without overtime. That's the cause that always appeared 1 resource per day
This commit is contained in:
parent
728dae4b50
commit
32f3aadf49
1 changed files with 3 additions and 3 deletions
|
|
@ -820,14 +820,14 @@ public class BaseCalendar extends BaseEntity implements IWorkHours {
|
|||
.asHoursGivenResourceWorkingDayOf(workableHours), workableHours);
|
||||
}
|
||||
|
||||
private Integer limitOverAssignability(LocalDate day, int workableHours,
|
||||
int hoursInitiallyCalculated) {
|
||||
private Integer limitOverAssignability(LocalDate day,
|
||||
int hoursInitiallyCalculated, int workableHoursAtDay) {
|
||||
boolean overAssignable = isOverAssignable(day);
|
||||
if (overAssignable) {
|
||||
return hoursInitiallyCalculated;
|
||||
} else {
|
||||
return Math.min(hoursInitiallyCalculated,
|
||||
multiplyByCapacity(workableHours));
|
||||
multiplyByCapacity(workableHoursAtDay));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue