From f0c7b600df86f0a6cf88562e99163dc870315b75 Mon Sep 17 00:00:00 2001 From: "bruno.neves" Date: Mon, 8 May 2017 20:36:27 +0000 Subject: [PATCH] =?UTF-8?q?fixed=20bug=20#0008931=20-Adicionada=20a=20quer?= =?UTF-8?q?y=20o=20filtro=20para=20o=20relat=C3=B3rio=20s=C3=B3=20apresent?= =?UTF-8?q?ar=20os=20dados=20ativos?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/AdmVenta/Web/trunk/ventaboletos@68612 d1611594-4594-4d17-8e1d-87c2c4800839 --- .../relatorios/impl/RelatorioKmProgramada.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/java/com/rjconsultores/ventaboletos/relatorios/impl/RelatorioKmProgramada.java b/src/java/com/rjconsultores/ventaboletos/relatorios/impl/RelatorioKmProgramada.java index 08e327cc5..32ecabb3e 100644 --- a/src/java/com/rjconsultores/ventaboletos/relatorios/impl/RelatorioKmProgramada.java +++ b/src/java/com/rjconsultores/ventaboletos/relatorios/impl/RelatorioKmProgramada.java @@ -144,13 +144,14 @@ public class RelatorioKmProgramada extends Relatorio { sql.append(" c.EMPRESACORRIDA_ID AS Empresa,"); sql.append(" r.DESCRUTA AS DescLinha,"); sql.append(" c.TIPOSERVICIO_ID,"); - sql.append(" (select sum(t.CANTKMREAL) from CORRIDA_TRAMO ct inner join TRAMO t ON ct.TRAMO_ID = t.TRAMO_ID where ct.CORRIDA_ID = c.CORRIDA_ID"); + sql.append(" (select sum(t.CANTKMREAL) from CORRIDA_TRAMO ct inner join TRAMO t ON ct.TRAMO_ID = t.TRAMO_ID AND t.ACTIVO = 1 where ct.CORRIDA_ID = c.CORRIDA_ID AND ct.ACTIVO = 1"); sql.append(" AND ct.FECCORRIDA = c.FECCORRIDA ) AS KMPadrao"); sql.append(" FROM CORRIDA c"); sql.append(" JOIN RUTA r"); - sql.append(" ON c.RUTA_ID = r.RUTA_ID"); + sql.append(" ON c.RUTA_ID = r.RUTA_ID and R.ACTIVO=1"); sql.append(" WHERE "); - sql.append(" c.FECCORRIDA BETWEEN :fecInicio and :fecFinal"); + sql.append(" c.ACTIVO=1"); + sql.append(" and c.FECCORRIDA BETWEEN :fecInicio and :fecFinal"); if (!empresaId.equals("null")) { sql.append(" and c.EMPRESACORRIDA_ID = :empresaId "); }