fixed bug #7107 - Criação de relatório de depósitos detalhados.

git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/Integracion/IntegracaoReceitaDespesa/trunk/IntegracaoReceitaDespesa@53077 d1611594-4594-4d17-8e1d-87c2c4800839
master
thiago 2016-02-19 16:11:00 +00:00
parent 4e6a225ccc
commit 89e1c4fa7e
1 changed files with 4 additions and 3 deletions

View File

@ -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)){