Class PriceAdjustment
- java.lang.Object
-
- org.openbravo.erpCommon.businessUtility.PriceAdjustment
-
public class PriceAdjustment extends Object
This class is in charge of calculating prices for Discounts & Promotions of Price Adjustment type. It is intended to be used from callouts so final price can be seen in advance when editing/creating the line, opposite to the rest of promotions that are not calculated until the document is posted. This is done in this way to keep backwards compatibility.- Author:
- alostale
-
-
Constructor Summary
Constructors Constructor Description PriceAdjustment()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static BigDecimal
calculatePriceActual(BaseOBObject orderOrInvoice, Product product, BigDecimal qty, BigDecimal priceStd)
Calculates price actual from price standard applying the Price Adjustments that fit the rules.static BigDecimal
calculatePriceStd(BaseOBObject orderOrInvoice, Product product, BigDecimal qty, BigDecimal priceActual)
Calculates price standard from price actual reverse applying the Price Adjustments that fit the rules.
-
-
-
Method Detail
-
calculatePriceActual
public static BigDecimal calculatePriceActual(BaseOBObject orderOrInvoice, Product product, BigDecimal qty, BigDecimal priceStd)
Calculates price actual from price standard applying the Price Adjustments that fit the rules.
-
calculatePriceStd
public static BigDecimal calculatePriceStd(BaseOBObject orderOrInvoice, Product product, BigDecimal qty, BigDecimal priceActual)
Calculates price standard from price actual reverse applying the Price Adjustments that fit the rules.
-
-