[Bug #842] Fix bug

When the end date is converted to a LocalDate getDate method must be
used. asExclusiveEnd was returning the next LocalDate when the end
date finished in the middle of a day, this caused it to overlap with
the next LoadPeriod.

FEA: ItEr70S04BugFixingx
This commit is contained in:
Óscar González Fernández 2011-02-11 16:15:31 +01:00
parent 9532c2b71f
commit d0cd64c987

View file

@ -199,7 +199,7 @@ abstract class LoadPeriodGenerator {
}
EffortDuration totalEffort = getTotalAvailableEffort();
EffortDuration effortAssigned = getEffortAssigned();
return new LoadPeriod(start.getDate(), end.asExclusiveEnd(),
return new LoadPeriod(start.getDate(), end.getDate(),
totalEffort.roundToHours(), effortAssigned.roundToHours(),
new LoadLevel(calculateLoadPercentage(totalEffort,
effortAssigned)));