0004800: Quilometragem - Mudar para decimal

git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/AdmVenta/Web/trunk/ventaboletos@34280 d1611594-4594-4d17-8e1d-87c2c4800839
master
julio 2014-03-21 21:32:02 +00:00
parent 9151a9a0c0
commit ee830c3417
2 changed files with 16 additions and 9 deletions

View File

@ -11,6 +11,7 @@ import java.util.List;
import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.collections.Predicate;
import org.apache.commons.lang.StringUtils;
import org.apache.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Scope;
@ -188,7 +189,7 @@ public class EditarTramosController extends MyGenericForwardComposer {
}
tramoCoeficientesList.setData(lsOrgamoTramo);
txKmReal.setValue(tramo.getKmReal().toString());
txKmReal.setValue(maskKmReal(tramo.getKmReal()));
}
tramosList = (MyListbox) Executions.getCurrent().getArg().get("tramosList");
@ -197,14 +198,20 @@ public class EditarTramosController extends MyGenericForwardComposer {
}
txtNome.focus();
constraintTarifa = new ConstraintNumberBD(7, 2, true);
txKmReal.setConstraint(constraintTarifa);
tabExcepcionesKm.setVisible(ApplicationProperties.getInstance().exhibirExcepcionesTramoKm());
}
private String maskKmReal(BigDecimal kmReal) {
try {
String resp = kmReal.toString();
resp = resp.replaceAll("\\.", ",");
return resp;
} catch (Exception e) {
}
return StringUtils.EMPTY;
}
public void onClick$btnSalvarServicio(Event ev) throws InterruptedException {
spHora.getValue();
spMinuto.getValue();

View File

@ -93,7 +93,7 @@
value="${c:l('editarTramosController.lbKmReal.value')}" />
<textbox id="txKmReal" width="80%"
precision="9" scale="2"
precision="7" scale="2"
constraint="no empty, no zero, no negative"
use="com.rjconsultores.ventaboletos.web.utilerias.MyTextboxDecimal" />
</row>
@ -340,7 +340,7 @@
<label
value="${c:l('editarTramosController.labelKMCoeficiente1.value')}" />
<textbox id="txtKMCoeficiente1"
precision="9" scale="2"
precision="7" scale="2"
use="com.rjconsultores.ventaboletos.web.utilerias.MyTextboxDecimal" />
</row>
@ -355,7 +355,7 @@
<label
value="${c:l('editarTramosController.labelKMCoeficiente2.value')}" />
<textbox id="txtKMCoeficiente2"
precision="9" scale="2"
precision="7" scale="2"
use="com.rjconsultores.ventaboletos.web.utilerias.MyTextboxDecimal" />
</row>
<row spans="1,1,1,1">
@ -369,7 +369,7 @@
<label
value="${c:l('editarTramosController.labelKMCoeficiente3.value')}" />
<textbox id="txtKMCoeficiente3"
precision="9" scale="2"
precision="7" scale="2"
use="com.rjconsultores.ventaboletos.web.utilerias.MyTextboxDecimal" />
</row>
<row spans="1,1,1,1">