Current AD do not support multiples calendar for Org

http://sourceforge.net/tracker/?func=detail&atid=879335&aid=2520591&group_id=176962

* fixed indentation
* MPeriod.get(Properties ctx, int C_Period_ID) - should return null if C_Period_ID is 0 (same as other methods like this)
This commit is contained in:
teo_sarca 2009-01-28 07:24:18 +00:00
parent db44b6e439
commit 34c5d24147
1 changed files with 6 additions and 5 deletions

View File

@ -56,11 +56,13 @@ public class MPeriod extends X_C_Period
* Get Period from Cache
* @param ctx context
* @param C_Period_ID id
* @param AD_Org_ID Organization
* @return MPeriod
*/
public static MPeriod get (Properties ctx, int C_Period_ID)
{
if (C_Period_ID <= 0)
return null;
//
Integer key = new Integer(C_Period_ID);
MPeriod retValue = (MPeriod) s_cache.get (key);
if (retValue != null)
@ -85,11 +87,11 @@ public class MPeriod extends X_C_Period
} // get
/**
* Find standard Period of DateAcct based on Client Calendar
* @param ctx context
* Find standard Period of DateAcct based on Client Calendar
* @param ctx context
* @param DateAcct date
* @param AD_Org_ID Organization
* @return active Period or null
* @return active Period or null
*/
public static MPeriod get (Properties ctx, Timestamp DateAcct, int AD_Org_ID)
{
@ -98,7 +100,6 @@ public class MPeriod extends X_C_Period
return null;
int C_Calendar_ID = getC_Calendar_ID(ctx,AD_Org_ID);
// Search in Cache first
Iterator<MPeriod> it = s_cache.values().iterator();