diff --git a/src/java/com/rjconsultores/ventaboletos/web/gui/controladores/esquemaoperacional/EditarTramosController.java b/src/java/com/rjconsultores/ventaboletos/web/gui/controladores/esquemaoperacional/EditarTramosController.java index a47361b86..e6e78e985 100644 --- a/src/java/com/rjconsultores/ventaboletos/web/gui/controladores/esquemaoperacional/EditarTramosController.java +++ b/src/java/com/rjconsultores/ventaboletos/web/gui/controladores/esquemaoperacional/EditarTramosController.java @@ -7,11 +7,7 @@ package com.rjconsultores.ventaboletos.web.gui.controladores.esquemaoperacional; import java.math.BigDecimal; import java.util.ArrayList; import java.util.Calendar; -import java.util.HashMap; import java.util.List; -import java.util.Map; - -import javax.swing.plaf.ComboBoxUI; import org.apache.commons.collections.CollectionUtils; import org.apache.commons.collections.Predicate; @@ -61,12 +57,10 @@ import com.rjconsultores.ventaboletos.utilerias.ApplicationProperties; import com.rjconsultores.ventaboletos.utilerias.DateUtil; import com.rjconsultores.ventaboletos.utilerias.UsuarioLogado; import com.rjconsultores.ventaboletos.web.utilerias.ConstraintNumberBD; -import com.rjconsultores.ventaboletos.web.utilerias.MyComboboxEstandar; import com.rjconsultores.ventaboletos.web.utilerias.MyComboboxParada; import com.rjconsultores.ventaboletos.web.utilerias.MyGenericForwardComposer; import com.rjconsultores.ventaboletos.web.utilerias.MyListbox; import com.rjconsultores.ventaboletos.web.utilerias.MyTextboxDecimal; -import com.rjconsultores.ventaboletos.web.utilerias.PantallaUtileria; import com.rjconsultores.ventaboletos.web.utilerias.render.RenderOrgaoTramo; import com.rjconsultores.ventaboletos.web.utilerias.render.RenderTramoKm; import com.rjconsultores.ventaboletos.web.utilerias.render.RenderTramoServicio; diff --git a/src/java/com/rjconsultores/ventaboletos/web/utilerias/render/RenderOrgaoTramo.java b/src/java/com/rjconsultores/ventaboletos/web/utilerias/render/RenderOrgaoTramo.java index 99bcb4ad7..d99928136 100644 --- a/src/java/com/rjconsultores/ventaboletos/web/utilerias/render/RenderOrgaoTramo.java +++ b/src/java/com/rjconsultores/ventaboletos/web/utilerias/render/RenderOrgaoTramo.java @@ -10,6 +10,8 @@ import com.rjconsultores.ventaboletos.entidad.ClaseServicio; import com.rjconsultores.ventaboletos.entidad.CoeficienteTarifa; import com.rjconsultores.ventaboletos.entidad.OrgaoConcedente; import com.rjconsultores.ventaboletos.entidad.OrgaoTramo; +import com.rjconsultores.ventaboletos.utilerias.BigDecimalUtil; +import com.rjconsultores.ventaboletos.utilerias.LocaleUtil; public class RenderOrgaoTramo implements ListitemRenderer { @@ -32,7 +34,7 @@ public class RenderOrgaoTramo implements ListitemRenderer { BigDecimal kmCoeficienteTarifa1 = orgaoTramo.getKmCoeficiente1(); if (kmCoeficienteTarifa1 != null) { totalKm = totalKm.add(kmCoeficienteTarifa1); - lc = new Listcell(kmCoeficienteTarifa1.toString()); + lc = new Listcell(BigDecimalUtil.getBigDecimalToStringDouble2CasasDecimaisFormatado(kmCoeficienteTarifa1, LocaleUtil.getLocale())); } else { lc = new Listcell(""); } @@ -49,7 +51,7 @@ public class RenderOrgaoTramo implements ListitemRenderer { BigDecimal kmCoeficienteTarifa2 = orgaoTramo.getKmCoeficiente2(); if (kmCoeficienteTarifa2 != null) { totalKm = totalKm.add(kmCoeficienteTarifa2); - lc = new Listcell(kmCoeficienteTarifa2.toString()); + lc = new Listcell(BigDecimalUtil.getBigDecimalToStringDouble2CasasDecimaisFormatado(kmCoeficienteTarifa2, LocaleUtil.getLocale())); } else { lc = new Listcell(""); } @@ -66,7 +68,7 @@ public class RenderOrgaoTramo implements ListitemRenderer { BigDecimal kmCoeficienteTarifa3 = orgaoTramo.getKmCoeficiente3(); if (kmCoeficienteTarifa3 != null) { totalKm = totalKm.add(kmCoeficienteTarifa3); - lc = new Listcell(kmCoeficienteTarifa3.toString()); + lc = new Listcell(BigDecimalUtil.getBigDecimalToStringDouble2CasasDecimaisFormatado(kmCoeficienteTarifa3, LocaleUtil.getLocale())); } else { lc = new Listcell(""); } @@ -88,7 +90,7 @@ public class RenderOrgaoTramo implements ListitemRenderer { } lc.setParent(lstm); - lc = new Listcell(totalKm.toString()); + lc = new Listcell(BigDecimalUtil.getBigDecimalToStringDouble2CasasDecimaisFormatado(totalKm, LocaleUtil.getLocale())); lc.setParent(lstm); lstm.setAttribute("data", orgaoTramo); diff --git a/src/java/com/rjconsultores/ventaboletos/web/utilerias/render/RenderTramo.java b/src/java/com/rjconsultores/ventaboletos/web/utilerias/render/RenderTramo.java index a0b6084c4..fc3b24c81 100644 --- a/src/java/com/rjconsultores/ventaboletos/web/utilerias/render/RenderTramo.java +++ b/src/java/com/rjconsultores/ventaboletos/web/utilerias/render/RenderTramo.java @@ -4,15 +4,18 @@ */ package com.rjconsultores.ventaboletos.web.utilerias.render; -import com.rjconsultores.ventaboletos.entidad.Parada; -import com.rjconsultores.ventaboletos.entidad.Tramo; -import com.rjconsultores.ventaboletos.entidad.Via; import java.math.BigDecimal; -import java.math.RoundingMode; + import org.zkoss.zul.Listcell; import org.zkoss.zul.Listitem; import org.zkoss.zul.ListitemRenderer; +import com.rjconsultores.ventaboletos.entidad.Parada; +import com.rjconsultores.ventaboletos.entidad.Tramo; +import com.rjconsultores.ventaboletos.entidad.Via; +import com.rjconsultores.ventaboletos.utilerias.BigDecimalUtil; +import com.rjconsultores.ventaboletos.utilerias.LocaleUtil; + /** * * @author Administrador @@ -54,7 +57,7 @@ public class RenderTramo implements ListitemRenderer { BigDecimal kmReal = tramo.getKmReal(); if (kmReal != null) { - lc = new Listcell(kmReal.setScale(2, RoundingMode.UP).toString()); + lc = new Listcell(BigDecimalUtil.getBigDecimalToStringDouble2CasasDecimaisFormatado(kmReal, LocaleUtil.getLocale())); } else { lc = new Listcell(""); }