From 6097212d3d326b7ca53033a3b1a0b7235ca0072c Mon Sep 17 00:00:00 2001 From: Carlos Ruiz Date: Sat, 27 Oct 2007 01:19:33 +0000 Subject: [PATCH] Fix bug [ 1820810 ] Wrong Period Assigned to Fact_Acct --- base/src/org/compiere/model/MPeriod.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/base/src/org/compiere/model/MPeriod.java b/base/src/org/compiere/model/MPeriod.java index 364ae16ec2..ed60a634d1 100644 --- a/base/src/org/compiere/model/MPeriod.java +++ b/base/src/org/compiere/model/MPeriod.java @@ -59,6 +59,7 @@ public class MPeriod extends X_C_Period */ public static MPeriod get (Properties ctx, Timestamp DateAcct) { + int AD_Client_ID = Env.getAD_Client_ID(ctx); if (DateAcct == null) return null; // Search in Cache first @@ -66,13 +67,13 @@ public class MPeriod extends X_C_Period while (it.hasNext()) { MPeriod period = (MPeriod)it.next(); - if (period.isStandardPeriod() && period.isInPeriod(DateAcct)) + if (period.isStandardPeriod() && period.isInPeriod(DateAcct) + && period.getAD_Client_ID() == AD_Client_ID) // globalqss - CarlosRuiz - Fix [ 1820810 ] Wrong Period Assigned to Fact_Acct return period; } // Get it from DB MPeriod retValue = null; - int AD_Client_ID = Env.getAD_Client_ID(ctx); String sql = "SELECT * " + "FROM C_Period " + "WHERE C_Year_ID IN "