UnitInterface
in
Unit in which an item is measured.
Tags
Table of Contents
Methods
- getPriceCoefficient() : BigDecimal
- Returns the conversion coefficient from the base unit to the current unit for the price.
- getQuantityCoefficient() : BigDecimal
- Returns the conversion coefficient from the base unit to the current unit for the quantity.
Methods
getPriceCoefficient()
Returns the conversion coefficient from the base unit to the current unit for the price.
public
getPriceCoefficient() : BigDecimal
APIYes
The conversion formula is as follows:
price = basePrice * coefficient
The base unit should therefore have a coefficient of one.
Return values
BigDecimal —conversion coefficient
getQuantityCoefficient()
Returns the conversion coefficient from the base unit to the current unit for the quantity.
public
getQuantityCoefficient() : BigDecimal
APIYes
The conversion formula is as follows:
quantity = baseQty * coefficient
The base unit should therefore have a coefficient of one.
Return values
BigDecimal —conversion coefficient