|
Compiere 3.1 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.compiere.acct.Doc
public abstract class Doc
Posting Document Root.
| Field Summary | |
|---|---|
static int |
ACCTTYPE_BankAsset
Account Type - Bank Statement - Asset |
static int |
ACCTTYPE_BankInTransit
Account Type - Payment - Transfer |
static int |
ACCTTYPE_C_Prepayment
Account Type - Payment - Prepayment |
static int |
ACCTTYPE_C_Receivable
Account Type - Invoice - AR |
static int |
ACCTTYPE_C_Receivable_Services
Account Type - Invoice - AR Service |
static int |
ACCTTYPE_CashAsset
Account Type - Cash - Asset |
static int |
ACCTTYPE_CashDifference
Account Type - Cash - Difference |
static int |
ACCTTYPE_CashExpense
Account Type - Cash - Expense |
static int |
ACCTTYPE_CashReceipt
Account Type - Cash - Receipt |
static int |
ACCTTYPE_CashTransfer
Account Type - Cash - Transfer |
static int |
ACCTTYPE_Charge
Account Type - Invoice - Charge |
static int |
ACCTTYPE_CommitmentOffset
GL Accounts - Commitment Offset |
static int |
ACCTTYPE_DiscountExp
Account Type - Allocation - Discount Expense (AR) |
static int |
ACCTTYPE_DiscountRev
Account Type - Allocation - Discount Revenue (AP) |
static int |
ACCTTYPE_InterestExp
Account Type - Bank Statement - Interest Exp |
static int |
ACCTTYPE_InterestRev
Account Type - Bank Statement - Interest Revenue |
static int |
ACCTTYPE_InvDifferences
Inventory Accounts - Differnces |
static int |
ACCTTYPE_NotInvoicedReceipts
Inventory Accounts - NIR |
static int |
ACCTTYPE_PaymentSelect
Account Type - Payment - Selection |
static int |
ACCTTYPE_PPVOffset
GL Accounts - PPV Offset |
static int |
ACCTTYPE_ProjectAsset
Project Accounts - Assets |
static int |
ACCTTYPE_ProjectWIP
Project Accounts - WIP |
static int |
ACCTTYPE_UnallocatedCash
Account Type - Payment - Unallocated |
static int |
ACCTTYPE_V_Liability
Account Type - Invoice - AP |
static int |
ACCTTYPE_V_Liability_Services
Account Type - Invoice - AP Service |
static int |
ACCTTYPE_V_Prepayment
Account Type - Payment - Prepayment |
static int |
ACCTTYPE_WOCloseExpenseAcct
Work Order Close Expense Account |
static int |
ACCTTYPE_WOMaterial
Work Order Material Account |
static int |
ACCTTYPE_WriteOff
Account Type - Allocation - Write Off |
static int |
AMTTYPE_Charge
Amount Type - Invoice - Charge |
static int |
AMTTYPE_Gross
Amount Type - Invoice - Gross |
static int |
AMTTYPE_Net
Amount Type - Invoice - Net |
protected CLogger |
log
Log per Document |
protected static int |
NO_CURRENCY
No Currency in Document Indicator (-1) |
protected String |
p_Error
Error Message |
protected DocLine[] |
p_lines
Contained Doc Lines |
protected PO |
p_po
The Document |
protected String |
p_Status
Actual Document Status |
protected static CLogger |
s_log
Static Log |
static String |
STATUS_DocumentError
Document Status |
static String |
STATUS_Error
Document Status |
static String |
STATUS_InvalidAccount
Document Status |
static String |
STATUS_NotBalanced
Document Status |
static String |
STATUS_NotConvertible
Document Status |
static String |
STATUS_NotPosted
Document Status |
static String |
STATUS_PeriodClosed
Document Status |
static String |
STATUS_Posted
Document Status |
static String |
STATUS_PostPrepared
Document Status |
| Constructor Summary | |
|---|---|
Doc(MAcctSchema[] ass,
Class<?> clazz,
ResultSet rs,
String defaultDocumentType,
String trxName)
Constructor |
|
| Method Summary | |
|---|---|
abstract ArrayList<Fact> |
createFacts(MAcctSchema as)
Create Facts (the accounting logic) |
int |
get_ID()
Get Record_ID |
int |
get_Table_ID()
Get Table ID |
String |
get_TableName()
Get Table Name |
static Doc |
get(MAcctSchema[] ass,
int AD_Table_ID,
int Record_ID,
String trxName)
Create Posting document |
static Doc |
get(MAcctSchema[] ass,
int AD_Table_ID,
ResultSet rs,
String trxName)
Create Posting document |
MAccount |
getAccount(int AcctType,
MAcctSchema as)
Get the account for Accounting Schema |
int |
getAD_Client_ID()
Get AD_Client_ID |
int |
getAD_Org_ID()
Get AD_Org_ID |
int |
getAD_OrgTrx_ID()
Get AD_OrgTrx_ID |
BigDecimal |
getAmount()
Get Amount with index 0 |
BigDecimal |
getAmount(int AmtType)
Get the Amount (loaded in loadDocumentDetails) |
abstract BigDecimal |
getBalance()
Get Source Currency Balance - subtracts line (and tax) amounts from total - no rounding |
int |
getBP_C_SalesRegion_ID()
Get C_SalesRegion_ID |
int |
getC_Activity_ID()
Get C_Activity_ID |
int |
getC_BankAccount_ID()
Get C_BankAccount_ID |
int |
getC_BPartner_ID()
Get C_BPartner_ID |
int |
getC_BPartner_Location_ID()
Get C_BPartner_Location_ID |
int |
getC_Campaign_ID()
Get C_Campaign_ID |
int |
getC_CashBook_ID()
Get C_CashBook_ID |
int |
getC_Charge_ID()
Get header level C_Charge_ID |
int |
getC_ConversionType_ID()
Get C_ConversionType_ID |
int |
getC_Currency_ID()
Get C_Currency_ID |
int |
getC_DocType_ID()
Get C_DocType_ID |
int |
getC_LocFrom_ID()
Get C_LocFrom_ID |
int |
getC_LocTo_ID()
Get C_LocTo_ID |
int |
getC_Period_ID()
Get C_Period_ID |
int |
getC_Project_ID()
Get C_Project_ID |
int |
getC_SalesRegion_ID()
Get C_SalesRegion_ID |
protected Ctx |
getCtx()
Get Context |
Timestamp |
getDateAcct()
Get Accounting Date |
Timestamp |
getDateDoc()
Get Document Date |
String |
getDescription()
Get Description |
DocLine |
getDocLine(int Record_ID)
Get DocLine with ID |
String |
getDocumentNo()
Get Document No |
protected String |
getDocumentType()
Load Document Type and GL Info. |
int |
getGL_Budget_ID()
Get GL_Category_ID |
int |
getGL_Category_ID()
Get GL_Category_ID |
int |
getM_Product_ID()
Get M_Product_ID |
int |
getM_Warehouse_ID()
Get M_Warehouse_ID |
int |
getM_WorkOrder_ID()
Get M_WorkOrderClass_ID |
protected PO |
getPO()
Get Persistent Object |
BigDecimal |
getQty()
Get Quantity |
int |
getSalesRep_ID()
Get SalesRep_ID |
protected String |
getTrxName()
Get Trx Name and create Transaction |
int |
getUser1_ID()
Get User1_ID |
int |
getUser2_ID()
Get User2_ID |
int |
getValidCombination_ID(int AcctType,
MAcctSchema as)
Get the Valid Combination id for Accounting Schema |
int |
getValue(String ColumnName)
Get User Defined value |
boolean |
isBalanced()
Is the Source Document Balanced |
boolean |
isConvertible(MAcctSchema acctSchema)
Is Document convertible to currency and Conversion Type |
boolean |
isMultiCurrency()
Is Multi Currency |
boolean |
isPeriodOpen()
Is Period Open |
boolean |
isPosted()
Is Document Posted |
boolean |
isReturnTrx()
Is Return Trx |
boolean |
isSOTrx()
Is Sales Trx |
boolean |
isTaxIncluded()
Is Tax Included |
abstract String |
loadDocumentDetails()
Load Document Details |
String |
post(boolean force,
boolean repost)
Post Document. |
static String |
postImmediate(MAcctSchema[] ass,
int AD_Table_ID,
int Record_ID,
boolean force,
String trxName)
Post Document |
protected void |
setAmount(int AmtType,
BigDecimal amt)
Set the Amount |
protected void |
setBP_C_SalesRegion_ID(int C_SalesRegion_ID)
Set C_SalesRegion_ID |
protected void |
setC_BankAccount_ID(int C_BankAccount_ID)
Set C_BankAccount_ID |
protected void |
setC_BPartner_ID(int C_BPartner_ID)
Set C_BPartner_ID |
protected void |
setC_CashBook_ID(int C_CashBook_ID)
Set C_CashBook_ID |
void |
setC_Currency_ID(int C_Currency_ID)
Set C_Currency_ID |
protected void |
setC_LocFrom_ID(int C_LocFrom_ID)
Set C_LocFrom_ID |
protected void |
setC_LocTo_ID(int C_LocTo_ID)
Set C_LocTo_ID |
protected void |
setDateAcct(Timestamp da)
Set Date Acct |
protected void |
setDateDoc(Timestamp dd)
Set Date Doc |
protected void |
setDocumentType(String DocumentType)
Load Document Type and GL Info. |
protected void |
setIsMultiCurrency(boolean mc)
Set Multi Currency |
protected void |
setIsTaxIncluded(boolean ti)
Set Tax Includedy |
void |
setPeriod()
Calculate Period from DateAcct. |
protected void |
setQty(BigDecimal qty)
Set Quantity |
String |
toString()
String Representation |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final String STATUS_NotPosted
public static final String STATUS_NotBalanced
public static final String STATUS_NotConvertible
public static final String STATUS_PeriodClosed
public static final String STATUS_InvalidAccount
public static final String STATUS_PostPrepared
public static final String STATUS_Posted
public static final String STATUS_Error
public static final String STATUS_DocumentError
protected static CLogger s_log
protected CLogger log
protected PO p_po
protected DocLine[] p_lines
protected static final int NO_CURRENCY
protected String p_Status
protected String p_Error
public static final int AMTTYPE_Gross
public static final int AMTTYPE_Net
public static final int AMTTYPE_Charge
public static final int ACCTTYPE_Charge
public static final int ACCTTYPE_C_Receivable
public static final int ACCTTYPE_V_Liability
public static final int ACCTTYPE_V_Liability_Services
public static final int ACCTTYPE_C_Receivable_Services
public static final int ACCTTYPE_UnallocatedCash
public static final int ACCTTYPE_BankInTransit
public static final int ACCTTYPE_PaymentSelect
public static final int ACCTTYPE_C_Prepayment
public static final int ACCTTYPE_V_Prepayment
public static final int ACCTTYPE_CashAsset
public static final int ACCTTYPE_CashTransfer
public static final int ACCTTYPE_CashExpense
public static final int ACCTTYPE_CashReceipt
public static final int ACCTTYPE_CashDifference
public static final int ACCTTYPE_DiscountExp
public static final int ACCTTYPE_DiscountRev
public static final int ACCTTYPE_WriteOff
public static final int ACCTTYPE_BankAsset
public static final int ACCTTYPE_InterestRev
public static final int ACCTTYPE_InterestExp
public static final int ACCTTYPE_InvDifferences
public static final int ACCTTYPE_NotInvoicedReceipts
public static final int ACCTTYPE_ProjectAsset
public static final int ACCTTYPE_ProjectWIP
public static final int ACCTTYPE_PPVOffset
public static final int ACCTTYPE_CommitmentOffset
public static final int ACCTTYPE_WOCloseExpenseAcct
public static final int ACCTTYPE_WOMaterial
| Constructor Detail |
|---|
public Doc(MAcctSchema[] ass,
Class<?> clazz,
ResultSet rs,
String defaultDocumentType,
String trxName)
ass - accounting schemataclazz - Document Classrs - result setdefaultDocumentType - default document type or nulltrxName - trx| Method Detail |
|---|
public static Doc get(MAcctSchema[] ass,
int AD_Table_ID,
int Record_ID,
String trxName)
ass - accounting schemaAD_Table_ID - Table ID of DocumentsRecord_ID - record ID to loadtrxName - transaction name
public static Doc get(MAcctSchema[] ass,
int AD_Table_ID,
ResultSet rs,
String trxName)
ass - accounting schemaAD_Table_ID - Table ID of Documentsrs - ResultSettrxName - transaction name
public static String postImmediate(MAcctSchema[] ass,
int AD_Table_ID,
int Record_ID,
boolean force,
String trxName)
ass - accounting schemataAD_Table_ID - Transaction tableRecord_ID - Record ID of this documentforce - force postingtrxName - transaction
protected Ctx getCtx()
public String get_TableName()
public int get_Table_ID()
public int get_ID()
protected PO getPO()
public final String post(boolean force,
boolean repost)
- try to lock document (Processed='Y' (AND Processing='N' AND Posted='N'))
- if not ok - return false
- postlogic (for all Accounting Schema)
- create Fact lines
- postCommit
- commits Fact lines and Document & sets Processing = 'N'
- if error - create Note
force - if true ignore that lockedrepost - if true ignore that already posted
protected String getTrxName()
protected String getDocumentType()
protected void setDocumentType(String DocumentType)
DocumentType - public boolean isBalanced()
public boolean isConvertible(MAcctSchema acctSchema)
acctSchema - accounting schema
public void setPeriod()
public int getC_Period_ID()
public boolean isPeriodOpen()
public BigDecimal getAmount(int AmtType)
AmtType - see AMTTYPE_*
protected void setAmount(int AmtType,
BigDecimal amt)
AmtType - see AMTTYPE_*amt - Amountpublic BigDecimal getAmount()
protected void setQty(BigDecimal qty)
qty - Quantitypublic BigDecimal getQty()
public int getValidCombination_ID(int AcctType,
MAcctSchema as)
AcctType - see ACCTTYPE_*as - accounting schema
public final MAccount getAccount(int AcctType,
MAcctSchema as)
AcctType - see ACCTTYPE_*as - accounting schema
public DocLine getDocLine(int Record_ID)
Record_ID - Record ID
public String toString()
toString in class Objectpublic int getAD_Client_ID()
public int getAD_Org_ID()
public String getDocumentNo()
public String getDescription()
public int getC_Currency_ID()
public void setC_Currency_ID(int C_Currency_ID)
C_Currency_ID - idpublic boolean isMultiCurrency()
protected void setIsMultiCurrency(boolean mc)
mc - multi currencypublic boolean isTaxIncluded()
protected void setIsTaxIncluded(boolean ti)
ti - Tax Includedpublic int getC_ConversionType_ID()
public int getGL_Category_ID()
public int getGL_Budget_ID()
public Timestamp getDateAcct()
protected void setDateAcct(Timestamp da)
da - accounting datepublic Timestamp getDateDoc()
protected void setDateDoc(Timestamp dd)
dd - document datepublic boolean isPosted()
public boolean isSOTrx()
public boolean isReturnTrx()
public int getC_DocType_ID()
public int getC_Charge_ID()
public int getSalesRep_ID()
public int getC_BankAccount_ID()
protected void setC_BankAccount_ID(int C_BankAccount_ID)
C_BankAccount_ID - bank acctpublic int getC_CashBook_ID()
public int getM_WorkOrder_ID()
protected void setC_CashBook_ID(int C_CashBook_ID)
C_CashBook_ID - cash bookpublic int getM_Warehouse_ID()
public int getC_BPartner_ID()
protected void setC_BPartner_ID(int C_BPartner_ID)
C_BPartner_ID - bppublic int getC_BPartner_Location_ID()
public int getC_Project_ID()
public int getC_SalesRegion_ID()
public int getBP_C_SalesRegion_ID()
protected void setBP_C_SalesRegion_ID(int C_SalesRegion_ID)
C_SalesRegion_ID - idpublic int getC_Activity_ID()
public int getC_Campaign_ID()
public int getM_Product_ID()
public int getAD_OrgTrx_ID()
public int getC_LocFrom_ID()
protected void setC_LocFrom_ID(int C_LocFrom_ID)
C_LocFrom_ID - loc frompublic int getC_LocTo_ID()
protected void setC_LocTo_ID(int C_LocTo_ID)
C_LocTo_ID - loc topublic int getUser1_ID()
public int getUser2_ID()
public int getValue(String ColumnName)
ColumnName - column
public abstract String loadDocumentDetails()
loadDocumentDetails in interface AccountingInterfacepublic abstract BigDecimal getBalance()
getBalance in interface AccountingInterfacepublic abstract ArrayList<Fact> createFacts(MAcctSchema as)
as - accounting schema
|
Compiere 3.1 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||