Package org.compiere.model
Class MProductPricing
java.lang.Object
org.adempiere.base.AbstractProductPricing
org.compiere.model.MProductPricing
- All Implemented Interfaces:
IProductPricing
Product Pricing
- Version:
- $Id: MProductPricing.java,v 1.2 2006/07/30 00:51:02 jjanke Exp $
- Author:
- Jorg Janke
-
Field Summary
Fields inherited from class org.adempiere.base.AbstractProductPricing
m_C_BPartner_ID, m_isSOTrx, m_M_PriceList_ID, m_M_PriceList_Version_ID, m_M_Product_ID, m_PriceDate, m_Qty, trxName
-
Constructor Summary
ConstructorDescriptionNew constructor to be used withIProductPricingFactory
MProductPricing
(int M_Product_ID, int C_BPartner_ID, BigDecimal Qty, boolean isSOTrx) Deprecated.Use constructor with explicit trxName parameterMProductPricing
(int M_Product_ID, int C_BPartner_ID, BigDecimal Qty, boolean isSOTrx, String trxName) Old Constructor to keep backward compatibility -
Method Summary
Modifier and TypeMethodDescriptionboolean
Calculate Priceint
Get Price List Currencyint
Get C_UOM_IDCalculate Discount Percentage based on Standard/List Priceint
Get PriceList Versionint
Get PrecisionGet Limit PriceGet List PriceGet standard priceboolean
Is the Price Calculated (i.e. found)?boolean
Is using discount schema or vendor break?boolean
Is Price Limit enforce?boolean
Is Tax Includedvoid
setInitialValues
(int M_Product_ID, int C_BPartner_ID, BigDecimal qty, boolean isSOTrx, String trxName) Set the initial values that the old MProductPricing uses for backward compatibilityvoid
setInvoiceLine
(I_C_InvoiceLine invoiceLine, String trxName) Set invoice line and calculate the parameters from itvoid
setM_PriceList_ID
(int M_PriceList_ID) Set PriceListvoid
setM_PriceList_Version_ID
(int M_PriceList_Version_ID) Set PriceList Versionvoid
setOrderLine
(I_C_OrderLine orderLine, String trxName) Set order line and calculate the parameters from itvoid
setPriceDate
(Timestamp priceDate) Set Price Datevoid
setProjectLine
(I_C_ProjectLine projectLine, String trxName) Set project line and calculate the parameters from itvoid
setRequisitionLine
(I_M_RequisitionLine reqLine, String trxName) Set requisition line and calculate the parameters from itvoid
setRMALine
(I_M_RMALine rmaLine, String trxName) Set rma line and calculate the parameters from itMethods inherited from class org.adempiere.base.AbstractProductPricing
getM_PriceList_ID, getM_Product_ID, getPriceDate, setQty
-
Field Details
-
log
Logger
-
-
Constructor Details
-
MProductPricing
public MProductPricing()New constructor to be used withIProductPricingFactory
-
MProductPricing
public MProductPricing(int M_Product_ID, int C_BPartner_ID, BigDecimal Qty, boolean isSOTrx, String trxName) Old Constructor to keep backward compatibility- Parameters:
M_Product_ID
- productC_BPartner_ID
- partnerQty
- quantityisSOTrx
- SO or POtrxName
- the transaction
-
MProductPricing
@Deprecated public MProductPricing(int M_Product_ID, int C_BPartner_ID, BigDecimal Qty, boolean isSOTrx) Deprecated.Use constructor with explicit trxName parameterConstructor- Parameters:
M_Product_ID
- productC_BPartner_ID
- partnerQty
- quantityisSOTrx
- SO or PO
-
-
Method Details
-
setInitialValues
public void setInitialValues(int M_Product_ID, int C_BPartner_ID, BigDecimal qty, boolean isSOTrx, String trxName) Description copied from interface:IProductPricing
Set the initial values that the old MProductPricing uses for backward compatibility- Specified by:
setInitialValues
in interfaceIProductPricing
- Overrides:
setInitialValues
in classAbstractProductPricing
-
calculatePrice
public boolean calculatePrice()Calculate Price- Returns:
- true if calculated
-
isTaxIncluded
public boolean isTaxIncluded()Is Tax Included- Returns:
- true if tax included
-
getDiscount
Calculate Discount Percentage based on Standard/List Price- Returns:
- Discount
-
setM_PriceList_ID
public void setM_PriceList_ID(int M_PriceList_ID) Set PriceList- Specified by:
setM_PriceList_ID
in interfaceIProductPricing
- Overrides:
setM_PriceList_ID
in classAbstractProductPricing
- Parameters:
M_PriceList_ID
- pl
-
getM_PriceList_Version_ID
public int getM_PriceList_Version_ID()Get PriceList Version- Returns:
- M_PriceList_Version_ID
-
setM_PriceList_Version_ID
public void setM_PriceList_Version_ID(int M_PriceList_Version_ID) Set PriceList Version- Specified by:
setM_PriceList_Version_ID
in interfaceIProductPricing
- Overrides:
setM_PriceList_Version_ID
in classAbstractProductPricing
- Parameters:
M_PriceList_Version_ID
- plv
-
setPriceDate
Set Price Date- Specified by:
setPriceDate
in interfaceIProductPricing
- Overrides:
setPriceDate
in classAbstractProductPricing
- Parameters:
priceDate
- date
-
getPrecision
public int getPrecision()Get Precision- Returns:
- precision, -1 = no rounding
-
getC_UOM_ID
public int getC_UOM_ID()Get C_UOM_ID- Returns:
- C_UOM_ID
-
getPriceList
Get List Price- Returns:
- list price
-
getPriceStd
Get standard price- Returns:
- standard price
-
getPriceLimit
Get Limit Price- Returns:
- limit price
-
getC_Currency_ID
public int getC_Currency_ID()Get Price List Currency- Returns:
- C_Currency_ID
-
isEnforcePriceLimit
public boolean isEnforcePriceLimit()Is Price Limit enforce?- Returns:
- true if price limit should be enforced
-
isDiscountSchema
public boolean isDiscountSchema()Is using discount schema or vendor break?- Returns:
- true if using discount schema or vendor break
-
isCalculated
public boolean isCalculated()Is the Price Calculated (i.e. found)?- Returns:
- true if calculated
-
setOrderLine
Description copied from interface:IProductPricing
Set order line and calculate the parameters from it- Specified by:
setOrderLine
in interfaceIProductPricing
- Overrides:
setOrderLine
in classAbstractProductPricing
-
setInvoiceLine
Description copied from interface:IProductPricing
Set invoice line and calculate the parameters from it- Specified by:
setInvoiceLine
in interfaceIProductPricing
- Overrides:
setInvoiceLine
in classAbstractProductPricing
-
setProjectLine
Description copied from interface:IProductPricing
Set project line and calculate the parameters from it- Specified by:
setProjectLine
in interfaceIProductPricing
- Overrides:
setProjectLine
in classAbstractProductPricing
-
setRequisitionLine
Description copied from interface:IProductPricing
Set requisition line and calculate the parameters from it- Specified by:
setRequisitionLine
in interfaceIProductPricing
- Overrides:
setRequisitionLine
in classAbstractProductPricing
-
setRMALine
Description copied from interface:IProductPricing
Set rma line and calculate the parameters from it- Specified by:
setRMALine
in interfaceIProductPricing
- Overrides:
setRMALine
in classAbstractProductPricing
-