Change the way to calculate total extra (summing extra of each day)
FEA: ItEr76S28UserDashboard
This commit is contained in:
parent
3b8de7d089
commit
c24897ae59
1 changed files with 6 additions and 7 deletions
|
|
@ -316,17 +316,16 @@ public class MonthlyTimesheetController extends GenericForwardComposer
|
|||
}
|
||||
|
||||
private void updateTotalExtraColumn() {
|
||||
EffortDuration total = getEffortDuration(getTotalTextboxId());
|
||||
EffortDuration capacity = getEffortDuration(getTotalCapacityTextboxId());
|
||||
|
||||
EffortDuration extra = EffortDuration.zero();
|
||||
if (total.compareTo(capacity) > 0) {
|
||||
extra = total.minus(capacity);
|
||||
EffortDuration totalExtra = EffortDuration.zero();
|
||||
for (LocalDate day = first; day.compareTo(last) <= 0; day = day
|
||||
.plusDays(1)) {
|
||||
EffortDuration extra = getEffortDuration(getExtraColumnTextboxId(day));
|
||||
totalExtra = totalExtra.plus(extra);
|
||||
}
|
||||
|
||||
Textbox textbox = (Textbox) timesheet
|
||||
.getFellow(getTotalExtraTextboxId());
|
||||
textbox.setValue(effortDurationToString(extra));
|
||||
textbox.setValue(effortDurationToString(totalExtra));
|
||||
}
|
||||
|
||||
private String getTotalRowTextboxId(final OrderElement orderElement) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue