diff --git a/src/com/rjconsultores/integracaoreceitadespesa/dao/Totalbus.java b/src/com/rjconsultores/integracaoreceitadespesa/dao/Totalbus.java index 12667b097..6920167d2 100644 --- a/src/com/rjconsultores/integracaoreceitadespesa/dao/Totalbus.java +++ b/src/com/rjconsultores/integracaoreceitadespesa/dao/Totalbus.java @@ -245,8 +245,8 @@ public class Totalbus { 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("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("left join empresa_contabancaria ec on EC.EMPRESA_ID = fc.EMPRESA_ID AND EC.INSTIFINANCEIRA_ID = if.INSTIFINANCEIRA_ID AND EC.ACTIVO = 1 "); + strFechamentos.append("left 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)){