Retail:Scaled Price Discounts
Contents |
Overview
Scaled Price Discounts' is an optional free commercial module that can be installed on top of Openbravo for Retail distribution starting from RR16Q1.
It provides implementation for the Scaled Price Discount Rule.
Concepts
A Scaled Price Discount is a type of discount which applies a different percentage discount to each item of a series of products.
In this context, this discount rule requires the configuration of two sets of items:
- The products to which this discount can be applied
- The price scale, which defines the discounted percentage which must be applied to each item in the series. The price scale must have at least two members, and must be consecutive (ie. it cannot have "holes", it's not possible to define a series for items 1, 2 and 4, missing the 3).
This discount rule can be used to implement the following examples:
- 50% discount to the second unit of a product
- 50% discount to the second unit of a product, 75% discount to the third, and 100% to the fourth
Definition
Scaled Price discounts are defined in the Discounts and Promotions window.
In this window, the products which are affected by the discount must be defined in the Product tab.
The price scale must be defined in the Price Scale tab.
Price Scale
When defining the price scale, the two fields which have to be defined are:
- Item number: the item position in the series
- Percentage: The percentage discount which will be applied for this item.
Algorithm
The discounts are applied in the following way:
- All products affected by the discount are ordered by price, from greater to lower
- The algorithm goes through each product item, applying the percentage specified by the corresponding item in the Price Scale series.
- Once the Price Scale series has been exhausted, the algorithm begins with the first item in the series again for the next product item.
Examples
Example 1
Let's suppose we have the following Price Scale:
- Item 1: 0%
- Item 2: 50%
Which can be applied to the products:
- P1: Price 5
- P2: Price 10
And let's suppose we have the following receipt:
- 2xP1
- 1xP2
The algorithm will apply the following discounts:
- P2
- P1 <- 50% discount
- P1
So finally the receipt will end up like this:
- 2xP1 = 10 (discount: -2.5)
- 1x P2 =10
Total: 17.5
Example 2
Using the previous discount and products, for the following receipt:
- 2xP1
- 3xP2
The algorithm will apply the following discounts:
- P2
- P2 <- 50% discount
- P2
- P1 <- 50% discount
- P1
So finally the receipt will end up like this:
- 2xP1 = 10 (discount: -2.5)
- 3xP2 = 30 (discount: -5)
Total: 32.5
Example 3
Let's suppose we have the following Price Scale:
- Item 1: 10%
- Item 2: 20%
- Item 3: 30%
Which can be applied to the products:
- P1: Price 5
- P2: Price 10
For the following receipt:
- 7xP2
The algorithm will apply the following discounts:
- P2 <- 10% discount
- P2 <- 20% discount
- P2 <- 30% discount
- P2 <- 10% discount
- P2 <- 20% discount
- P2 <- 30% discount
- P2 <- 10% discount
And finally, the receipt will end up like this:
- 7x P1 ( discount (130%) -13)
Total: 57
Example 4
Using the previous discount and products, for the following receipt:
- 2xP1
- 2xP2
The algorithm will apply the following discounts:
- P2 <- 10% discount
- P2 <- 20% discount
- P1 <- 30% discount
- P1 <- 10% discount
And finally, the receipt will end up like this:
- 2xP1=10 (discount (40%): -2)
- 2xP2=20 (discount (30%): -3)
Total: 25