fixes bug #9659
git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/AdmVenta/Web/trunk/ventaboletos@72774 d1611594-4594-4d17-8e1d-87c2c4800839master
parent
8c0e540652
commit
b6c2a073d7
|
@ -7,11 +7,7 @@ package com.rjconsultores.ventaboletos.web.gui.controladores.esquemaoperacional;
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Calendar;
|
import java.util.Calendar;
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
|
||||||
|
|
||||||
import javax.swing.plaf.ComboBoxUI;
|
|
||||||
|
|
||||||
import org.apache.commons.collections.CollectionUtils;
|
import org.apache.commons.collections.CollectionUtils;
|
||||||
import org.apache.commons.collections.Predicate;
|
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.DateUtil;
|
||||||
import com.rjconsultores.ventaboletos.utilerias.UsuarioLogado;
|
import com.rjconsultores.ventaboletos.utilerias.UsuarioLogado;
|
||||||
import com.rjconsultores.ventaboletos.web.utilerias.ConstraintNumberBD;
|
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.MyComboboxParada;
|
||||||
import com.rjconsultores.ventaboletos.web.utilerias.MyGenericForwardComposer;
|
import com.rjconsultores.ventaboletos.web.utilerias.MyGenericForwardComposer;
|
||||||
import com.rjconsultores.ventaboletos.web.utilerias.MyListbox;
|
import com.rjconsultores.ventaboletos.web.utilerias.MyListbox;
|
||||||
import com.rjconsultores.ventaboletos.web.utilerias.MyTextboxDecimal;
|
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.RenderOrgaoTramo;
|
||||||
import com.rjconsultores.ventaboletos.web.utilerias.render.RenderTramoKm;
|
import com.rjconsultores.ventaboletos.web.utilerias.render.RenderTramoKm;
|
||||||
import com.rjconsultores.ventaboletos.web.utilerias.render.RenderTramoServicio;
|
import com.rjconsultores.ventaboletos.web.utilerias.render.RenderTramoServicio;
|
||||||
|
|
|
@ -10,6 +10,8 @@ import com.rjconsultores.ventaboletos.entidad.ClaseServicio;
|
||||||
import com.rjconsultores.ventaboletos.entidad.CoeficienteTarifa;
|
import com.rjconsultores.ventaboletos.entidad.CoeficienteTarifa;
|
||||||
import com.rjconsultores.ventaboletos.entidad.OrgaoConcedente;
|
import com.rjconsultores.ventaboletos.entidad.OrgaoConcedente;
|
||||||
import com.rjconsultores.ventaboletos.entidad.OrgaoTramo;
|
import com.rjconsultores.ventaboletos.entidad.OrgaoTramo;
|
||||||
|
import com.rjconsultores.ventaboletos.utilerias.BigDecimalUtil;
|
||||||
|
import com.rjconsultores.ventaboletos.utilerias.LocaleUtil;
|
||||||
|
|
||||||
public class RenderOrgaoTramo implements ListitemRenderer {
|
public class RenderOrgaoTramo implements ListitemRenderer {
|
||||||
|
|
||||||
|
@ -32,7 +34,7 @@ public class RenderOrgaoTramo implements ListitemRenderer {
|
||||||
BigDecimal kmCoeficienteTarifa1 = orgaoTramo.getKmCoeficiente1();
|
BigDecimal kmCoeficienteTarifa1 = orgaoTramo.getKmCoeficiente1();
|
||||||
if (kmCoeficienteTarifa1 != null) {
|
if (kmCoeficienteTarifa1 != null) {
|
||||||
totalKm = totalKm.add(kmCoeficienteTarifa1);
|
totalKm = totalKm.add(kmCoeficienteTarifa1);
|
||||||
lc = new Listcell(kmCoeficienteTarifa1.toString());
|
lc = new Listcell(BigDecimalUtil.getBigDecimalToStringDouble2CasasDecimaisFormatado(kmCoeficienteTarifa1, LocaleUtil.getLocale()));
|
||||||
} else {
|
} else {
|
||||||
lc = new Listcell("");
|
lc = new Listcell("");
|
||||||
}
|
}
|
||||||
|
@ -49,7 +51,7 @@ public class RenderOrgaoTramo implements ListitemRenderer {
|
||||||
BigDecimal kmCoeficienteTarifa2 = orgaoTramo.getKmCoeficiente2();
|
BigDecimal kmCoeficienteTarifa2 = orgaoTramo.getKmCoeficiente2();
|
||||||
if (kmCoeficienteTarifa2 != null) {
|
if (kmCoeficienteTarifa2 != null) {
|
||||||
totalKm = totalKm.add(kmCoeficienteTarifa2);
|
totalKm = totalKm.add(kmCoeficienteTarifa2);
|
||||||
lc = new Listcell(kmCoeficienteTarifa2.toString());
|
lc = new Listcell(BigDecimalUtil.getBigDecimalToStringDouble2CasasDecimaisFormatado(kmCoeficienteTarifa2, LocaleUtil.getLocale()));
|
||||||
} else {
|
} else {
|
||||||
lc = new Listcell("");
|
lc = new Listcell("");
|
||||||
}
|
}
|
||||||
|
@ -66,7 +68,7 @@ public class RenderOrgaoTramo implements ListitemRenderer {
|
||||||
BigDecimal kmCoeficienteTarifa3 = orgaoTramo.getKmCoeficiente3();
|
BigDecimal kmCoeficienteTarifa3 = orgaoTramo.getKmCoeficiente3();
|
||||||
if (kmCoeficienteTarifa3 != null) {
|
if (kmCoeficienteTarifa3 != null) {
|
||||||
totalKm = totalKm.add(kmCoeficienteTarifa3);
|
totalKm = totalKm.add(kmCoeficienteTarifa3);
|
||||||
lc = new Listcell(kmCoeficienteTarifa3.toString());
|
lc = new Listcell(BigDecimalUtil.getBigDecimalToStringDouble2CasasDecimaisFormatado(kmCoeficienteTarifa3, LocaleUtil.getLocale()));
|
||||||
} else {
|
} else {
|
||||||
lc = new Listcell("");
|
lc = new Listcell("");
|
||||||
}
|
}
|
||||||
|
@ -88,7 +90,7 @@ public class RenderOrgaoTramo implements ListitemRenderer {
|
||||||
}
|
}
|
||||||
lc.setParent(lstm);
|
lc.setParent(lstm);
|
||||||
|
|
||||||
lc = new Listcell(totalKm.toString());
|
lc = new Listcell(BigDecimalUtil.getBigDecimalToStringDouble2CasasDecimaisFormatado(totalKm, LocaleUtil.getLocale()));
|
||||||
lc.setParent(lstm);
|
lc.setParent(lstm);
|
||||||
|
|
||||||
lstm.setAttribute("data", orgaoTramo);
|
lstm.setAttribute("data", orgaoTramo);
|
||||||
|
|
|
@ -4,15 +4,18 @@
|
||||||
*/
|
*/
|
||||||
package com.rjconsultores.ventaboletos.web.utilerias.render;
|
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.BigDecimal;
|
||||||
import java.math.RoundingMode;
|
|
||||||
import org.zkoss.zul.Listcell;
|
import org.zkoss.zul.Listcell;
|
||||||
import org.zkoss.zul.Listitem;
|
import org.zkoss.zul.Listitem;
|
||||||
import org.zkoss.zul.ListitemRenderer;
|
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
|
* @author Administrador
|
||||||
|
@ -54,7 +57,7 @@ public class RenderTramo implements ListitemRenderer {
|
||||||
|
|
||||||
BigDecimal kmReal = tramo.getKmReal();
|
BigDecimal kmReal = tramo.getKmReal();
|
||||||
if (kmReal != null) {
|
if (kmReal != null) {
|
||||||
lc = new Listcell(kmReal.setScale(2, RoundingMode.UP).toString());
|
lc = new Listcell(BigDecimalUtil.getBigDecimalToStringDouble2CasasDecimaisFormatado(kmReal, LocaleUtil.getLocale()));
|
||||||
} else {
|
} else {
|
||||||
lc = new Listcell("");
|
lc = new Listcell("");
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue