diff --git a/src/com/rjconsultores/integracaoreceitadespesa/dao/Totalbus.java b/src/com/rjconsultores/integracaoreceitadespesa/dao/Totalbus.java index 421cbb74a..265b0d16b 100644 --- a/src/com/rjconsultores/integracaoreceitadespesa/dao/Totalbus.java +++ b/src/com/rjconsultores/integracaoreceitadespesa/dao/Totalbus.java @@ -231,22 +231,21 @@ public class Totalbus { public List getDepositos(Integer puntoventaId, Integer empresaId, Date fechaParam){ List depositos = new ArrayList(); StringBuilder sb = new StringBuilder(); - sb.append("select fdep.fechamentodeposito_id, fdep.valor, fdep.numdeposito, fdep.FECMODIF "); + sb.append("select fdep.fechamentodeposito_id, fdep.valor, fdep.numdeposito, fdep.FECCREACION "); sb.append("from fechamento_deposito fdep "); - sb.append("where trunc(FECMODIF) = :fecha and fdep.activo = 1 "); + sb.append("where trunc(FECCREACION) = :fecha and fdep.activo = 1 "); 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_deposito fdep "); - strFechamentos.append("join fechamento_cct_deposito fd on fd.fechamentodeposito_id = fdep.fechamentodeposito_id "); - strFechamentos.append("join fechamento_cntcorrente fc on fc.fechamentocntcorrente_id = fd.fechamentocntcorrente_id "); - strFechamentos.append("inner join PUNTO_VENTA pv on PV.PUNTOVENTA_ID = FC.PUNTOVENTA_ID "); - strFechamentos.append("left join PTOVTA_EMPRESA pe on pe.puntoventa_id = pv.puntoventa_id and pe.empresa_id = fc.empresa_id "); - strFechamentos.append("left join empresa_contabancaria ec on ec.EMPRESACONTABANCARIA_ID = pe.EMPRESACONTABANCARIA_ID "); - strFechamentos.append("left join INSTI_FINANCEIRA if on if.INSTIFINANCEIRA_ID = EC.INSTIFINANCEIRA_ID "); - strFechamentos.append("join EMPRESA e on e.empresa_id = fc.empresa_id "); - strFechamentos.append("where fd.fechamentodeposito_id = :fechamentodepositoId and fd.activo <> 0 and fc.activo <> 0 "); + strFechamentos.append(" from fechamento_deposito fdep "); + strFechamentos.append(" join fechamento_cct_deposito fd on fd.fechamentodeposito_id = fdep.fechamentodeposito_id "); + strFechamentos.append(" join fechamento_cntcorrente fc on fc.fechamentocntcorrente_id = fd.fechamentocntcorrente_id "); + strFechamentos.append(" inner join PUNTO_VENTA pv on PV.PUNTOVENTA_ID = FC.PUNTOVENTA_ID "); + strFechamentos.append(" join empresa_contabancaria ec on ec.EMPRESACONTABANCARIA_ID = fdep.EMPRESACONTABANCARIA_ID "); + strFechamentos.append(" join INSTI_FINANCEIRA if on if.INSTIFINANCEIRA_ID = EC.INSTIFINANCEIRA_ID "); + strFechamentos.append(" join EMPRESA e on e.empresa_id = fc.empresa_id "); + strFechamentos.append(" where fd.fechamentodeposito_id = :fechamentodepositoId and fd.activo <> 0 and fc.activo <> 0 "); if (puntoventaId != null && !puntoventaId.equals(-1)){ strFechamentos.append(" and fc.puntoventa_id = " + puntoventaId);