ItEr22S05DocumentacionFormacionItEr21S05: Resource allocation percentage is shown with a number in the interval [0-100] although we store a

This commit is contained in:
Xavier Castaño 2009-08-21 15:41:32 +02:00 committed by Óscar González Fernández
parent 1be4350938
commit f731d206d0

View file

@ -190,13 +190,13 @@ public class ResourceAllocationController extends GenericForwardComposer {
@Override
public BigDecimal get() {
return resourceAllocation.getPercentage();
return resourceAllocation.getPercentage().scaleByPowerOfTen(2);
}
}, new Util.Setter<BigDecimal>() {
@Override
public void set(BigDecimal value) {
resourceAllocation.setPercentage(value);
resourceAllocation.setPercentage(value.setScale(2).divide(new BigDecimal(100),BigDecimal.ROUND_DOWN));
}
}));
cellPercentage.setParent(item);