fixes bug#22092
qua: dev: Lucas Taia git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/AdmVenta/Web/trunk/ventaboletos@106365 d1611594-4594-4d17-8e1d-87c2c4800839master
parent
f28c2f3eab
commit
577099e5ef
|
@ -268,7 +268,7 @@ public class RelatorioDevolucaoBilhetes extends Relatorio {
|
||||||
|
|
||||||
BigDecimal valorIsenta = BigDecimal.ZERO;
|
BigDecimal valorIsenta = BigDecimal.ZERO;
|
||||||
|
|
||||||
BigDecimal pedagio = new BigDecimal(db.getVcomp02() == null ? "0.0" : db.getVcomp02()) ;
|
BigDecimal pedagio = new BigDecimal(db.getVcomp02() == null ? "0.0" : db.getVcomp02());
|
||||||
BigDecimal pedagioIsento = isInterEstadual && !db.getIndPedadioEstdual() ? pedagio : BigDecimal.ZERO;
|
BigDecimal pedagioIsento = isInterEstadual && !db.getIndPedadioEstdual() ? pedagio : BigDecimal.ZERO;
|
||||||
if (pedagioIsento.compareTo(BigDecimal.ZERO) == 0)
|
if (pedagioIsento.compareTo(BigDecimal.ZERO) == 0)
|
||||||
pedagioIsento = !isInterEstadual && !db.getIndPedagioMunicipal() ? pedagio : BigDecimal.ZERO;
|
pedagioIsento = !isInterEstadual && !db.getIndPedagioMunicipal() ? pedagio : BigDecimal.ZERO;
|
||||||
|
@ -278,7 +278,7 @@ public class RelatorioDevolucaoBilhetes extends Relatorio {
|
||||||
if (taxaEmbarqueIsento.compareTo(BigDecimal.ZERO) == 0)
|
if (taxaEmbarqueIsento.compareTo(BigDecimal.ZERO) == 0)
|
||||||
taxaEmbarqueIsento = !isInterEstadual && !db.getIndTxEmbarqueMunicipal() ? taxaEmbarque : BigDecimal.ZERO;
|
taxaEmbarqueIsento = !isInterEstadual && !db.getIndTxEmbarqueMunicipal() ? taxaEmbarque : BigDecimal.ZERO;
|
||||||
|
|
||||||
BigDecimal seguro = new BigDecimal(db.getVcomp04() == null ? "0.0" : db.getVcomp04()) ;
|
BigDecimal seguro = new BigDecimal(db.getVcomp04() == null ? "0.0" : db.getVcomp04());
|
||||||
BigDecimal seguroIsento = isInterEstadual && !db.getIndSeguroEstadual() ? seguro : BigDecimal.ZERO;
|
BigDecimal seguroIsento = isInterEstadual && !db.getIndSeguroEstadual() ? seguro : BigDecimal.ZERO;
|
||||||
if (seguroIsento.compareTo(BigDecimal.ZERO) == 0)
|
if (seguroIsento.compareTo(BigDecimal.ZERO) == 0)
|
||||||
seguroIsento = isInterEstadual && !db.getIndSeguroMunicipal() ? seguro : BigDecimal.ZERO;
|
seguroIsento = isInterEstadual && !db.getIndSeguroMunicipal() ? seguro : BigDecimal.ZERO;
|
||||||
|
@ -955,7 +955,6 @@ public class RelatorioDevolucaoBilhetes extends Relatorio {
|
||||||
sql.append(empresaId == null ? "" : "AND E.EMPRESA_ID IN (" + empresaId + ") ");
|
sql.append(empresaId == null ? "" : "AND E.EMPRESA_ID IN (" + empresaId + ") ");
|
||||||
|
|
||||||
sql.append("AND B.CATEGORIA_ID NOT IN (SELECT VALORCONSTANTE FROM CONSTANTE WHERE NOMBCONSTANTE = 'GRATUIDADE_CRIANCA') ");
|
sql.append("AND B.CATEGORIA_ID NOT IN (SELECT VALORCONSTANTE FROM CONSTANTE WHERE NOMBCONSTANTE = 'GRATUIDADE_CRIANCA') ");
|
||||||
sql.append("AND B.NUM_BPE IS NULL ");
|
|
||||||
sql.append("ORDER BY NOMB_EMPRESA, ESTADO, UF, FECHOR_DEVOLUCAO, NUMFOLIOSISTEMA");
|
sql.append("ORDER BY NOMB_EMPRESA, ESTADO, UF, FECHOR_DEVOLUCAO, NUMFOLIOSISTEMA");
|
||||||
|
|
||||||
return sql.toString();
|
return sql.toString();
|
||||||
|
|
|
@ -147,16 +147,28 @@ public class RelatorioDevolucaoBilhetesController extends MyGenericForwardCompos
|
||||||
parametros.put("isBpe", bpe);
|
parametros.put("isBpe", bpe);
|
||||||
parametros.put("isConsultaOtimizada", consultaOtimizada.isChecked());
|
parametros.put("isConsultaOtimizada", consultaOtimizada.isChecked());
|
||||||
|
|
||||||
|
boolean isPuntoVentaTodos = false;
|
||||||
filtro.append("Agência(s): ");
|
filtro.append("Agência(s): ");
|
||||||
if (puntoVentaSelList.getListData().size() > 0) {
|
if (puntoVentaSelList.getListData().size() > 0) {
|
||||||
List<PuntoVenta> puntoVentas = new ArrayList<PuntoVenta>();
|
List<PuntoVenta> puntoVentas = new ArrayList<PuntoVenta>();
|
||||||
for (Object obj : puntoVentaSelList.getListData()) {
|
for (Object obj : puntoVentaSelList.getListData()) {
|
||||||
puntoVentas.add((PuntoVenta) obj);
|
puntoVentas.add((PuntoVenta) obj);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
for (PuntoVenta pv : puntoVentas) {
|
||||||
|
if (pv.getPuntoventaId() == -1) {
|
||||||
|
isPuntoVentaTodos = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!isPuntoVentaTodos) {
|
||||||
parametros.put("PUNTOVENTAS", puntoVentas);
|
parametros.put("PUNTOVENTAS", puntoVentas);
|
||||||
parametros.put("ISNUMPUNTOVENTATODOS", "N");
|
parametros.put("ISNUMPUNTOVENTATODOS", "N");
|
||||||
filtro.append(puntoVentaSelList.getListData().size() + " selecionada(s);");
|
filtro.append(puntoVentaSelList.getListData().size() + " selecionada(s);");
|
||||||
} else {
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (isPuntoVentaTodos || !(puntoVentaSelList.getListData().size() > 0)) {
|
||||||
parametros.put("ISNUMPUNTOVENTATODOS", "S");
|
parametros.put("ISNUMPUNTOVENTATODOS", "S");
|
||||||
filtro.append("Todas");
|
filtro.append("Todas");
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue