Package org.compiere.acct
Class DocLine
- java.lang.Object
-
- org.compiere.acct.DocLine
-
- Direct Known Subclasses:
DocLine_Allocation
,DocLine_Bank
,DocLine_Cash
,DocLine_InOut
public class DocLine extends Object
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
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
get_ID()
Get Line IDMAccount
getAccount()
Get GL Journal AccountMAccount
getAccount(int AcctType, MAcctSchema as)
Line Account from Product (or Charge).int
getAD_Org_ID()
Get AD_Org_IDint
getAD_OrgTrx_ID()
Get TrxOrgBigDecimal
getAmtAcctCr()
Line Journal Accounted Cr AmountBigDecimal
getAmtAcctDr()
Line Journal Accounted Dr AmountBigDecimal
getAmtSource()
Line Net Amount or Dr-CrBigDecimal
getAmtSourceCr()
Get (Journal) Line Source Cr AmountBigDecimal
getAmtSourceDr()
Get (Journal) Line Source Dr Amountint
getC_AcctSchema_ID()
Get (Journal) AcctSchemaint
getC_Activity_ID()
Get Activityint
getC_BPartner_ID()
Get BPartnerint
getC_BPartner_Location_ID()
Get C_BPartner_Location_IDint
getC_Campaign_ID()
Get Campaignprotected int
getC_Charge_ID()
Get Chargeint
getC_ConversionType_ID()
Get Conversion Typeint
getC_Currency_ID()
Get Currencyint
getC_LocFrom_ID()
Get C_LocFrom_IDint
getC_LocTo_ID()
Get C_LocTo_IDint
getC_OrderLine_ID()
Get Order Line Referenceprotected int
getC_Period_ID()
Get Periodint
getC_Project_ID()
Get Projectint
getC_ProjectPhase_ID()
Get Project Phaseint
getC_ProjectTask_ID()
Get Project Taskint
getC_RevenueRecognition_ID()
Get Revenue Recognitionint
getC_SalesRegion_ID()
Get SalesRegionint
getC_Tax_ID()
Line Taxint
getC_UOM_ID()
Quantity UOMMAccount
getChargeAccount(MAcctSchema as, BigDecimal amount)
Get Charge AccountBigDecimal
getChargeAmt()
Charge AmountBigDecimal
getCurrencyRate()
Timestamp
getDateAcct()
Get Accounting DateTimestamp
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)Timestamp
getDateDoc()
Get Document DateString
getDescription()
DescriptionBigDecimal
getDiscount()
Line Discountint
getLine()
Get Line NumberBigDecimal
getListAmount()
Line List Amountint
getM_AttributeSetInstance_ID()
ASIint
getM_Locator_ID()
Get Warehouse Locator (from)int
getM_LocatorTo_ID()
Get Warehouse Locator Toint
getM_Product_ID()
Productint
getM_Production_ID()
Get Production Headerint
getOrder_Org_ID()
Get Order AD_Org_IDPO
getPO()
int
getPP_Cost_Collector_ID()
Get PP_Cost_Collector_IDMProduct
getProduct()
Get ProductProductCost
getProductCost()
Get Product Cost InfoBigDecimal
getProductCosts(MAcctSchema as, int AD_Org_ID, boolean zeroCostsOK)
Get Total Product CostsBigDecimal
getProductCosts(MAcctSchema as, int AD_Org_ID, boolean zeroCostsOK, String whereClause)
Get Total Product Costs from Cost Detail or from Current CostBigDecimal
getQty()
Quantityint
getReversalLine_ID()
Get ReversalLine_ID get original (voided/reversed) document lineint
getUser1_ID()
Get User 1int
getUser2_ID()
Get User 2int
getValue(String ColumnName)
Get User Defined Columnboolean
isItem()
Is this an Item Product (vs. not a Service, a charge)boolean
isProductionBOM()
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
setLineNetAmtDifference(BigDecimal diff)
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 lineString
toString()
String representation
-
-
-
Method Detail
-
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
public BigDecimal getCurrencyRate()
-
setCurrencyRate
protected void setCurrencyRate(BigDecimal currencyRate)
-
setAmount
public void setAmount(BigDecimal sourceAmt)
Set Amount (DR)- Parameters:
sourceAmt
- source amt
-
setAmount
public void setAmount(BigDecimal amtSourceDr, BigDecimal amtSourceCr)
Set Amounts- Parameters:
amtSourceDr
- source amount dramtSourceCr
- source amount cr
-
setConvertedAmt
public void setConvertedAmt(int C_AcctSchema_ID, BigDecimal amtAcctDr, BigDecimal amtAcctCr)
Set Converted Amounts- Parameters:
C_AcctSchema_ID
- acct schemaamtAcctDr
- acct amount dramtAcctCr
- acct amount cr
-
getAmtSource
public BigDecimal getAmtSource()
Line Net Amount or Dr-Cr- Returns:
- balance
-
getAmtSourceDr
public BigDecimal getAmtSourceDr()
Get (Journal) Line Source Dr Amount- Returns:
- DR source amount
-
getAmtSourceCr
public BigDecimal getAmtSourceCr()
Get (Journal) Line Source Cr Amount- Returns:
- CR source amount
-
getAmtAcctDr
public BigDecimal getAmtAcctDr()
Line Journal Accounted Dr Amount- Returns:
- DR accounted amount
-
getAmtAcctCr
public BigDecimal getAmtAcctCr()
Line Journal Accounted Cr Amount- Returns:
- CR accounted amount
-
getChargeAmt
public BigDecimal getChargeAmt()
Charge Amount- Returns:
- charge amount
-
setAmount
public void setAmount(BigDecimal LineNetAmt, BigDecimal PriceList, BigDecimal Qty)
Set Product Amounts- Parameters:
LineNetAmt
- Line Net AmtPriceList
- Price ListQty
- Qty for discount calc
-
getDiscount
public BigDecimal getDiscount()
Line Discount- Returns:
- discount amount
-
getListAmount
public BigDecimal getListAmount()
Line List Amount- Returns:
- list amount
-
setLineNetAmtDifference
public void setLineNetAmtDifference(BigDecimal diff)
Set Line Net Amt Difference- Parameters:
diff
- difference (to be subtracted)
-
setDateAcct
public void setDateAcct(Timestamp dateAcct)
Set Accounting Date- Parameters:
dateAcct
- acct date
-
getDateAcct
public Timestamp getDateAcct()
Get Accounting Date- Returns:
- accounting date
-
getDateConv
public Timestamp 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
public void setDateDoc(Timestamp dateDoc)
Set Document Date- Parameters:
dateDoc
- doc date
-
getDateDoc
public Timestamp getDateDoc()
Get Document Date- Returns:
- document date
-
setAccount
public void setAccount(MAccount acct)
Set GL Journal Account- Parameters:
acct
- account
-
getAccount
public MAccount getAccount()
Get GL Journal Account- Returns:
- account
-
getAccount
public MAccount getAccount(int AcctType, MAcctSchema as)
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
public MAccount getChargeAccount(MAcctSchema as, BigDecimal amount)
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
-
getAD_Org_ID
public int getAD_Org_ID()
Get AD_Org_ID- Returns:
- org
-
getOrder_Org_ID
public int getOrder_Org_ID()
Get Order AD_Org_ID- Returns:
- order org 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
-
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:
- 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:
- loc 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:
- loc to
-
setC_LocTo_ID
public void setC_LocTo_ID(int C_LocTo_ID)
Set C_LocTo_ID- Parameters:
C_LocTo_ID
- loc to
-
getProductCost
public ProductCost 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
public BigDecimal getProductCosts(MAcctSchema as, int AD_Org_ID, boolean zeroCostsOK)
Get Total Product Costs- Parameters:
as
- accounting schemaAD_Org_ID
- trx orgzeroCostsOK
- zero/no costs are OK- Returns:
- costs
-
getProduct
public MProduct 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 M_UOM_ID
-
setQty
public void setQty(BigDecimal qty, boolean isSOTrx)
Quantity- Parameters:
qty
- transaction QtyisSOTrx
- SL order trx (i.e. negative qty)
-
getQty
public BigDecimal getQty()
Quantity- Returns:
- transaction Qty
-
getDescription
public String 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:
- BPartner Location
-
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 1- Returns:
- user defined 1
-
getUser2_ID
public int getUser2_ID()
Get User 2- Returns:
- user defined 2
-
getValue
public int getValue(String ColumnName)
Get User Defined Column- Parameters:
ColumnName
- column name- Returns:
- user defined column value
-
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
public PO getPO()
-
-