IDEMPIERE-2183 Incomplete deprecation on MPeriod
This commit is contained in:
parent
3a8f9cd226
commit
aa6b1b2317
|
@ -1004,7 +1004,7 @@ public abstract class Doc
|
||||||
m_period = MPeriod.get(getCtx(), ii.intValue());
|
m_period = MPeriod.get(getCtx(), ii.intValue());
|
||||||
}
|
}
|
||||||
if (m_period == null)
|
if (m_period == null)
|
||||||
m_period = MPeriod.get(getCtx(), getDateAcct(), getAD_Org_ID());
|
m_period = MPeriod.get(getCtx(), getDateAcct(), getAD_Org_ID(), m_trxName);
|
||||||
// Is Period Open?
|
// Is Period Open?
|
||||||
if (m_period != null
|
if (m_period != null
|
||||||
&& m_period.isOpen(getDocumentType(), getDateAcct()))
|
&& m_period.isOpen(getDocumentType(), getDateAcct()))
|
||||||
|
|
|
@ -325,7 +325,7 @@ implements DocAction
|
||||||
}
|
}
|
||||||
if (newRecord || is_ValueChanged(COLUMNNAME_DateAcct))
|
if (newRecord || is_ValueChanged(COLUMNNAME_DateAcct))
|
||||||
{
|
{
|
||||||
setC_Period_ID(MPeriod.get(getCtx(), getDateAcct(), getAD_Org_ID()).get_ID());
|
setC_Period_ID(MPeriod.get(getCtx(), getDateAcct(), getAD_Org_ID(), get_TrxName()).get_ID());
|
||||||
}
|
}
|
||||||
if (getA_Disposed_Date() == null)
|
if (getA_Disposed_Date() == null)
|
||||||
{
|
{
|
||||||
|
|
|
@ -71,7 +71,7 @@ implements DocAction
|
||||||
|
|
||||||
public void setC_Period_ID()
|
public void setC_Period_ID()
|
||||||
{
|
{
|
||||||
MPeriod period = MPeriod.get(getCtx(), getDateAcct(), getAD_Org_ID());
|
MPeriod period = MPeriod.get(getCtx(), getDateAcct(), getAD_Org_ID(), get_TrxName());
|
||||||
if (period == null)
|
if (period == null)
|
||||||
{
|
{
|
||||||
throw new AdempiereException("@NotFound@ @C_Period_ID@");
|
throw new AdempiereException("@NotFound@ @C_Period_ID@");
|
||||||
|
|
|
@ -93,7 +93,7 @@ implements DocAction
|
||||||
|
|
||||||
public void setC_Period_ID()
|
public void setC_Period_ID()
|
||||||
{
|
{
|
||||||
MPeriod period = MPeriod.get(getCtx(), getDateAcct(), getAD_Org_ID());
|
MPeriod period = MPeriod.get(getCtx(), getDateAcct(), getAD_Org_ID(), get_TrxName());
|
||||||
if (period == null)
|
if (period == null)
|
||||||
{
|
{
|
||||||
throw new AdempiereException("@NotFound@ @C_Period_ID@");
|
throw new AdempiereException("@NotFound@ @C_Period_ID@");
|
||||||
|
|
|
@ -438,7 +438,7 @@ public class MJournal extends X_GL_Journal implements DocAction
|
||||||
MDocType dt = MDocType.get(getCtx(), getC_DocType_ID());
|
MDocType dt = MDocType.get(getCtx(), getC_DocType_ID());
|
||||||
|
|
||||||
// Get Period
|
// Get Period
|
||||||
MPeriod period = MPeriod.get (getCtx(), getDateAcct(), getAD_Org_ID());
|
MPeriod period = MPeriod.get (getCtx(), getDateAcct(), getAD_Org_ID(), get_TrxName());
|
||||||
if (period == null)
|
if (period == null)
|
||||||
{
|
{
|
||||||
log.warning("No Period for " + getDateAcct());
|
log.warning("No Period for " + getDateAcct());
|
||||||
|
|
|
@ -54,7 +54,7 @@ public class MPeriod extends X_C_Period
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
private static final long serialVersionUID = 6498973218391994963L;
|
private static final long serialVersionUID = -1636783790829454894L;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get Period from Cache
|
* Get Period from Cache
|
||||||
|
@ -97,7 +97,7 @@ public class MPeriod extends X_C_Period
|
||||||
* @param AD_Org_ID Organization
|
* @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)
|
public static MPeriod get (Properties ctx, Timestamp DateAcct, int AD_Org_ID, String trxName)
|
||||||
{
|
{
|
||||||
|
|
||||||
if (DateAcct == null)
|
if (DateAcct == null)
|
||||||
|
@ -105,9 +105,15 @@ 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);
|
||||||
|
|
||||||
return findByCalendar(ctx, DateAcct, C_Calendar_ID);
|
return findByCalendar(ctx, DateAcct, C_Calendar_ID, trxName);
|
||||||
} // get
|
} // get
|
||||||
|
|
||||||
|
@Deprecated
|
||||||
|
public static MPeriod get (Properties ctx, Timestamp DateAcct, int AD_Org_ID)
|
||||||
|
{
|
||||||
|
return get(ctx, DateAcct, AD_Org_ID, null);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @param ctx
|
* @param ctx
|
||||||
|
|
Loading…
Reference in New Issue