|
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_Fact_Acct
org.compiere.acct.FactLine
public final class FactLine
Accounting Fact Entry.
| Field Summary |
|---|
| 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 | |
|---|---|
FactLine(Ctx ctx,
int AD_Table_ID,
int Record_ID,
int Line_ID,
String trxName)
Constructor |
|
| Method Summary | |
|---|---|
FactLine |
accrue(String description)
Create Accrual (flip CR/DR) of the line |
void |
addDescription(String description)
Set Description |
protected boolean |
beforeSave(boolean newRecord)
Before Save |
boolean |
convert()
Convert to Accounted Currency |
void |
currencyCorrect(BigDecimal deltaAmount)
Currect Accounting Amount. |
MAccount |
getAccount()
Get Account |
BigDecimal |
getAcctBalance()
Get Accounted Balance |
int |
getAD_Org_ID()
Get AD_Org_ID (balancing segment). |
int |
getC_SalesRegion_ID()
Get/derive Sales Region |
protected DocLine |
getDocLine()
Get Document Line |
BigDecimal |
getSourceBalance()
Returns Source Balance of line |
boolean |
isBalanceSheet()
Is Account on Balance Sheet |
boolean |
isDrSourceBalance()
Is Debit Source Balance |
FactLine |
reverse(String description)
Create Reversal (negate DR/CR) of the line |
void |
setAccount(MAcctSchema acctSchema,
MAccount acct)
Set Account Info |
void |
setAmtAcct(BigDecimal AmtAcctDr,
BigDecimal AmtAcctCr)
Set Accounted Amounts (alternative: call convert) |
boolean |
setAmtSource(int C_Currency_ID,
BigDecimal AmtSourceDr,
BigDecimal AmtSourceCr)
Set Source Amounts |
void |
setDocumentInfo(Doc doc,
DocLine docLine)
Set Document Info |
void |
setLocation(int C_Location_ID,
boolean isFrom)
Set Location |
void |
setLocationFromBPartner(int C_BPartner_Location_ID,
boolean isFrom)
Set Location from Busoness Partner Location |
void |
setLocationFromLocator(int M_Locator_ID,
boolean isFrom)
Set Location from Locator |
void |
setLocationFromOrg(int AD_Org_ID,
boolean isFrom)
Set Location from Organization |
void |
setM_Locator_ID(int M_Locator_ID)
Set Warehouse Locator |
String |
toString()
To String |
boolean |
updateReverseLine(int AD_Table_ID,
int Record_ID,
int Line_ID,
BigDecimal targetQty,
BigDecimal documentQty,
int C_Currency_ID)
Update Line with reversed Original Amount in Accounting Currency. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public FactLine(Ctx ctx,
int AD_Table_ID,
int Record_ID,
int Line_ID,
String trxName)
ctx - contextAD_Table_ID - - Table of Document SourceRecord_ID - - Record of documentLine_ID - - Optional line idtrxName - transaction| Method Detail |
|---|
public FactLine reverse(String description)
description - new description
public FactLine accrue(String description)
description - new description
public void setAccount(MAcctSchema acctSchema,
MAccount acct)
acctSchema - account schemaacct - account
public boolean setAmtSource(int C_Currency_ID,
BigDecimal AmtSourceDr,
BigDecimal AmtSourceCr)
C_Currency_ID - currencyAmtSourceDr - source amount drAmtSourceCr - source amount cr
public void setAmtAcct(BigDecimal AmtAcctDr,
BigDecimal AmtAcctCr)
AmtAcctDr - acct amount drAmtAcctCr - acct amount cr
public void setDocumentInfo(Doc doc,
DocLine docLine)
doc - documentdocLine - doc lineprotected DocLine getDocLine()
public void addDescription(String description)
description - descriptionpublic void setM_Locator_ID(int M_Locator_ID)
setM_Locator_ID in class X_Fact_AcctM_Locator_ID - locator
public void setLocation(int C_Location_ID,
boolean isFrom)
C_Location_ID - locationisFrom - from
public void setLocationFromLocator(int M_Locator_ID,
boolean isFrom)
M_Locator_ID - locatorisFrom - from
public void setLocationFromBPartner(int C_BPartner_Location_ID,
boolean isFrom)
C_BPartner_Location_ID - bp locationisFrom - from
public void setLocationFromOrg(int AD_Org_ID,
boolean isFrom)
AD_Org_ID - orgisFrom - frompublic BigDecimal getSourceBalance()
public boolean isDrSourceBalance()
public BigDecimal getAcctBalance()
public boolean isBalanceSheet()
public void currencyCorrect(BigDecimal deltaAmount)
Example: 1 -1 1 -1 Old 100/0 100/0 0/100 0/100 New 99/0 101/0 0/99 0/101
deltaAmount - delta amountpublic boolean convert()
public MAccount getAccount()
public String toString()
toString in class X_Fact_Acctpublic int getAD_Org_ID()
Note that Locator needs to be set before - otherwise segment balancing might produce the wrong results
getAD_Org_ID in class POpublic int getC_SalesRegion_ID()
getC_SalesRegion_ID in class X_Fact_Acctprotected boolean beforeSave(boolean newRecord)
beforeSave in class POnewRecord - new
public boolean updateReverseLine(int AD_Table_ID,
int Record_ID,
int Line_ID,
BigDecimal targetQty,
BigDecimal documentQty,
int C_Currency_ID)
AD_Table_ID - tableRecord_ID - recordLine_ID - linetargetQty - documentQty - C_Currency_ID -
|
Compiere 3.1 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||