From aada86b20ea8fd01fde9c63e6f11a3b50fa3d83d Mon Sep 17 00:00:00 2001 From: "thiago.clemente" Date: Thu, 31 Oct 2019 22:08:31 +0000 Subject: [PATCH] fixes bug#16608 dev: qua: git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/AdmVenta/Web/trunk/ventaboletos@98568 d1611594-4594-4d17-8e1d-87c2c4800839 --- .../relatorios/impl/RelatorioTaxasLinha.java | 12 ++++++------ .../relatorios/RelatorioTaxasLinhaController.java | 12 ++++++------ 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/java/com/rjconsultores/ventaboletos/relatorios/impl/RelatorioTaxasLinha.java b/src/java/com/rjconsultores/ventaboletos/relatorios/impl/RelatorioTaxasLinha.java index 10d0c8ffe..fa6ef4348 100644 --- a/src/java/com/rjconsultores/ventaboletos/relatorios/impl/RelatorioTaxasLinha.java +++ b/src/java/com/rjconsultores/ventaboletos/relatorios/impl/RelatorioTaxasLinha.java @@ -247,9 +247,9 @@ public class RelatorioTaxasLinha extends Relatorio { sql.append(" EM.EMPRESA_ID, "); sql.append(" CJ.PUNTOVENTA_ID, "); sql.append(" PV.NOMBPUNTOVENTA, "); - sql.append(" SUM(CASE WHEN (CJ.IMPORTETAXAEMBARQUE>0 and cj.motivocancelacion_id is null ) THEN 1 WHEN (CJ.IMPORTETAXAEMBARQUE>0 and cj.motivocancelacion_id is not null ) then -1 ELSE 0 END) EMBARQUE_VENDIDOS, "); - sql.append(" SUM(CASE WHEN (CJ.IMPORTEPEDAGIO>0 and cj.motivocancelacion_id is null) THEN 1 WHEN (CJ.IMPORTEPEDAGIO>0 and cj.motivocancelacion_id is not null) THEN -1 ELSE 0 END) PEDAGIO_VENDIDOS, "); - sql.append(" SUM(CASE WHEN (CJ.IMPORTESEGURO>0 and cj.motivocancelacion_id is null) THEN 1 WHEN (CJ.IMPORTESEGURO>0 and cj.motivocancelacion_id is not null) THEN -1 ELSE 0 END) SEGURO_VENDIDOS, "); + sql.append(" SUM(CASE WHEN (CJ.IMPORTETAXAEMBARQUE>0 and cj.motivocancelacion_id is null ) THEN 1 WHEN (CJ.IMPORTETAXAEMBARQUE>0 and cj.motivocancelacion_id is not null ) then 0 ELSE 0 END) EMBARQUE_VENDIDOS, "); + sql.append(" SUM(CASE WHEN (CJ.IMPORTEPEDAGIO>0 and cj.motivocancelacion_id is null) THEN 1 WHEN (CJ.IMPORTEPEDAGIO>0 and cj.motivocancelacion_id is not null) THEN 0 ELSE 0 END) PEDAGIO_VENDIDOS, "); + sql.append(" SUM(CASE WHEN (CJ.IMPORTESEGURO>0 and cj.motivocancelacion_id is null) THEN 1 WHEN (CJ.IMPORTESEGURO>0 and cj.motivocancelacion_id is not null) THEN 0 ELSE 0 END) SEGURO_VENDIDOS, "); sql.append(" CO.ESTADO_ID ORIGEM_ESTADO_ID, "); sql.append(" CD.ESTADO_ID DESTINO_ESTADO_ID, "); sql.append(" CASE "); @@ -258,9 +258,9 @@ public class RelatorioTaxasLinha extends Relatorio { sql.append(" ELSE "); sql.append(" 'N' "); sql.append(" END INTERESTADUAL, "); - sql.append(" SUM( (case when cj.motivocancelacion_id is null then 1 else -1 end) * CJ.IMPORTETAXAEMBARQUE) TOTAL_EMBARQUE, "); - sql.append(" SUM( (case when cj.motivocancelacion_id is null then 1 else -1 end) * CJ.IMPORTEPEDAGIO) TOTAL_PEDAGIO, "); - sql.append(" SUM( (case when cj.motivocancelacion_id is null then 1 else -1 end) * CJ.IMPORTESEGURO) TOTAL_SEGURO, "); + sql.append(" SUM( (case when cj.motivocancelacion_id is null then 1 else 0 end) * CJ.IMPORTETAXAEMBARQUE) TOTAL_EMBARQUE, "); + sql.append(" SUM( (case when cj.motivocancelacion_id is null then 1 else 0 end) * CJ.IMPORTEPEDAGIO) TOTAL_PEDAGIO, "); + sql.append(" SUM( (case when cj.motivocancelacion_id is null then 1 else 0 end) * CJ.IMPORTESEGURO) TOTAL_SEGURO, "); sql.append(" EST.ICMS AS ICMS "); sql.append("FROM CAJA CJ "); diff --git a/src/java/com/rjconsultores/ventaboletos/web/gui/controladores/relatorios/RelatorioTaxasLinhaController.java b/src/java/com/rjconsultores/ventaboletos/web/gui/controladores/relatorios/RelatorioTaxasLinhaController.java index c85960a5c..10c808793 100644 --- a/src/java/com/rjconsultores/ventaboletos/web/gui/controladores/relatorios/RelatorioTaxasLinhaController.java +++ b/src/java/com/rjconsultores/ventaboletos/web/gui/controladores/relatorios/RelatorioTaxasLinhaController.java @@ -573,9 +573,9 @@ public class RelatorioTaxasLinhaController extends MyGenericForwardComposer { sql.append(" EM.EMPRESA_ID, "); sql.append(" CJ.PUNTOVENTA_ID, "); sql.append(" PV.NOMBPUNTOVENTA, "); - sql.append(" SUM(CASE WHEN (CJ.IMPORTETAXAEMBARQUE>0 and cj.motivocancelacion_id is null ) THEN 1 WHEN (CJ.IMPORTETAXAEMBARQUE>0 and cj.motivocancelacion_id is not null ) then -1 ELSE 0 END) EMBARQUE_VENDIDOS, "); - sql.append(" SUM(CASE WHEN (CJ.IMPORTEPEDAGIO>0 and cj.motivocancelacion_id is null) THEN 1 WHEN (CJ.IMPORTEPEDAGIO>0 and cj.motivocancelacion_id is not null) THEN -1 ELSE 0 END) PEDAGIO_VENDIDOS, "); - sql.append(" SUM(CASE WHEN (CJ.IMPORTESEGURO>0 and cj.motivocancelacion_id is null) THEN 1 WHEN (CJ.IMPORTESEGURO>0 and cj.motivocancelacion_id is not null) THEN -1 ELSE 0 END) SEGURO_VENDIDOS, "); + sql.append(" SUM(CASE WHEN (CJ.IMPORTETAXAEMBARQUE>0 and cj.motivocancelacion_id is null ) THEN 1 WHEN (CJ.IMPORTETAXAEMBARQUE>0 and cj.motivocancelacion_id is not null ) then 0 ELSE 0 END) EMBARQUE_VENDIDOS, "); + sql.append(" SUM(CASE WHEN (CJ.IMPORTEPEDAGIO>0 and cj.motivocancelacion_id is null) THEN 1 WHEN (CJ.IMPORTEPEDAGIO>0 and cj.motivocancelacion_id is not null) THEN 0 ELSE 0 END) PEDAGIO_VENDIDOS, "); + sql.append(" SUM(CASE WHEN (CJ.IMPORTESEGURO>0 and cj.motivocancelacion_id is null) THEN 1 WHEN (CJ.IMPORTESEGURO>0 and cj.motivocancelacion_id is not null) THEN 0 ELSE 0 END) SEGURO_VENDIDOS, "); sql.append(" CO.ESTADO_ID ORIGEM_ESTADO_ID, "); sql.append(" CD.ESTADO_ID DESTINO_ESTADO_ID, "); sql.append(" CASE "); @@ -584,9 +584,9 @@ public class RelatorioTaxasLinhaController extends MyGenericForwardComposer { sql.append(" ELSE "); sql.append(" 'N' "); sql.append(" END INTERESTADUAL, "); - sql.append(" SUM( (case when cj.motivocancelacion_id is null then 1 else -1 end) * CJ.IMPORTETAXAEMBARQUE) TOTAL_EMBARQUE, "); - sql.append(" SUM( (case when cj.motivocancelacion_id is null then 1 else -1 end) * CJ.IMPORTEPEDAGIO) TOTAL_PEDAGIO, "); - sql.append(" SUM( (case when cj.motivocancelacion_id is null then 1 else -1 end) * CJ.IMPORTESEGURO) TOTAL_SEGURO, "); + sql.append(" SUM( (case when cj.motivocancelacion_id is null then 1 else 0 end) * CJ.IMPORTETAXAEMBARQUE) TOTAL_EMBARQUE, "); + sql.append(" SUM( (case when cj.motivocancelacion_id is null then 1 else 0 end) * CJ.IMPORTEPEDAGIO) TOTAL_PEDAGIO, "); + sql.append(" SUM( (case when cj.motivocancelacion_id is null then 1 else 0 end) * CJ.IMPORTESEGURO) TOTAL_SEGURO, "); sql.append(" EST.ICMS AS ICMS, "); sql.append(" POC.PARADA_id as origenCorridaId, "); sql.append(" PDC.PARADA_id as destinoCorridaId, ");