Walkthrough: Best Condition (Highest)
Best Condition (Highest) compares discount lines from different calculation codes and keeps the higher discount. Each rule in this walkthrough uses its own calculation code. Both codes use Once by priority and Best Condition (Highest).
Use the cronus DIT demo company. Create a copy of the company before you start. Other certified rules for the same customer and item add extra lines.
Setup
- Select the Search icon
, enter Sales and Purchase Condition Calculations, and then choose the related link. -
Open DISC_NETL3 and confirm these values:
Field Value Application Policy Once by priority Price Calculation Method Type Best Condition (Highest) Calculation Type Discount Calculation Method Type Net % Calculation Period Type Order -
Open DISC_PRICE and confirm these values:
Field Value Application Policy Once by priority Price Calculation Method Type Best Condition (Highest) Calculation Type Discount Calculation Method Type Price Calculation Period Type Order -
Select the Search icon
, enter Sales and Purchase Condition Rules, and then choose the related link. -
Create these two rules and certify them. On both rules, Item Type is All Items. The rule numbers in this walkthrough are 101 and 102. If your number series assigns other numbers, use the descriptions to identify the rules.
Rule Description Calculation code Source Item Type Position level 101 Best discount on Net% DISC_NETL3 Classification Customer ONPREM All Items 3 102 Best discount on Price DISC_PRICE Classification Customer ONPREM All Items 10 -
On the Rates FastTab of rule 101, add these lines. The rate field is Rate Unit (Net %).
Item No. Unit of Measure Code (Quantity) Rate Unit (Net %) Maximum Quantity Deal (per Source Member) Maximum Quantity Deal 1010 CRATE 2 0 0 1080 KEG 20 0 0 -
On the Rates FastTab of rule 102, add these lines. The rate field is Rate Unit (Price).
Item No. Unit of Measure Code (Quantity) Rate Unit (Price) Maximum Quantity Deal (per Source Member) Maximum Quantity Deal 1010 CRATE 10 2 4 1080 KEG 10 2 4
Rule 101 has the better position level. Rule 102 has the higher discount and the quantity cap. Item 1010 is sold in crates. Item 1080 is sold in kegs.
Exercise 1: The higher discount is kept
The order quantity is inside the cap, so only the higher discount remains.
- Select the Search icon
, enter Sales Orders, and then choose the related link. - Choose New.
- In Customer, enter 20000. This is the Selangorian Pub. It belongs to price group PREM and to classification ONPREM.
-
On the lines, enter these items:
Item Quantity Unit of measure Unit price excl. VAT 1010 1 CRATE 20 1080 1 KEG 100 -
Choose Release.
-
The order has these lines:
Type No. Unit of measure Quantity Unit price excl. VAT Line amount excl. VAT Rule Item 1010 CRATE 1 20 20 Item 1080 KEG 1 100 100 Charge (Item) 931 CRATE 1 -10 -10 102, DISC_PRICE Charge (Item) 933 KEG 1 -20 -20 101, DISC_NETL3 -
Item 1010 keeps the price discount of 10. The 2% discount would be 0.40, which is lower than 10. Item 1080 keeps the 20% discount. That amount is 20, which is higher than the price discount of 10.
- On the condition document line for charge 931, confirm rule 102, description Best discount on Price, unit of measure CRATE, and rate 10. On the line for charge 933, confirm rule 101, description Best discount on Net%, unit of measure KEG, and rate 20.
If the calculated rule is not the one in this table, open Sales and Purchase Condition Rules. Set the other certified rules for these calculation codes to Under Development. Once by priority keeps the first matching rule of a calculation code, so an earlier rule on the same code is used and Best Condition does not compare it.
Position level does not decide between the two codes. Both codes are calculated, and Best Condition keeps the higher amount for each item.
Exercise 2: Maximum quantity deal splits the quantity
The better discount is capped. The other calculation code covers the quantity above the cap.
- Reopen the sales order from Exercise 1.
- Change the quantity of item 1010 to 3.
- Choose Calculate Drink-it Lines, and confirm that the existing condition lines are replaced.
-
The order has these lines:
Type No. Unit of measure Quantity Unit price excl. VAT Line amount excl. VAT Rule Item 1010 CRATE 3 20 60 Item 1080 KEG 1 100 100 Charge (Item) 931 CRATE 2 -10 -20 102, DISC_PRICE Charge (Item) 933 CRATE 1 -0.40 -0.40 101, DISC_NETL3 Charge (Item) 933 KEG 1 -20 -20 101, DISC_NETL3 -
Rule 102 stops at 2 crates because Maximum Quantity Deal (per Source Member) is 2 on the rate line for item 1010. The third crate gets the 2% discount from rule 101.
A quantity of 100 gives rule 102 its 2 crates and rule 101 the other 98 crates.
Same calculation code
Best Condition does not compare two rules that share one calculation code. Once by priority keeps the first matching rule of that code. With two group rules on DISC_PRICE only, the rule with the lower position level is kept. When the position levels are equal, the lower source number is kept. The rate is not compared.
To let Best Condition choose between 0.10 and 0.20, put each rate on its own calculation code, with both codes set to Best Condition (Highest).