ItEr41S23CUImportarTraballoRealizadoPorSubcontrata: Added new advance type subcontractor.

This commit is contained in:
Manuel Rego Casasnovas 2009-12-30 21:18:47 +01:00 committed by Javier Moran Rua
parent db2534f46e
commit d352c7c140
2 changed files with 12 additions and 5 deletions

View file

@ -20,6 +20,8 @@
package org.navalplanner.business.advance.bootstrap;
import static org.navalplanner.business.i18n.I18nHelper._;
import java.math.BigDecimal;
import org.navalplanner.business.advance.entities.AdvanceType;
@ -27,10 +29,11 @@ import org.navalplanner.business.common.Registry;
public enum PredefinedAdvancedTypes {
CHILDREN("children", new BigDecimal(100), new BigDecimal(0.01), true), PERCENTAGE(
"percentage", new BigDecimal(100), new BigDecimal(0.01), true), UNITS(
"units", new BigDecimal(Integer.MAX_VALUE), new BigDecimal(1),
false);
CHILDREN(_("children"), new BigDecimal(100), new BigDecimal(0.01), true), PERCENTAGE(
_("percentage"), new BigDecimal(100), new BigDecimal(0.01), true), UNITS(
_("units"), new BigDecimal(Integer.MAX_VALUE), new BigDecimal(1),
false), SUBCONTRACTOR(_("subcontractor"), new BigDecimal(100),
new BigDecimal(0.01), true);
private PredefinedAdvancedTypes(String name, BigDecimal defaultMaxValue,
BigDecimal precision, boolean percentage) {

View file

@ -263,7 +263,11 @@ public class ManageOrderElementAdvancesController extends
.getPossibleAdvanceTypes(advance);
for(AdvanceType advanceType : listAdvanceType){
if (!advanceType.getUnitName().equals(
PredefinedAdvancedTypes.CHILDREN.getTypeName())) {
PredefinedAdvancedTypes.CHILDREN.getTypeName())
&& !advanceType.getUnitName()
.equals(
PredefinedAdvancedTypes.SUBCONTRACTOR
.getTypeName())) {
Comboitem comboItem = new Comboitem();
comboItem.setValue(advanceType);
comboItem.setLabel(advanceType.getUnitName());