|
Compiere 3.1 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.compiere.framework.PO
org.compiere.model.X_C_Period
org.compiere.model.MPeriod
public class MPeriod
Calendar Period Model
| Field Summary |
|---|
| Fields inherited from class org.compiere.model.X_C_Period |
|---|
accessLevel, Model, PERIODTYPE_AD_Reference_ID, PERIODTYPE_AdjustmentPeriod, PERIODTYPE_StandardCalendarPeriod, Table_ID, Table_Name, updatedMS |
| Fields inherited from class org.compiere.framework.PO |
|---|
ACCESSLEVEL_ALL, ACCESSLEVEL_CLIENT, ACCESSLEVEL_CLIENTORG, ACCESSLEVEL_ORG, ACCESSLEVEL_SYSTEM, ACCESSLEVEL_SYSTEMCLIENT, ENTITYTYPE_Dictionary, ENTITYTYPE_UserMaintained, I_ZERO, log, p_changeVO, p_info, XML_ATTRIBUTE_AD_Table_ID, XML_ATTRIBUTE_Record_ID |
| Constructor Summary | |
|---|---|
MPeriod(Ctx ctx,
int C_Period_ID,
String trxName)
Standard Constructor |
|
MPeriod(Ctx ctx,
ResultSet rs,
String trxName)
Load Constructor |
|
MPeriod(MYear year,
int PeriodNo,
String name,
Timestamp startDate,
Timestamp endDate)
Parent constructor |
|
| Method Summary | |
|---|---|
protected boolean |
afterSave(boolean newRecord,
boolean success)
After Save |
protected boolean |
beforeSave(boolean newRecord)
Before Save. |
static MPeriod |
get(Ctx ctx,
int C_Period_ID)
Get Period from Cache |
int |
getC_Calendar_ID()
Get Calendar of Period |
static int |
getC_Period_ID(Ctx ctx,
int AD_Org_ID,
Timestamp DateAcct)
Find valid standard Period of DateAcct based on Client Calendar |
static MPeriod |
getFirstInYear(Ctx ctx,
int C_Calendar_ID,
Timestamp DateAcct)
Find first Year Period of DateAcct based on Client Calendar |
static MPeriod |
getOfCalendar(Ctx ctx,
int C_Calendar_ID,
Timestamp DateAcct)
Find standard Period of DateAcct based on Client Calendar |
static MPeriod |
getOfOrg(Ctx ctx,
int AD_Org_ID,
Timestamp DateAcct)
Find standard Period of DateAcct based on Client Calendar |
MPeriodControl |
getPeriodControl(String DocBaseType)
Get Period Control |
MPeriodControl[] |
getPeriodControls(boolean requery)
Get Period Control |
boolean |
isInPeriod(Timestamp date)
Date In Period |
static String |
isOpen(PO header,
PO[] lines,
Timestamp DateAcct,
String DocBaseType)
Is standard Period Open for Document Base Type |
String |
isOpen(String DocBaseType,
Timestamp dateAcct)
Is Period Open for Doc Base Type |
static boolean |
isOpenOld(Ctx ctx,
Timestamp DateAcct,
String DocBaseType)
Deprecated. use new isOpen |
boolean |
isStandardPeriod()
Standard Period |
String |
toString()
String Representation |
| Methods inherited from class org.compiere.model.X_C_Period |
|---|
get_AccessLevel, getC_Period_ID, getC_Year_ID, getEndDate, getKeyNamePair, getName, getPeriodNo, getPeriodType, getStartDate, initPO, isPeriodTypeValid, isProcessing, setC_Period_ID, setC_Year_ID, setEndDate, setName, setPeriodNo, setPeriodType, setProcessing, setStartDate |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public MPeriod(Ctx ctx,
int C_Period_ID,
String trxName)
ctx - contextC_Period_ID - idtrxName - transaction
public MPeriod(Ctx ctx,
ResultSet rs,
String trxName)
ctx - contextrs - result settrxName - transaction
public MPeriod(MYear year,
int PeriodNo,
String name,
Timestamp startDate,
Timestamp endDate)
year - yearPeriodNo - noname - namestartDate - startendDate - end| Method Detail |
|---|
public static MPeriod get(Ctx ctx,
int C_Period_ID)
ctx - contextC_Period_ID - id
public static MPeriod getOfOrg(Ctx ctx,
int AD_Org_ID,
Timestamp DateAcct)
ctx - contextDateAcct - date
public static MPeriod getOfCalendar(Ctx ctx,
int C_Calendar_ID,
Timestamp DateAcct)
ctx - contextC_Calendar_ID - calendarDateAcct - date
public static int getC_Period_ID(Ctx ctx,
int AD_Org_ID,
Timestamp DateAcct)
ctx - contextDateAcct - date
@Deprecated
public static boolean isOpenOld(Ctx ctx,
Timestamp DateAcct,
String DocBaseType)
ctx - contextDateAcct - dateDocBaseType - base type
public static String isOpen(PO header,
PO[] lines,
Timestamp DateAcct,
String DocBaseType)
header - header document recordlines - document lines optional
public static MPeriod getFirstInYear(Ctx ctx,
int C_Calendar_ID,
Timestamp DateAcct)
ctx - contextC_Calendar_ID - calendarDateAcct - date
public MPeriodControl[] getPeriodControls(boolean requery)
requery - requery
public MPeriodControl getPeriodControl(String DocBaseType)
DocBaseType - Document Base Type
public boolean isInPeriod(Timestamp date)
date - date
public String isOpen(String DocBaseType,
Timestamp dateAcct)
DocBaseType - document base typedateAcct - accounting date
public boolean isStandardPeriod()
public int getC_Calendar_ID()
protected boolean beforeSave(boolean newRecord)
beforeSave in class POnewRecord - new
protected boolean afterSave(boolean newRecord,
boolean success)
afterSave in class POnewRecord - newsuccess - success
public String toString()
toString in class X_C_Period
|
Compiere 3.1 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||