Walkthrough: Best Condition (Highest)

Sales-Purchase Conditions for Drink-IT  •  Article  •  11/10/2026  • 

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

  1. Select the Search icon alt text, enter Sales and Purchase Condition Calculations, and then choose the related link.
  2. Open DISC_NETL3 and confirm these values:

    FieldValue
    Application PolicyOnce by priority
    Price Calculation Method TypeBest Condition (Highest)
    Calculation TypeDiscount
    Calculation Method TypeNet %
    Calculation Period TypeOrder
  3. Open DISC_PRICE and confirm these values:

    FieldValue
    Application PolicyOnce by priority
    Price Calculation Method TypeBest Condition (Highest)
    Calculation TypeDiscount
    Calculation Method TypePrice
    Calculation Period TypeOrder
  4. Select the Search icon alt text, enter Sales and Purchase Condition Rules, and then choose the related link.

  5. 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.

    RuleDescriptionCalculation codeSourceItem TypePosition level
    101Best discount on Net%DISC_NETL3Classification Customer ONPREMAll Items3
    102Best discount on PriceDISC_PRICEClassification Customer ONPREMAll Items10
  6. 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
    1010CRATE200
    1080KEG2000
  7. 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
    1010CRATE1024
    1080KEG1024

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.

  1. Select the Search icon alt text, enter Sales Orders, and then choose the related link.
  2. Choose New.
  3. In Customer, enter 20000. This is the Selangorian Pub. It belongs to price group PREM and to classification ONPREM.
  4. On the lines, enter these items:

    ItemQuantityUnit of measureUnit price excl. VAT
    10101CRATE20
    10801KEG100
  5. Choose Release.

  6. The order has these lines:

    TypeNo.Unit of measureQuantityUnit price excl. VATLine amount excl. VATRule
    Item1010CRATE12020
    Item1080KEG1100100
    Charge (Item)931CRATE1-10-10102, DISC_PRICE
    Charge (Item)933KEG1-20-20101, DISC_NETL3
  7. 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.

  8. 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.

  1. Reopen the sales order from Exercise 1.
  2. Change the quantity of item 1010 to 3.
  3. Choose Calculate Drink-it Lines, and confirm that the existing condition lines are replaced.
  4. The order has these lines:

    TypeNo.Unit of measureQuantityUnit price excl. VATLine amount excl. VATRule
    Item1010CRATE32060
    Item1080KEG1100100
    Charge (Item)931CRATE2-10-20102, DISC_PRICE
    Charge (Item)933CRATE1-0.40-0.40101, DISC_NETL3
    Charge (Item)933KEG1-20-20101, DISC_NETL3
  5. 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).