By defining discount compositions, the user specifies composition operations for various ordered sets of discounts (the maximum discount applies, subsequent ones do not apply, sum of discounts, reduce following ones), as well as the maximum total percentage of discounts. Sets may include all discounts except freely combinable ones which have the property Combine Any specified in their settings.
To create a discount composition:
In discount composition properties, an operation, application sequence of discounts, and maximum discount percentage are specified.
The following operations are assigned to discount compositions:
When calculating a composition with the Largest operation, the sum of the largest discount will be distributed among the discounts applied to the menu item proportionally to their amounts. The order takes the highest discount from the composition. The discount amount will then be redistributed across all discounts proportional to their sizes.
The First Non-Zero operation applies the first non-zero discount, while the rest are considered zero.
With the Sum up operation, each discount is calculated separately considering all restrictions, and then the ruble values of the discounts are summed up.
The Reduce Subsequent Discounts operation allows calculation of the second, third, and fourth discounts based on the total amount of the applicable area (order, location, or menu item), taking into account the sum of previous discounts.
The discount calculation follows the predefined sequence. Discount 1 is applied first, followed by subsequent discounts in turn.
This field specifies the maximum percentage of the discount composition relative to the total value of the menu items within the applicable scope. If a Max Percent has been set in the composition and it is lower than the calculated one, the amount corresponding to this percentage is distributed between the discounts proportionately according to the discount sums calculated before composition.
The Main property group also includes GUID and Identifier, which are automatically assigned.
Compositions are created first as pairs, then triples and subsequent ones. For example, when creating a composition of three or more discounts, it is necessary to have pair compositions of all discounts included in it. To create a composition of four discounts, you must first create paired and tripled compositions of used discounts. |
A discount composition can include discounts with different application areas: order, seat, menu item (dish).
Consideration of discounts during calculation of the composition takes place according to their arrangement in the group properties Basic.
The possibility of applying a discount is determined separately for each menu item. Checking discount compositions for a menu item takes into account the seat assigned or unassigned to the menu item (in this case, the menu item is considered 'common').
In addition to discounts from the composition, a non-freely combinable discount may be applied to the order, seat or menu item, which does not belong to any composition. A non-freely combinable discount can also be set if no discount composition applies:
Let's consider a composition with the operation Reduce Following.
For instance, there is a composition of three discounts. Previously, pairwise compositions were created for the discounts included in this composition: with the operation “Reduce Following” – for discounts “5 %” and “10 %”; “15 %” and “10 %”; with the operation “Sum up” – for discounts “15 %” and “5 %”. When two discounts are applied, the corresponding pairwise compositions work; when three discounts are applied, the ternary composition works, while ignoring the operations of the pairwise compositions.
All discounts having the scope of application – “On order.” The total order amount is 200 rubles. The cashier added the first discount “15 %,” calculated based on 200 rubles.
Then the cashier added the second discount “5 %.” The paired composition starts working by the operation “Sum up” It is calculated based on 200 rubles.
Upon adding the third discount of 10%, the composition of three discounts comes into effect, and the discount amounts are recalculated: the discount “5 %” is indicated in the composition as “Discount 1,” so it is calculated from the full order amount of 200 rubles. The amount of the second discount “10 %” is calculated from the remaining order amount after accounting for the first discount – 190 rubles (200 minus 10). The amount of the third discount “15 %” is calculated from the remaining order amount after considering both previously applied discounts – 171 rubles (200 minus 10 minus 19).