Package org.compiere.acct
Class Doc
java.lang.Object
org.compiere.acct.Doc
- Direct Known Subclasses:
Doc_AllocationHdr,Doc_AssetAddition,Doc_AssetDisposed,Doc_AssetReval,Doc_AssetTransfer,Doc_BankStatement,Doc_Cash,Doc_DepreciationEntry,Doc_GLJournal,Doc_InOut,Doc_Inventory,Doc_Invoice,Doc_MatchInv,Doc_MatchPO,Doc_Movement,Doc_Order,Doc_Payment,Doc_Production,Doc_ProjectIssue,Doc_Requisition
Abstract base class for posting of accounting document.
Table Base Document Types (C_DocType.DocBaseType and AD_Reference_ID=183)
Class AD_Table_ID
------------------ ------------------------------
C_Invoice: ARI, ARC, ARF, API, APC
Doc_Invoice 318 - has C_DocType_ID
C_Payment: ARP, APP
Doc_Payment 335 - has C_DocType_ID
C_Order: SOO, POO, POR (Requisition)
Doc_Order 259 - has C_DocType_ID
M_InOut: MMS, MMR
Doc_InOut 319 - DocType derived
M_Inventory: MMI
Doc_Inventory 321 - DocType fixed
M_Movement: MMM
Doc_Movement 323 - DocType fixed
M_Production: MMP
Doc_Production 325 - DocType fixed
M_Production: MMO
Doc_CostCollector 330 - DocType fixed
C_BankStatement: CMB
Doc_Bank 392 - DocType fixed
C_Cash: CMC
Doc_Cash 407 - DocType fixed
C_Allocation: CMA
Doc_Allocation 390 - DocType fixed
GL_Journal: GLJ
Doc_GLJournal 224 = has C_DocType_ID
Matching Invoice MXI
M_MatchInv 472 - DocType fixed
Matching PO MXP
M_MatchPO 473 - DocType fixed
Project Issue PJI
C_ProjectIssue 623 - DocType fixed
- Version:
- $Id: Doc.java,v 1.6 2006/07/30 00:53:33 jjanke Exp $
- Author:
- Jorg Janke, victor.perez@e-evolution.com, e-Evolution http://www.e-evolution.com
- FR [ 2520591 ] Support multiples calendar for Org
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intAccount Type - Bank Statement - Assetstatic final intAccount Type - Payment - Transferstatic final intAccount Type - Payment - Prepaymentstatic final intAccount Type - Invoice - ARstatic final intAccount Type - Invoice - AR Servicestatic final intAccount Type - Cash - Assetstatic final intAccount Type - Cash - Differencestatic final intAccount Type - Cash - Expensestatic final intAccount Type - Cash - Receiptstatic final intAccount Type - Cash - Transferstatic final intAccount Type - Invoice - Chargestatic final intGL Accounts - Commitment Offsetstatic final intGL Accounts - Commitment Offset Salesstatic final intAccount Type - Allocation - Discount Expense (AR)static final intAccount Type - Allocation - Discount Revenue (AP)static final intAccount Type - Bank Statement - Interest Expstatic final intAccount Type - Bank Statement - Interest Revenuestatic final intInventory Accounts - Differencesstatic final intInventory Accounts - NIRstatic final intAccount Type - Payment - Selectionstatic final intGL Accounts - PPV Offsetstatic final intProject Accounts - Assetsstatic final intProject Accounts - WIPstatic final intAccount Type - Payment - Unallocatedstatic final intAccount Type - Invoice - APstatic final intAccount Type - Invoice - AP Servicestatic final intAccount Type - Payment - Prepaymentstatic final intAccount Type - Allocation - Write Offstatic final intAmount Type - Invoice - Chargestatic final intAmount Type - Invoice - Grossstatic final intAmount Type - Invoice - Netstatic final StringDocument Types -------------- C_DocType.DocBaseType and AD_Reference_ID=183 C_Invoice: ARI, ARC, ARF, API, APC C_Payment: ARP, APP C_Order: SOO, POO M_Transaction: MMI, MMM, MMS, MMR C_BankStatement: CMB C_Cash: CMC C_Allocation: CMA GL_Journal: GLJ C_ProjectIssue PJI M_Requisition PORstatic final StringCashManagement Allocationsstatic final StringAP Credit Memostatic final StringAP Invoicesstatic final StringAP Paymentstatic final StringAR Credit Memostatic final StringAR Invoices - ARIstatic final StringAR ProFormastatic final StringAR Receiptstatic final StringCashManagement Bank Statementstatic final StringCashManagement Cash Journalsstatic final StringGL Journalstatic final StringMaterial Inventorystatic final StringMatch Invoicestatic final StringMatch POstatic final StringMaterial Movementstatic final StringMaterial Productionstatic final StringMaterial Receiptstatic final StringMaterial Shipmentstatic final StringPurchase Orderstatic final StringProject Issuestatic final StringPurchase Requisitionstatic final StringSales Orderprotected CLoggerLog per Documentprotected static final intNo Currency in Document Indicator (-1)protected StringError Messageprotected DocLine[]Contained Doc Linesprotected POThe Documentprotected StringActual Document Statusprotected static final CLoggerStatic Logstatic final StringDocument Statusstatic final StringDocument Statusstatic final StringDocument Statusstatic final StringDocument Statusstatic final StringDocument Statusstatic final StringDocument Statusstatic final StringDocument Statusstatic final StringDocument Statusstatic final StringDocument Status -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionCreate Facts (the accounting logic)protected intDelete fact recordsstatic Docget(MAcctSchema as, int AD_Table_ID, int Record_ID, String trxName) Create Posting documentstatic Docget(MAcctSchema as, int AD_Table_ID, ResultSet rs, String trxName) Create Posting documentintget_ID()Get Record_IDintGet Table IDGet Table Nameget_ValueAsString(String ColumnName) Get value by column nameintGet header level A_Asset_IDfinal MAccountgetAccount(int AcctType, MAcctSchema as) Get account record by accounting schema and account typeprotected MAcctSchemaGet accounting schemaintGet AD_Client_IDintGet AD_Org_IDintGet AD_OrgTrx_IDGet Amount with index 0getAmount(int AmtType) Get the Amount (loaded in loadDocumentDetails)abstract BigDecimalGet Source Currency Balance - subtracts line (and tax) amounts from total - no roundingintGet C_SalesRegion_IDintGet C_Activity_IDintGet C_BankAccount_IDintGet C_BPartner_IDintGet C_BPartner_Location_IDintGet C_Campaign_IDintGet C_CashBook_IDintGet header level C_Charge_IDintGet C_ConversionType_IDintGet C_CostCenter_IDintGet C_Currency_IDintGet C_Department_IDintGet C_DocType_IDintGet BPartner EmployeeintGet C_LocFrom_IDintGet C_LocTo_IDintGet C_Period_IDintGet C_Project_IDintGet C_ProjectPhase_IDintGet C_ProjectTask_IDintGet C_SalesRegion_IDgetCtx()Get ContextGet Accounting DateGet Document DateGet DescriptiongetDocLine(int Record_ID) Get DocLine with IDGet Document NoLoad Document Type and GL Info.getFacts()Get Facts (the accounting logic)intGet getGL_Budget_IDintGet GL_Category_IDintASIintGet M_Product_IDintGet M_Warehouse_IDintGet M_WarehouseTo_IDgetPO()Get Persistent ObjectgetQty()Get QuantityintGet SalesRep_IDGet Trx NameintGet User1_IDintGet User2_IDintgetValidCombination_ID(int AcctType, MAcctSchema as) Get valid combination id by account type and accounting schemaintGet value by column namebooleanChecks if the document type is configured to always be posted.booleanIs the Source Document BalancedbooleanisConvertible(MAcctSchema acctSchema) Is Document convertible to currency and Conversion TypebooleanIs posting of document should be deferred to next run of accounting postingbooleanIs in a back-date posting process?booleanIs Multi CurrencybooleanIs Period OpenbooleanisPosted()Is Document PostedbooleanDocument is Post if the document type is always posted or if the accounting date is within the schema's valid range.booleanisSOTrx()Is Sales TrxbooleanIs Tax Includedprotected abstract StringLoad Document Detailsstatic StringmanualPosting(int WindowNo, int AD_Client_ID, int AD_Table_ID, int Record_ID, boolean force) Manual posting by userfinal Stringpost(boolean force, boolean repost) Post Document.final Stringpost(boolean force, boolean repost, boolean isInBackDatePostingProcess) Post Documentstatic StringpostImmediate(MAcctSchema[] ass, int AD_Table_ID, int Record_ID, boolean force, String trxName) Post document immediatelyvoidsetA_Asset_ID(int m_A_Asset_ID) Set A_Asset_IDvoidsetAmount(int AmtType, BigDecimal amt) Set the AmountvoidsetBP_C_SalesRegion_ID(int C_SalesRegion_ID) Set C_SalesRegion_IDvoidsetC_BankAccount_ID(int C_BankAccount_ID) Set C_BankAccount_IDvoidsetC_BPartner_ID(int C_BPartner_ID) Set C_BPartner_IDvoidsetC_CashBook_ID(int C_CashBook_ID) Set C_CashBook_IDvoidsetC_CostCenter_ID(int m_C_CostCenter_ID) Set C_CostCenter_IDvoidsetC_Currency_ID(int C_Currency_ID) Set C_Currency_IDvoidsetC_Department_ID(int m_C_Department_ID) Set C_Department_IDvoidsetC_Employee_ID(int C_Employee_ID) Set C_Employee_IDvoidsetC_LocFrom_ID(int C_LocFrom_ID) Set C_LocFrom_IDvoidsetC_LocTo_ID(int C_LocTo_ID) Set C_LocTo_IDvoidsetDateAcct(Timestamp da) Set Date AcctvoidsetDateDoc(Timestamp dd) Set Date DocvoidsetDocumentType(String DocumentType) Load Document Type and GL Info.voidsetIsMultiCurrency(boolean mc) Set Multi CurrencyvoidsetIsTaxIncluded(boolean ti) Set Tax IncludedvoidCalculate Period from DateAcct.voidsetQty(BigDecimal qty) Set QuantitytoString()String Representation
-
Field Details
-
DOC_TYPE_BY_DOC_BASE_TYPE_SQL
Document Types -------------- C_DocType.DocBaseType and AD_Reference_ID=183 C_Invoice: ARI, ARC, ARF, API, APC C_Payment: ARP, APP C_Order: SOO, POO M_Transaction: MMI, MMM, MMS, MMR C_BankStatement: CMB C_Cash: CMC C_Allocation: CMA GL_Journal: GLJ C_ProjectIssue PJI M_Requisition POR- See Also:
-
DOCTYPE_ARInvoice
AR Invoices - ARI- See Also:
-
DOCTYPE_ARCredit
AR Credit Memo- See Also:
-
DOCTYPE_ARReceipt
AR Receipt- See Also:
-
DOCTYPE_ARProForma
AR ProForma- See Also:
-
DOCTYPE_APInvoice
AP Invoices- See Also:
-
DOCTYPE_APCredit
AP Credit Memo- See Also:
-
DOCTYPE_APPayment
AP Payment- See Also:
-
DOCTYPE_BankStatement
CashManagement Bank Statement- See Also:
-
DOCTYPE_CashJournal
CashManagement Cash Journals- See Also:
-
DOCTYPE_Allocation
CashManagement Allocations- See Also:
-
DOCTYPE_MatShipment
Material Shipment- See Also:
-
DOCTYPE_MatReceipt
Material Receipt- See Also:
-
DOCTYPE_MatInventory
Material Inventory- See Also:
-
DOCTYPE_MatMovement
Material Movement- See Also:
-
DOCTYPE_MatProduction
Material Production- See Also:
-
DOCTYPE_MatMatchInv
Match Invoice- See Also:
-
DOCTYPE_MatMatchPO
Match PO- See Also:
-
DOCTYPE_GLJournal
GL Journal- See Also:
-
DOCTYPE_POrder
Purchase Order- See Also:
-
DOCTYPE_SOrder
Sales Order- See Also:
-
DOCTYPE_ProjectIssue
Project Issue- See Also:
-
DOCTYPE_PurchaseRequisition
Purchase Requisition- See Also:
-
STATUS_NotPosted
Document Status- See Also:
-
STATUS_NotBalanced
Document Status- See Also:
-
STATUS_NotConvertible
Document Status- See Also:
-
STATUS_PeriodClosed
Document Status- See Also:
-
STATUS_InvalidAccount
Document Status- See Also:
-
STATUS_PostPrepared
Document Status- See Also:
-
STATUS_Posted
Document Status- See Also:
-
STATUS_Error
Document Status- See Also:
-
STATUS_Deferred
Document Status- See Also:
-
s_log
Static Log -
log
Log per Document -
p_po
The Document -
p_lines
Contained Doc Lines -
NO_CURRENCY
protected static final int NO_CURRENCYNo Currency in Document Indicator (-1)- See Also:
-
p_Status
Actual Document Status -
p_Error
Error Message -
AMTTYPE_Gross
public static final int AMTTYPE_GrossAmount Type - Invoice - Gross- See Also:
-
AMTTYPE_Net
public static final int AMTTYPE_NetAmount Type - Invoice - Net- See Also:
-
AMTTYPE_Charge
public static final int AMTTYPE_ChargeAmount Type - Invoice - Charge- See Also:
-
ACCTTYPE_Charge
public static final int ACCTTYPE_ChargeAccount Type - Invoice - Charge- See Also:
-
ACCTTYPE_C_Receivable
public static final int ACCTTYPE_C_ReceivableAccount Type - Invoice - AR- See Also:
-
ACCTTYPE_V_Liability
public static final int ACCTTYPE_V_LiabilityAccount Type - Invoice - AP- See Also:
-
ACCTTYPE_V_Liability_Services
public static final int ACCTTYPE_V_Liability_ServicesAccount Type - Invoice - AP Service- See Also:
-
ACCTTYPE_C_Receivable_Services
public static final int ACCTTYPE_C_Receivable_ServicesAccount Type - Invoice - AR Service- See Also:
-
ACCTTYPE_UnallocatedCash
public static final int ACCTTYPE_UnallocatedCashAccount Type - Payment - Unallocated- See Also:
-
ACCTTYPE_BankInTransit
public static final int ACCTTYPE_BankInTransitAccount Type - Payment - Transfer- See Also:
-
ACCTTYPE_PaymentSelect
public static final int ACCTTYPE_PaymentSelectAccount Type - Payment - Selection- See Also:
-
ACCTTYPE_C_Prepayment
public static final int ACCTTYPE_C_PrepaymentAccount Type - Payment - Prepayment- See Also:
-
ACCTTYPE_V_Prepayment
public static final int ACCTTYPE_V_PrepaymentAccount Type - Payment - Prepayment- See Also:
-
ACCTTYPE_CashAsset
public static final int ACCTTYPE_CashAssetAccount Type - Cash - Asset- See Also:
-
ACCTTYPE_CashTransfer
public static final int ACCTTYPE_CashTransferAccount Type - Cash - Transfer- See Also:
-
ACCTTYPE_CashExpense
public static final int ACCTTYPE_CashExpenseAccount Type - Cash - Expense- See Also:
-
ACCTTYPE_CashReceipt
public static final int ACCTTYPE_CashReceiptAccount Type - Cash - Receipt- See Also:
-
ACCTTYPE_CashDifference
public static final int ACCTTYPE_CashDifferenceAccount Type - Cash - Difference- See Also:
-
ACCTTYPE_DiscountExp
public static final int ACCTTYPE_DiscountExpAccount Type - Allocation - Discount Expense (AR)- See Also:
-
ACCTTYPE_DiscountRev
public static final int ACCTTYPE_DiscountRevAccount Type - Allocation - Discount Revenue (AP)- See Also:
-
ACCTTYPE_WriteOff
public static final int ACCTTYPE_WriteOffAccount Type - Allocation - Write Off- See Also:
-
ACCTTYPE_BankAsset
public static final int ACCTTYPE_BankAssetAccount Type - Bank Statement - Asset- See Also:
-
ACCTTYPE_InterestRev
public static final int ACCTTYPE_InterestRevAccount Type - Bank Statement - Interest Revenue- See Also:
-
ACCTTYPE_InterestExp
public static final int ACCTTYPE_InterestExpAccount Type - Bank Statement - Interest Exp- See Also:
-
ACCTTYPE_InvDifferences
public static final int ACCTTYPE_InvDifferencesInventory Accounts - Differences- See Also:
-
ACCTTYPE_NotInvoicedReceipts
public static final int ACCTTYPE_NotInvoicedReceiptsInventory Accounts - NIR- See Also:
-
ACCTTYPE_ProjectAsset
public static final int ACCTTYPE_ProjectAssetProject Accounts - Assets- See Also:
-
ACCTTYPE_ProjectWIP
public static final int ACCTTYPE_ProjectWIPProject Accounts - WIP- See Also:
-
ACCTTYPE_PPVOffset
public static final int ACCTTYPE_PPVOffsetGL Accounts - PPV Offset- See Also:
-
ACCTTYPE_CommitmentOffset
public static final int ACCTTYPE_CommitmentOffsetGL Accounts - Commitment Offset- See Also:
-
ACCTTYPE_CommitmentOffsetSales
public static final int ACCTTYPE_CommitmentOffsetSalesGL Accounts - Commitment Offset Sales- See Also:
-
-
Constructor Details
-
Doc
public Doc(MAcctSchema as, Class<?> clazz, ResultSet rs, String defaultDocumentType, String trxName) Constructor- Parameters:
as- accounting schemaclazz- Document Classrs- result setdefaultDocumentType- default document type or nulltrxName- trx
-
-
Method Details
-
get
Create Posting document- Parameters:
as- accounting schemaAD_Table_ID- Table ID of DocumentsRecord_ID- record ID to loadtrxName- transaction name- Returns:
- new Posting Document instance or null
-
get
Create Posting document- Parameters:
as- accounting schemaAD_Table_ID- Table ID of Documentsrs- ResultSettrxName- transaction name- Returns:
- new Posting Document instance or null
- Throws:
AdempiereUserError
-
postImmediate
public static String postImmediate(MAcctSchema[] ass, int AD_Table_ID, int Record_ID, boolean force, String trxName) Post document immediately- Parameters:
ass- accounting schemaAD_Table_ID- Transaction tableRecord_ID- Record ID of this documentforce- force postingtrxName- transaction- Returns:
- null if the document was posted or error message
-
manualPosting
public static String manualPosting(int WindowNo, int AD_Client_ID, int AD_Table_ID, int Record_ID, boolean force) Manual posting by user- Parameters:
WindowNo-AD_Client_ID-AD_Table_ID-Record_ID-force-- Returns:
- error message ( if any )
-
getPostStatus
-
isPostForAcctSchema
public boolean isPostForAcctSchema()Document is Post if the document type is always posted or if the accounting date is within the schema's valid range.- Returns:
trueif the document type is always posted or if the accounting date is within the valid range of the accounting schema;falseotherwise.
-
isAlwaysPosted
public boolean isAlwaysPosted()Checks if the document type is configured to always be posted.- Returns:
trueif the document type has the "always posted" flag enabled;falseotherwise.
-
getCtx
Get Context- Returns:
- context
-
get_TableName
Get Table Name- Returns:
- table name
-
get_Table_ID
public int get_Table_ID()Get Table ID- Returns:
- table id
-
get_ID
public int get_ID()Get Record_ID- Returns:
- record id
-
getPO
Get Persistent Object- Returns:
- po
-
post
Post Document.- 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 and sets Processing = 'N' - if error - create Note- Parameters:
force- if true ignore that lockedrepost- if true ignore that already posted- Returns:
- error message or null
-
post
Post Document- Parameters:
force- if true ignore that lockedrepost- if true ignore that already postedisInBackDatePostingProcess- if true is in a back-date posting process- Returns:
- error message or null
-
deleteAcct
protected int deleteAcct()Delete fact records- Returns:
- number of records deleted
-
getTrxName
Get Trx Name- Returns:
- Trx Name
-
getDocumentType
Load Document Type and GL Info. Set p_DocumentType and p_GL_Category_ID- Returns:
- document type (i.e. C_DocType.DocBaseType)
-
setDocumentType
Load Document Type and GL Info. Set p_DocumentType and p_GL_Category_ID- Parameters:
DocumentType-
-
isBalanced
public boolean isBalanced()Is the Source Document Balanced- Returns:
- true if (source) balanced
-
isConvertible
Is Document convertible to currency and Conversion Type- Parameters:
acctSchema- accounting schema- Returns:
- true, if convertible to accounting currency
-
setPeriod
public void setPeriod()Calculate Period from DateAcct. m_C_Period_ID is set to -1 if not open, to 0 if not found -
getC_Period_ID
public int getC_Period_ID()Get C_Period_ID- Returns:
- C_Period_ID
-
isPeriodOpen
public boolean isPeriodOpen()Is Period Open- Returns:
- true if period is open
-
getAmount
Get the Amount (loaded in loadDocumentDetails)- Parameters:
AmtType- see AMTTYPE_*- Returns:
- Amount
-
setAmount
Set the Amount- Parameters:
AmtType- see AMTTYPE_*amt- Amount
-
getAmount
Get Amount with index 0- Returns:
- Amount (primary document amount)
-
setQty
Set Quantity- Parameters:
qty- Quantity
-
getQty
Get Quantity- Returns:
- Quantity
-
getValidCombination_ID
Get valid combination id by account type and accounting schema- Parameters:
AcctType- see ACCTTYPE_*as- accounting schema- Returns:
- C_ValidCombination_ID
-
getAccount
Get account record by accounting schema and account type- Parameters:
AcctType- see ACCTTYPE_*as- accounting schema- Returns:
- MAccount
-
getDocLine
Get DocLine with ID- Parameters:
Record_ID- Record ID- Returns:
- DocLine
-
toString
String Representation -
getAD_Client_ID
public int getAD_Client_ID()Get AD_Client_ID- Returns:
- AD_Client_ID
-
getAD_Org_ID
public int getAD_Org_ID()Get AD_Org_ID- Returns:
- AD_Org_ID
-
getDocumentNo
Get Document No- Returns:
- document No
-
getDescription
Get Description- Returns:
- Description
-
getC_Currency_ID
public int getC_Currency_ID()Get C_Currency_ID- Returns:
- C_Currency_ID
-
setC_Currency_ID
public void setC_Currency_ID(int C_Currency_ID) Set C_Currency_ID- Parameters:
C_Currency_ID- id
-
isMultiCurrency
public boolean isMultiCurrency()Is Multi Currency- Returns:
- mc
-
setIsMultiCurrency
public void setIsMultiCurrency(boolean mc) Set Multi Currency- Parameters:
mc- multi currency
-
isTaxIncluded
public boolean isTaxIncluded()Is Tax Included- Returns:
- tax incl
-
setIsTaxIncluded
public void setIsTaxIncluded(boolean ti) Set Tax Included- Parameters:
ti- Tax Included
-
getC_ConversionType_ID
public int getC_ConversionType_ID()Get C_ConversionType_ID- Returns:
- C_ConversionType_ID
-
getCurrencyRate
- Returns:
- currency rate or null
-
getGL_Category_ID
public int getGL_Category_ID()Get GL_Category_ID- Returns:
- GL_Category_ID
-
getGL_Budget_ID
public int getGL_Budget_ID()Get getGL_Budget_ID- Returns:
- GL_Budget_ID or 0
-
getDateAcct
Get Accounting Date- Returns:
- DateAcct or null
-
setDateAcct
Set Date Acct- Parameters:
da- accounting date
-
getDateDoc
Get Document Date- Returns:
- document date
-
setDateDoc
Set Date Doc- Parameters:
dd- document date
-
isPosted
public boolean isPosted()Is Document Posted- Returns:
- true if posted
-
isSOTrx
public boolean isSOTrx()Is Sales Trx- Returns:
- true if it is sales trx
-
getC_DocType_ID
public int getC_DocType_ID()Get C_DocType_ID- Returns:
- C_DocType_ID or 0
-
getC_Charge_ID
public int getC_Charge_ID()Get header level C_Charge_ID- Returns:
- C_Charge_ID or 0
-
getA_Asset_ID
public int getA_Asset_ID()Get header level A_Asset_ID- Returns:
- A_Asset_ID or 0
-
setA_Asset_ID
public void setA_Asset_ID(int m_A_Asset_ID) Set A_Asset_ID- Parameters:
m_A_Asset_ID- Asset
-
getSalesRep_ID
public int getSalesRep_ID()Get SalesRep_ID- Returns:
- SalesRep_ID or 0
-
getC_BankAccount_ID
public int getC_BankAccount_ID()Get C_BankAccount_ID- Returns:
- C_BankAccount_ID or 0
-
setC_BankAccount_ID
public void setC_BankAccount_ID(int C_BankAccount_ID) Set C_BankAccount_ID- Parameters:
C_BankAccount_ID- bank acct
-
getC_CashBook_ID
public int getC_CashBook_ID()Get C_CashBook_ID- Returns:
- C_CashBook_ID or 0
-
setC_CashBook_ID
public void setC_CashBook_ID(int C_CashBook_ID) Set C_CashBook_ID- Parameters:
C_CashBook_ID- cash book
-
getM_Warehouse_ID
public int getM_Warehouse_ID()Get M_Warehouse_ID- Returns:
- M_Warehouse_ID or 0
-
getM_WarehouseTo_ID
public int getM_WarehouseTo_ID()Get M_WarehouseTo_ID- Returns:
- M_WarehouseTo_ID or 0
-
getC_CostCenter_ID
public int getC_CostCenter_ID()Get C_CostCenter_ID- Returns:
- C_CostCenter_ID or 0
-
setC_CostCenter_ID
public void setC_CostCenter_ID(int m_C_CostCenter_ID) Set C_CostCenter_ID- Parameters:
m_C_CostCenter_ID- Cost Center
-
getC_Department_ID
public int getC_Department_ID()Get C_Department_ID- Returns:
- C_Department_ID or 0
-
getM_AttributeSetInstance_ID
public int getM_AttributeSetInstance_ID()ASI- Returns:
- M_AttributeSetInstance_ID
-
setC_Department_ID
public void setC_Department_ID(int m_C_Department_ID) Set C_Department_ID- Parameters:
m_C_Department_ID- Department
-
getC_BPartner_ID
public int getC_BPartner_ID()Get C_BPartner_ID- Returns:
- C_BPartner_ID or 0
-
setC_BPartner_ID
public void setC_BPartner_ID(int C_BPartner_ID) Set C_BPartner_ID- Parameters:
C_BPartner_ID- bp
-
getC_Employee_ID
public int getC_Employee_ID()Get BPartner Employee- Returns:
- C_Employee_ID
-
setC_Employee_ID
public void setC_Employee_ID(int C_Employee_ID) Set C_Employee_ID- Parameters:
C_Employee_ID- bp
-
getC_BPartner_Location_ID
public int getC_BPartner_Location_ID()Get C_BPartner_Location_ID- Returns:
- C_BPartner_Location_ID or 0
-
getC_Project_ID
public int getC_Project_ID()Get C_Project_ID- Returns:
- C_Project_ID or 0
-
getC_ProjectPhase_ID
public int getC_ProjectPhase_ID()Get C_ProjectPhase_ID- Returns:
- C_ProjectPhase_ID or 0
-
getC_ProjectTask_ID
public int getC_ProjectTask_ID()Get C_ProjectTask_ID- Returns:
- C_ProjectTask_ID or 0
-
getC_SalesRegion_ID
public int getC_SalesRegion_ID()Get C_SalesRegion_ID- Returns:
- C_SalesRegion_ID or 0
-
getBP_C_SalesRegion_ID
public int getBP_C_SalesRegion_ID()Get C_SalesRegion_ID- Returns:
- C_SalesRegion_ID or 0
-
setBP_C_SalesRegion_ID
public void setBP_C_SalesRegion_ID(int C_SalesRegion_ID) Set C_SalesRegion_ID- Parameters:
C_SalesRegion_ID- id
-
getC_Activity_ID
public int getC_Activity_ID()Get C_Activity_ID- Returns:
- C_Activity_ID or 0
-
getC_Campaign_ID
public int getC_Campaign_ID()Get C_Campaign_ID- Returns:
- C_Campaign_ID or 0
-
getM_Product_ID
public int getM_Product_ID()Get M_Product_ID- Returns:
- M_Product_ID or 0
-
getAD_OrgTrx_ID
public int getAD_OrgTrx_ID()Get AD_OrgTrx_ID- Returns:
- AD_OrgTrx_ID or 0
-
getC_LocFrom_ID
public int getC_LocFrom_ID()Get C_LocFrom_ID- Returns:
- from C_Location_ID or 0
-
setC_LocFrom_ID
public void setC_LocFrom_ID(int C_LocFrom_ID) Set C_LocFrom_ID- Parameters:
C_LocFrom_ID- loc from
-
getC_LocTo_ID
public int getC_LocTo_ID()Get C_LocTo_ID- Returns:
- to C_Location_ID or 0
-
setC_LocTo_ID
public void setC_LocTo_ID(int C_LocTo_ID) Set C_LocTo_ID- Parameters:
C_LocTo_ID- loc to
-
getUser1_ID
public int getUser1_ID()Get User1_ID- Returns:
- User1_ID or 0
-
getUser2_ID
public int getUser2_ID()Get User2_ID- Returns:
- User2_ID or 0
-
getValue
Get value by column name- Parameters:
ColumnName-- Returns:
- column value or 0 (if column doesn't exists)
-
get_ValueAsString
Get value by column name- Parameters:
ColumnName-- Returns:
- column value or null (if column doesn't exists)
-
loadDocumentDetails
Load Document Details- Returns:
- error message or null
-
getBalance
Get Source Currency Balance - subtracts line (and tax) amounts from total - no rounding- Returns:
- positive amount, if total header is bigger than lines
-
createFacts
Create Facts (the accounting logic)- Parameters:
as- accounting schema- Returns:
- Facts
-
getFacts
Get Facts (the accounting logic)- Returns:
- Facts
-
getAcctSchema
Get accounting schema- Returns:
- MAcctSchema
-
isDeferPosting
public boolean isDeferPosting()Is posting of document should be deferred to next run of accounting posting- Returns:
- true if posting of document should be deferred to next run of accounting posting
-
isInBackDatePostingProcess
public boolean isInBackDatePostingProcess()Is in a back-date posting process?- Returns:
- true if is in a back-date posting process
-