From c3eacaea23eebf1ea12ac5b633139e046cd58359 Mon Sep 17 00:00:00 2001 From: "thiago.clemente" Date: Mon, 18 Nov 2019 13:25:42 +0000 Subject: [PATCH] fixes bug#16947 dev: qua: git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/AdmVenta/Web/trunk/ventaboletos@98811 d1611594-4594-4d17-8e1d-87c2c4800839 --- .../relatorios/impl/RelatorioAgenciaFechamentoAntigo.java | 4 ++-- .../impl/RelatorioAgenciaFechamentoResumoDiario.java | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/java/com/rjconsultores/ventaboletos/relatorios/impl/RelatorioAgenciaFechamentoAntigo.java b/src/java/com/rjconsultores/ventaboletos/relatorios/impl/RelatorioAgenciaFechamentoAntigo.java index aa29300b6..2ef5c2498 100644 --- a/src/java/com/rjconsultores/ventaboletos/relatorios/impl/RelatorioAgenciaFechamentoAntigo.java +++ b/src/java/com/rjconsultores/ventaboletos/relatorios/impl/RelatorioAgenciaFechamentoAntigo.java @@ -170,7 +170,7 @@ public class RelatorioAgenciaFechamentoAntigo extends Relatorio { sql.append(" COALESCE(COUNT(CASE WHEN c.INDREMOTOINVERSO = 1 THEN 1 ELSE NULL END),0) AS qtdedigitado, "); sql.append(" "); sql.append(" COALESCE(COUNT(CASE WHEN c.MOTIVOCANCELACION_ID = 31 THEN 1 ELSE NULL END),0) AS qtdeAnulado, "); - sql.append(" COALESCE(COUNT(CASE WHEN c.MOTIVOCANCELACION_ID is not null and c.MOTIVOCANCELACION_ID <> 31 THEN 1 ELSE NULL END),0) AS qtdeDevolvido, "); + sql.append(" COALESCE(COUNT(CASE WHEN c.MOTIVOCANCELACION_ID is not null and c.MOTIVOCANCELACION_ID = 32 THEN 1 ELSE NULL END),0) AS qtdeDevolvido, "); sql.append(" "); sql.append(" COALESCE(SUM(CASE WHEN c.MOTIVOCANCELACION_ID IS NULL and (c.INDREMOTOINVERSO is null or c.INDREMOTOINVERSO =0) THEN ( "); sql.append(" coalesce(c.IMPORTEOUTROS,0) + coalesce(c.IMPORTEPEDAGIO,0) + coalesce(c.IMPORTESEGURO,0) "); @@ -184,7 +184,7 @@ public class RelatorioAgenciaFechamentoAntigo extends Relatorio { sql.append(" coalesce(c.IMPORTEOUTROS,0) + coalesce(c.IMPORTEPEDAGIO,0) + coalesce(c.IMPORTESEGURO,0) "); sql.append(" +coalesce(IMPORTETAXAEMBARQUE ,0)+coalesce(c.preciopagado,0)) ELSE NULL END),0) AS anulado, "); sql.append(" "); - sql.append(" COALESCE(SUM(CASE WHEN c.MOTIVOCANCELACION_ID is not null and c.MOTIVOCANCELACION_ID <> 31 THEN ( "); + sql.append(" COALESCE(SUM(CASE WHEN c.MOTIVOCANCELACION_ID is not null and c.MOTIVOCANCELACION_ID = 32 THEN ( "); sql.append(" coalesce(c.IMPORTEOUTROS,0) + coalesce(c.IMPORTEPEDAGIO,0) + coalesce(c.IMPORTESEGURO,0) "); sql.append(" +coalesce(IMPORTETAXAEMBARQUE ,0)+coalesce(c.preciopagado,0)) ELSE NULL END),0) AS devolvido "); sql.append(" "); diff --git a/src/java/com/rjconsultores/ventaboletos/relatorios/impl/RelatorioAgenciaFechamentoResumoDiario.java b/src/java/com/rjconsultores/ventaboletos/relatorios/impl/RelatorioAgenciaFechamentoResumoDiario.java index 859f6b125..fa70d32aa 100644 --- a/src/java/com/rjconsultores/ventaboletos/relatorios/impl/RelatorioAgenciaFechamentoResumoDiario.java +++ b/src/java/com/rjconsultores/ventaboletos/relatorios/impl/RelatorioAgenciaFechamentoResumoDiario.java @@ -170,7 +170,7 @@ public class RelatorioAgenciaFechamentoResumoDiario extends Relatorio { sql.append(" COALESCE(COUNT(CASE WHEN c.INDREMOTOINVERSO = 1 THEN 1 ELSE NULL END),0) AS qtdedigitado, "); sql.append(" "); sql.append(" COALESCE(COUNT(CASE WHEN c.MOTIVOCANCELACION_ID = 31 THEN 1 ELSE NULL END),0) AS qtdeAnulado, "); - sql.append(" COALESCE(COUNT(CASE WHEN c.MOTIVOCANCELACION_ID is not null and c.MOTIVOCANCELACION_ID <> 31 THEN 1 ELSE NULL END),0) AS qtdeDevolvido, "); + sql.append(" COALESCE(COUNT(CASE WHEN c.MOTIVOCANCELACION_ID is not null and c.MOTIVOCANCELACION_ID = 32 THEN 1 ELSE NULL END),0) AS qtdeDevolvido, "); sql.append(" "); sql.append(" COALESCE(SUM(CASE WHEN c.MOTIVOCANCELACION_ID IS NULL and (c.INDREMOTOINVERSO is null or c.INDREMOTOINVERSO =0) THEN ( "); sql.append(" coalesce(c.IMPORTEOUTROS,0) + coalesce(c.IMPORTEPEDAGIO,0) + coalesce(c.IMPORTESEGURO,0) "); @@ -184,7 +184,7 @@ public class RelatorioAgenciaFechamentoResumoDiario extends Relatorio { sql.append(" coalesce(c.IMPORTEOUTROS,0) + coalesce(c.IMPORTEPEDAGIO,0) + coalesce(c.IMPORTESEGURO,0) "); sql.append(" +coalesce(IMPORTETAXAEMBARQUE ,0)+coalesce(c.preciopagado,0)) ELSE NULL END),0) AS anulado, "); sql.append(" "); - sql.append(" COALESCE(SUM(CASE WHEN c.MOTIVOCANCELACION_ID is not null and c.MOTIVOCANCELACION_ID <> 31 THEN ( "); + sql.append(" COALESCE(SUM(CASE WHEN c.MOTIVOCANCELACION_ID is not null and c.MOTIVOCANCELACION_ID = 32 THEN ( "); sql.append(" coalesce(c.IMPORTEOUTROS,0) + coalesce(c.IMPORTEPEDAGIO,0) + coalesce(c.IMPORTESEGURO,0) "); sql.append(" +coalesce(IMPORTETAXAEMBARQUE ,0)+coalesce(c.preciopagado,0)) ELSE NULL END),0) AS devolvido, "); sql.append(" pv.PUNTOVENTA_ID AS puntoventaId ");