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:
parent
db44b6e439
commit
34c5d24147
|
@ -56,11 +56,13 @@ public class MPeriod extends X_C_Period
|
||||||
* Get Period from Cache
|
* Get Period from Cache
|
||||||
* @param ctx context
|
* @param ctx context
|
||||||
* @param C_Period_ID id
|
* @param C_Period_ID id
|
||||||
* @param AD_Org_ID Organization
|
|
||||||
* @return MPeriod
|
* @return MPeriod
|
||||||
*/
|
*/
|
||||||
public static MPeriod get (Properties ctx, int C_Period_ID)
|
public static MPeriod get (Properties ctx, int C_Period_ID)
|
||||||
{
|
{
|
||||||
|
if (C_Period_ID <= 0)
|
||||||
|
return null;
|
||||||
|
//
|
||||||
Integer key = new Integer(C_Period_ID);
|
Integer key = new Integer(C_Period_ID);
|
||||||
MPeriod retValue = (MPeriod) s_cache.get (key);
|
MPeriod retValue = (MPeriod) s_cache.get (key);
|
||||||
if (retValue != null)
|
if (retValue != null)
|
||||||
|
@ -99,7 +101,6 @@ public class MPeriod extends X_C_Period
|
||||||
|
|
||||||
int C_Calendar_ID = getC_Calendar_ID(ctx,AD_Org_ID);
|
int C_Calendar_ID = getC_Calendar_ID(ctx,AD_Org_ID);
|
||||||
|
|
||||||
|
|
||||||
// Search in Cache first
|
// Search in Cache first
|
||||||
Iterator<MPeriod> it = s_cache.values().iterator();
|
Iterator<MPeriod> it = s_cache.values().iterator();
|
||||||
while (it.hasNext())
|
while (it.hasNext())
|
||||||
|
|
Loading…
Reference in New Issue