From 89e1c4fa7e7070529f027e277eac07e1b20d8b75 Mon Sep 17 00:00:00 2001 From: thiago Date: Fri, 19 Feb 2016 16:11:00 +0000 Subject: [PATCH] =?UTF-8?q?fixed=20bug=20#7107=20-=20Cria=C3=A7=C3=A3o=20d?= =?UTF-8?q?e=20relat=C3=B3rio=20de=20dep=C3=B3sitos=20detalhados.?= 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/Integracion/IntegracaoReceitaDespesa/trunk/IntegracaoReceitaDespesa@53077 d1611594-4594-4d17-8e1d-87c2c4800839 --- .../integracaoreceitadespesa/dao/Totalbus.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/com/rjconsultores/integracaoreceitadespesa/dao/Totalbus.java b/src/com/rjconsultores/integracaoreceitadespesa/dao/Totalbus.java index 59af10078..12667b097 100644 --- a/src/com/rjconsultores/integracaoreceitadespesa/dao/Totalbus.java +++ b/src/com/rjconsultores/integracaoreceitadespesa/dao/Totalbus.java @@ -240,12 +240,13 @@ public class Totalbus { StringBuilder strFechamentos = new StringBuilder(); strFechamentos.append("Select fc.fecfechamento, fc.empresa_id, pv.numpuntoventa, fd.valor_pago, ec.numagencia, ec.numconta, if.CODIGO, ec.numintegracion "); strFechamentos.append("from fechamento_cct_deposito fd "); + strFechamentos.append("inner join FECHAMENTO_DEPOSITO fdep on FDEP.FECHAMENTODEPOSITO_ID = FD.FECHAMENTODEPOSITO_ID "); strFechamentos.append("inner join fechamento_cntcorrente fc on fc.fechamentocntcorrente_id = fd.fechamentocntcorrente_id "); strFechamentos.append("inner join PUNTO_VENTA pv on FC.PUNTOVENTA_ID = PV.PUNTOVENTA_ID "); strFechamentos.append("JOIN EMPRESA e ON e.EMPRESA_ID = FC.EMPRESA_ID "); - strFechamentos.append("LEFT JOIN PTOVTA_EMPRESA pve ON PVE.EMPRESA_ID = e.empresa_id AND PVE.PUNTOVENTA_ID = PV.PUNTOVENTA_ID AND PVE.activo = 1 "); - strFechamentos.append("left join empresa_contabancaria ec on EC.EMPRESA_ID = PVE.EMPRESA_ID AND EC.EMPRESACONTABANCARIA_ID = PVE.EMPRESACONTABANCARIA_ID AND EC.ACTIVO = 1 "); - strFechamentos.append("left join INSTI_FINANCEIRA if on EC.INSTIFINANCEIRA_ID = if.INSTIFINANCEIRA_ID and if.ACTIVO = 1 "); + strFechamentos.append("inner join INSTI_FINANCEIRA if on fdep.INSTIFINANCEIRA_ID = if.INSTIFINANCEIRA_ID "); + strFechamentos.append("inner join empresa_contabancaria ec on EC.EMPRESA_ID = fc.EMPRESA_ID AND EC.INSTIFINANCEIRA_ID = if.INSTIFINANCEIRA_ID AND EC.ACTIVO = 1 "); + strFechamentos.append("inner JOIN PTOVTA_EMPRESA pve ON PVE.EMPRESA_ID = e.empresa_id AND PVE.PUNTOVENTA_ID = PV.PUNTOVENTA_ID and EC.EMPRESACONTABANCARIA_ID = pve.EMPRESACONTABANCARIA_ID AND PVE.activo = 1 "); strFechamentos.append("where fd.fechamentodeposito_id = :fechamentodepositoId and fd.activo <> 0 and fc.activo <> 0 "); if (puntoventaId != null && !puntoventaId.equals(-1)){