diff --git a/base/src/org/compiere/process/DunningRunCreate.java b/base/src/org/compiere/process/DunningRunCreate.java index 781f9e981d..53f19c804f 100644 --- a/base/src/org/compiere/process/DunningRunCreate.java +++ b/base/src/org/compiere/process/DunningRunCreate.java @@ -332,7 +332,7 @@ public class DunningRunCreate extends SvrProcess if (p_OnlySOTrx) sql += " AND IsReceipt='Y'"; if ( p_AD_Org_ID != 0 ) - sql += " AND i.AD_Org_ID=" + p_AD_Org_ID; + sql += " AND p.AD_Org_ID=" + p_AD_Org_ID; int count = 0; PreparedStatement pstmt = null;