ItEr46S04ValidacionEProbasFuncionaisItEr45S04: Fixing problem.
When activating recommended allocation and the calculated value is not resources per day it kept the previous resources per day value. Now it is reset to zero.
This commit is contained in:
parent
a3ccebfbc3
commit
106a3458a2
1 changed files with 9 additions and 1 deletions
|
|
@ -539,10 +539,18 @@ public class FormBinder {
|
|||
allHoursInputChange);
|
||||
allResourcesPerDay.addEventListener(Events.ON_CHANGE,
|
||||
allResourcesPerDayChange);
|
||||
sumResourcesPerDayFromRowsAndAssignToAllResourcesPerDay();
|
||||
sumResourcesPerDayOrSetToZero();
|
||||
Util.reloadBindings(allocationsGrid);
|
||||
}
|
||||
|
||||
private void sumResourcesPerDayOrSetToZero() {
|
||||
if (allResourcesPerDay.isDisabled()) {
|
||||
sumResourcesPerDayFromRowsAndAssignToAllResourcesPerDay();
|
||||
} else {
|
||||
allResourcesPerDay.setValue(BigDecimal.ZERO);
|
||||
}
|
||||
}
|
||||
|
||||
private void distributeHoursFromTotalToRows() {
|
||||
Integer value = allHoursInput.getValue();
|
||||
value = value != null ? value : 0;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue