ItEr28S05RFControlAvancesIncompatiblesEnUnidadesTraballoItEr27S05: Modified the default max value showed for new AdvanceAssignments.
This commit is contained in:
parent
89a50ad6f6
commit
98d5fc5aa7
1 changed files with 11 additions and 3 deletions
|
|
@ -261,15 +261,23 @@ public class ManageOrderElementAdvancesController extends
|
|||
(comboItem.getValue() instanceof AdvanceType)){
|
||||
AdvanceType advanceType = (AdvanceType)comboItem.getValue();
|
||||
advance.setAdvanceType(advanceType);
|
||||
advance.setMaxValue(advanceType.getDefaultMaxValue());
|
||||
advance.setMaxValue(getMaxValue(advanceType));
|
||||
}
|
||||
}
|
||||
|
||||
});
|
||||
Listcell listCell = new Listcell();
|
||||
listCell.appendChild(comboAdvanceTypes);
|
||||
listItem.appendChild(listCell);
|
||||
}
|
||||
|
||||
private BigDecimal getMaxValue(AdvanceType advanceType) {
|
||||
if (advanceType.getPercentage()) {
|
||||
return advanceType.getDefaultMaxValue();
|
||||
}
|
||||
return BigDecimal.ZERO;
|
||||
}
|
||||
|
||||
private void appendLabelAdvanceType(final Listitem listItem){
|
||||
final AdvanceAssignment advance = (AdvanceAssignment) listItem.getValue();
|
||||
Label unitName = new Label(advance.getAdvanceType().getUnitName());
|
||||
|
|
@ -496,8 +504,8 @@ public class ManageOrderElementAdvancesController extends
|
|||
if(advanceType != null){
|
||||
DirectAdvanceAssignment advance = (DirectAdvanceAssignment) item
|
||||
.getValue();
|
||||
advance.setMaxValue(advanceType.getDefaultMaxValue());
|
||||
miBox.setValue(advanceType.getDefaultMaxValue());
|
||||
advance.setMaxValue(getMaxValue(advanceType));
|
||||
miBox.setValue(getMaxValue(advanceType));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue