ItEr49S04ValidacionEProbasFuncionaisItEr48S04: [Bug #361] Fixed bug using hours from DayAssignments instead of OrderElements in order to calculate advance end date.
This commit is contained in:
parent
90d61a0bb5
commit
ffb9761a6f
2 changed files with 11 additions and 1 deletions
|
|
@ -419,4 +419,14 @@ public abstract class TaskElement extends BaseEntity {
|
|||
|
||||
public abstract boolean isMilestone();
|
||||
|
||||
public Integer getTotalHoursAssigned() {
|
||||
int result = 0;
|
||||
for (ResourceAllocation<?> resourceAllocation : getSatisfiedResourceAllocations()) {
|
||||
for (DayAssignment each : resourceAllocation.getAssignments()) {
|
||||
result += each.getHours();
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -266,7 +266,7 @@ public class TaskElementAdapter implements ITaskElementAdapter {
|
|||
if (orderElement != null) {
|
||||
advancePercentage = orderElement
|
||||
.getAdvancePercentage();
|
||||
hours = orderElement.getWorkHours();
|
||||
hours = taskElement.getTotalHoursAssigned();
|
||||
} else {
|
||||
advancePercentage = new BigDecimal(0);
|
||||
hours = Integer.valueOf(0);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue