Breakdown of the factors that make up a product line's final price: list price, tax, quantity, and any promotional adjustment. The final cost is normally the adjusted ex-tax price plus tax, but where a promotional final cost has been set that overrides the sum, so tax plus adjustedPriceExTax will not equal the final cost in that case.


Properties

PropertyReturnsDescription
adjustedPriceExTaxBigDecimalTotal ex-tax price for the line after pricing rule adjustments, but before any promotional override, for the full quantity.
adjustedUnitPriceExTaxBigDecimalAdjusted ex-tax price per unit, calculated by dividing the adjusted ex-tax total by the quantity.
finalCostBigDecimalFinal cost for this line, including tax. This is the promotional final cost if one has been set, otherwise the adjusted ex-tax price plus tax.
finalListPriceIncTaxBigDecimalTotal list price for the full quantity, including tax, calculated from the list unit price with no pricing rule adjustments applied.
finalPriceExTaxBigDecimalFinal price for this line, excluding tax. This is the adjusted ex-tax price, or where a promotional final cost has been set, that cost with tax subtracted back out.
listUnitPriceExTaxBigDecimalList unit price for the product, excluding tax, before any pricing rule adjustments.
promotionalDiscountBigDecimalAmount by which the promotional final cost reduces the price below the non-promotional adjusted price plus tax.
promotionalFinalCostBigDecimalTax-inclusive final cost where a promotion has reduced the price below the normal calculated cost.
quantityBigDecimalQuantity of the product this itemised price covers.
rulesNarrativeList<String>Human-readable log of the pricing rules and adjustments that were applied to produce this itemised price.
taxBigDecimalTax amount included in the final cost.
taxRateBigDecimalTax rate multiplier used to calculate the tax amount from the ex-tax cost.

Methods

withDiscount(BigDecimal disc) · withTaxRate(BigDecimal rate) · getListUnitPriceExTax() · getAdjustedPriceExTax() · getAdjustedUnitPriceExTax() · getQuantity() · getTax() · getTaxRate() · getFinalCost() · finalCost(Narrative narrative) · getFinalListPriceIncTax() · getFinalPriceExTax() · getPromotionalDiscount() · getPromotionalFinalCost() · getRulesNarrative()

withDiscount(BigDecimal disc)

Returns: ItemisedPrice

Returns a new itemised price with a discount multiplier applied to the ex-tax cost, for example 0.9 reduces the cost by 10 percent. The multiplier is applied to the ex-tax cost, then tax is recalculated from the discounted total to produce the new tax amount and promotional final cost, and a note is added to the rules narrative.

ParameterDescription
discthe discount multiplier to apply to the ex-tax cost; if null the original itemised price is returned unchanged

withTaxRate(BigDecimal rate)

Returns: ItemisedPrice

Returns a new itemised price with the given tax rate applied, recalculating the tax amount from the current final list price including tax, and adding a note to the rules narrative.

ParameterDescription
ratethe tax rate multiplier to apply; if null the original itemised price is returned unchanged

getListUnitPriceExTax()

Returns: BigDecimal

List unit price for the product, excluding tax, before any pricing rule adjustments.

getAdjustedPriceExTax()

Returns: BigDecimal

Total ex-tax price for the line after pricing rule adjustments, but before any promotional override, for the full quantity.

getAdjustedUnitPriceExTax()

Returns: BigDecimal

Adjusted ex-tax price per unit, calculated by dividing the adjusted ex-tax total by the quantity.

getQuantity()

Returns: BigDecimal

Quantity of the product this itemised price covers.

getTax()

Returns: BigDecimal

Tax amount included in the final cost.

getTaxRate()

Returns: BigDecimal

Tax rate multiplier used to calculate the tax amount from the ex-tax cost.

getFinalCost()

Returns: BigDecimal

Final cost for this line, including tax. This is the promotional final cost if one has been set, otherwise the adjusted ex-tax price plus tax.

finalCost(Narrative narrative)

Returns: BigDecimal

Final cost for this line, including tax, optionally recording the reasoning behind the calculation into the given narrative. Uses the promotional final cost if one has been set, otherwise the adjusted ex-tax price plus tax.

ParameterDescription
narrativenarrative to append the calculation steps to, or null to skip narration

getFinalListPriceIncTax()

Returns: BigDecimal

Total list price for the full quantity, including tax, calculated from the list unit price with no pricing rule adjustments applied.

getFinalPriceExTax()

Returns: BigDecimal

Final price for this line, excluding tax. This is the adjusted ex-tax price, or where a promotional final cost has been set, that cost with tax subtracted back out.

getPromotionalDiscount()

Returns: BigDecimal

Amount by which the promotional final cost reduces the price below the non-promotional adjusted price plus tax.

getPromotionalFinalCost()

Returns: BigDecimal

Tax-inclusive final cost where a promotion has reduced the price below the normal calculated cost.

getRulesNarrative()

Returns: List<String>

Human-readable log of the pricing rules and adjustments that were applied to produce this itemised price.

To get full access to the Kademi Hub existing customers can login here, or new customers can register here.