Package org.compiere.acct
Class DocLine
java.lang.Object
org.compiere.acct.DocLine
- Direct Known Subclasses:
DocLine_Allocation
,DocLine_Bank
,DocLine_Cash
,DocLine_DepositBatch
,DocLine_InOut
Standard Document Line
- Version:
- $Id: DocLine.java,v 1.2 2006/07/30 00:53:33 jjanke Exp $
- Author:
- Jorg Janke, Armen Rizal, Goodwill Consulting
- BF [ 1745154 ] Cost in Reversing Material Related Docs
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionint
get_ID()
Get Line IDGet GL Journal AccountgetAccount
(int AcctType, MAcctSchema as) Line Account from Product (or Charge).int
Get AD_Org_IDint
Get TrxOrgLine Journal Accounted Cr AmountLine Journal Accounted Dr AmountLine Net Amount or Dr-CrGet (Journal) Line Source Cr AmountGet (Journal) Line Source Dr Amountint
Get (Journal) AcctSchemaint
Get Activityint
Get BPartnerint
Get C_BPartner_Location_IDint
Get Campaignprotected int
Get Chargeint
Get Conversion Typeint
Get Currencyint
Get C_LocFrom_IDint
Get C_LocTo_IDint
Get Order Line Referenceprotected int
Get Periodint
Get Projectint
Get Project Phaseint
Get Project Taskint
Get Revenue Recognitionint
Get SalesRegionint
Line Taxint
Quantity UOMgetChargeAccount
(MAcctSchema as, BigDecimal amount) Get Charge AccountCharge AmountGet Accounting DateGet FX Conversion Date The foreign exchange rate conversion date may be different from the accounting posting date in some cases (e.g. bank statement)Get Document DateDescriptionLine Discountint
getLine()
Get Line NumberLine List Amountint
ASIint
Get Warehouse Locator (from)int
Get Warehouse Locator Toint
Productint
Get Production Headerint
Get Order AD_Org_IDgetPO()
int
Get PP_Cost_Collector_IDGet ProductGet Product Cost InfogetProductCosts
(MAcctSchema as, int AD_Org_ID, boolean zeroCostsOK) Get Total Product CostsgetProductCosts
(MAcctSchema as, int AD_Org_ID, boolean zeroCostsOK, String whereClause) Get Total Product Costs from Cost Detail or from Current CostgetQty()
Quantityint
Get ReversalLine_ID get original (voided/reversed) document lineint
Get user defined id 1int
Get user defined id 2int
Get column valueboolean
isItem()
Is this an Item Product (vs. not a Service, a charge)boolean
Is this the BOM to be producedvoid
setAccount
(MAccount acct) Set GL Journal Accountvoid
setAmount
(BigDecimal sourceAmt) Set Amount (DR)void
setAmount
(BigDecimal amtSourceDr, BigDecimal amtSourceCr) Set Amountsvoid
setAmount
(BigDecimal LineNetAmt, BigDecimal PriceList, BigDecimal Qty) Set Product Amountsprotected void
setC_BPartner_ID
(int C_BPartner_ID) Set C_BPartner_IDprotected void
setC_ConversionType_ID
(int C_ConversionType_ID) Set C_ConversionType_IDvoid
setC_LocFrom_ID
(int C_LocFrom_ID) Set C_LocFrom_IDvoid
setC_LocTo_ID
(int C_LocTo_ID) Set C_LocTo_IDprotected void
setC_Period_ID
(int C_Period_ID) Set C_Period_IDvoid
setConvertedAmt
(int C_AcctSchema_ID, BigDecimal amtAcctDr, BigDecimal amtAcctCr) Set Converted Amountsprotected void
setCurrencyRate
(BigDecimal currencyRate) void
setDateAcct
(Timestamp dateAcct) Set Accounting Datevoid
setDateDoc
(Timestamp dateDoc) Set Document Datevoid
Set Line Net Amt Differenceint
setPP_Cost_Collector_ID
(int PP_Cost_Collector_ID) Get PP_Cost_Collector_IDvoid
setProductionBOM
(boolean productionBOM) Set Production BOM flagvoid
setQty
(BigDecimal qty, boolean isSOTrx) Quantityvoid
setReversalLine_ID
(int ReversalLine_ID) Set ReversalLine_ID store original (voided/reversed) document linetoString()
String representation
-
Field Details
-
p_po
Persistent Object -
log
Log
-
-
Constructor Details
-
DocLine
Create Document Line- Parameters:
po
- line persistent objectdoc
- header
-
-
Method Details
-
getC_Currency_ID
public int getC_Currency_ID()Get Currency- Returns:
- C_Currency_ID
-
getC_ConversionType_ID
public int getC_ConversionType_ID()Get Conversion Type- Returns:
- C_ConversionType_ID
-
setC_ConversionType_ID
protected void setC_ConversionType_ID(int C_ConversionType_ID) Set C_ConversionType_ID- Parameters:
C_ConversionType_ID
- id
-
getCurrencyRate
- Returns:
- Currency rate
-
setCurrencyRate
- Parameters:
currencyRate
-
-
setAmount
Set Amount (DR)- Parameters:
sourceAmt
- source amt
-
setAmount
Set Amounts- Parameters:
amtSourceDr
- source amount dramtSourceCr
- source amount cr
-
setConvertedAmt
Set Converted Amounts- Parameters:
C_AcctSchema_ID
- acct schemaamtAcctDr
- acct amount dramtAcctCr
- acct amount cr
-
getAmtSource
Line Net Amount or Dr-Cr- Returns:
- balance
-
getAmtSourceDr
Get (Journal) Line Source Dr Amount- Returns:
- DR source amount
-
getAmtSourceCr
Get (Journal) Line Source Cr Amount- Returns:
- CR source amount
-
getAmtAcctDr
Line Journal Accounted Dr Amount- Returns:
- DR accounted amount
-
getAmtAcctCr
Line Journal Accounted Cr Amount- Returns:
- CR accounted amount
-
getChargeAmt
Charge Amount- Returns:
- charge amount
-
setAmount
Set Product Amounts- Parameters:
LineNetAmt
- Line Net AmtPriceList
- Price ListQty
- Qty for discount calc
-
getDiscount
Line Discount- Returns:
- discount amount
-
getListAmount
Line List Amount- Returns:
- list amount
-
setLineNetAmtDifference
Set Line Net Amt Difference- Parameters:
diff
- difference (to be subtracted)
-
setDateAcct
Set Accounting Date- Parameters:
dateAcct
- accounting date
-
getDateAcct
Get Accounting Date- Returns:
- accounting date
-
getDateConv
Get FX Conversion Date The foreign exchange rate conversion date may be different from the accounting posting date in some cases (e.g. bank statement)- Returns:
- FX conversion date
-
setDateDoc
Set Document Date- Parameters:
dateDoc
- doc date
-
getDateDoc
Get Document Date- Returns:
- document date
-
setAccount
Set GL Journal Account- Parameters:
acct
- account
-
getAccount
Get GL Journal Account- Returns:
- account
-
getAccount
Line Account from Product (or Charge).- Parameters:
AcctType
- see ProductCost.ACCTTYPE_* (0..3)as
- Accounting schema- Returns:
- Requested Product Account
-
getC_Charge_ID
protected int getC_Charge_ID()Get Charge- Returns:
- C_Charge_ID
-
getChargeAccount
Get Charge Account- Parameters:
as
- account schemaamount
- amount for expense(+)/revenue(-)- Returns:
- Charge Account or null
-
getC_Period_ID
protected int getC_Period_ID()Get Period- Returns:
- C_Period_ID
-
setC_Period_ID
protected void setC_Period_ID(int C_Period_ID) Set C_Period_ID- Parameters:
C_Period_ID
- id
-
getC_AcctSchema_ID
public int getC_AcctSchema_ID()Get (Journal) AcctSchema- Returns:
- C_AcctSchema_ID
-
get_ID
public int get_ID()Get Line ID- Returns:
- id of line PO
-
getAD_Org_ID
public int getAD_Org_ID()Get AD_Org_ID- Returns:
- AD_Org_ID
-
getOrder_Org_ID
public int getOrder_Org_ID()Get Order AD_Org_ID- Returns:
- order AD_Org_ID if defined
-
getM_Product_ID
public int getM_Product_ID()Product- Returns:
- M_Product_ID
-
isItem
public boolean isItem()Is this an Item Product (vs. not a Service, a charge)- Returns:
- true if product is of type item
-
getM_AttributeSetInstance_ID
public int getM_AttributeSetInstance_ID()ASI- Returns:
- M_AttributeSetInstance_ID
-
getM_Locator_ID
public int getM_Locator_ID()Get Warehouse Locator (from)- Returns:
- M_Locator_ID
-
getM_LocatorTo_ID
public int getM_LocatorTo_ID()Get Warehouse Locator To- Returns:
- to M_Locator_ID
-
setProductionBOM
public void setProductionBOM(boolean productionBOM) Set Production BOM flag- Parameters:
productionBOM
- flag
-
isProductionBOM
public boolean isProductionBOM()Is this the BOM to be produced- Returns:
- true if BOM
-
getM_Production_ID
public int getM_Production_ID()Get Production Header- Returns:
- M_Production_ID
-
getC_OrderLine_ID
public int getC_OrderLine_ID()Get Order Line Reference- Returns:
- C_OrderLine_ID
-
getC_LocFrom_ID
public int getC_LocFrom_ID()Get C_LocFrom_ID- Returns:
- C_Location_ID from
-
setC_LocFrom_ID
public void setC_LocFrom_ID(int C_LocFrom_ID) Set C_LocFrom_ID- Parameters:
C_LocFrom_ID
- loc from
-
getPP_Cost_Collector_ID
public int getPP_Cost_Collector_ID()Get PP_Cost_Collector_ID- Returns:
- Cost Collector ID
-
setPP_Cost_Collector_ID
public int setPP_Cost_Collector_ID(int PP_Cost_Collector_ID) Get PP_Cost_Collector_ID- Returns:
- Cost Collector ID
-
getC_LocTo_ID
public int getC_LocTo_ID()Get C_LocTo_ID- Returns:
- C_Location_ID to
-
setC_LocTo_ID
public void setC_LocTo_ID(int C_LocTo_ID) Set C_LocTo_ID- Parameters:
C_LocTo_ID
- loc to
-
getProductCost
Get Product Cost Info- Returns:
- product cost
-
getProductCosts
public BigDecimal getProductCosts(MAcctSchema as, int AD_Org_ID, boolean zeroCostsOK, String whereClause) Get Total Product Costs from Cost Detail or from Current Cost- Parameters:
as
- accounting schemaAD_Org_ID
- trx orgzeroCostsOK
- zero/no costs are OKwhereClause
- null are OK- Returns:
- costs
-
getProductCosts
Get Total Product Costs- Parameters:
as
- accounting schemaAD_Org_ID
- trx orgzeroCostsOK
- zero/no costs are OK- Returns:
- costs
-
getProduct
Get Product- Returns:
- product or null if no product
-
getC_RevenueRecognition_ID
public int getC_RevenueRecognition_ID()Get Revenue Recognition- Returns:
- C_RevenueRecognition_ID or 0
-
getC_UOM_ID
public int getC_UOM_ID()Quantity UOM- Returns:
- Transaction or Storage C_UOM_ID
-
setQty
Quantity- Parameters:
qty
- transaction QtyisSOTrx
- SL order trx (i.e. negative qty)
-
getQty
Quantity- Returns:
- transaction Qty
-
getDescription
Description- Returns:
- doc line description
-
getC_Tax_ID
public int getC_Tax_ID()Line Tax- Returns:
- C_Tax_ID
-
getLine
public int getLine()Get Line Number- Returns:
- line no
-
getC_BPartner_ID
public int getC_BPartner_ID()Get BPartner- Returns:
- C_BPartner_ID
-
setC_BPartner_ID
protected void setC_BPartner_ID(int C_BPartner_ID) Set C_BPartner_ID- Parameters:
C_BPartner_ID
- id
-
getC_BPartner_Location_ID
public int getC_BPartner_Location_ID()Get C_BPartner_Location_ID- Returns:
- C_BPartner_Location_ID
-
getAD_OrgTrx_ID
public int getAD_OrgTrx_ID()Get TrxOrg- Returns:
- AD_OrgTrx_ID
-
getC_SalesRegion_ID
public int getC_SalesRegion_ID()Get SalesRegion. - get Sales Region from BPartner- Returns:
- C_SalesRegion_ID
-
getC_Project_ID
public int getC_Project_ID()Get Project- Returns:
- C_Project_ID
-
getC_ProjectPhase_ID
public int getC_ProjectPhase_ID()Get Project Phase- Returns:
- C_ProjectPhase_ID
-
getC_ProjectTask_ID
public int getC_ProjectTask_ID()Get Project Task- Returns:
- C_ProjectTask_ID
-
getC_Campaign_ID
public int getC_Campaign_ID()Get Campaign- Returns:
- C_Campaign_ID
-
getC_Activity_ID
public int getC_Activity_ID()Get Activity- Returns:
- C_Activity_ID
-
getUser1_ID
public int getUser1_ID()Get user defined id 1- Returns:
- User1_ID
-
getUser2_ID
public int getUser2_ID()Get user defined id 2- Returns:
- User2_ID
-
getValue
Get column value- Parameters:
ColumnName
- column name- Returns:
- column value or 0 (if column doesn't exist)
-
setReversalLine_ID
public void setReversalLine_ID(int ReversalLine_ID) Set ReversalLine_ID store original (voided/reversed) document line- Parameters:
ReversalLine_ID
-
-
getReversalLine_ID
public int getReversalLine_ID()Get ReversalLine_ID get original (voided/reversed) document line- Returns:
- ReversalLine_ID
-
getPO
- Returns:
- line PO
-
toString
String representation
-