Walkthrough: Mixed Calculation Code for Periodic Conditions
Walkthrough: Set Up and Use a Mixed Calculation Code for Periodic Conditions
About This Walkthrough
This walkthrough shows how to set up a Mixed calculation code for periodic discount and charge conditions in the Aptean Beverage Sales-Purchase Conditions for Drink-IT Edition extension. A Mixed calculation code allows a single periodic rule to apply a discount or a charge depending on the sign of the rate value — eliminating the need for two separate calculation codes when commercial agreements flip direction across volume or value brackets.
Example business scenario: A customer earns a 2 % rebate (discount) when monthly purchases exceed 500 units, but incurs a 1 % cost-recovery levy (charge) below that threshold. With a Mixed code, both directions are captured in one rule.
Prerequisites
Before you begin, ensure the following:
- You have the Aptean Beverage Sales-Purchase Conditions for Drink-IT Edition extension installed (version 2603.0.0.0 or later).
- You have the SPC Setup configured and at least one vendor or customer posting group set up.
-
You have permission to access the Condition Calculation Codes page.
Step 1: Create a Mixed Calculation Code
-
Choose the search icon, enter Condition Calculation Codes, and then select the related link.
- On the Condition Calculation Codes page, choose New.
- Fill in the Code field with a unique identifier, for example MIX-REBATE.
- In the Description field, enter a meaningful name, for example Mixed Rebate/Levy – Periodic.
-
In the Calculation Type field, select Mixed.
Note: Mixed is available only when the Calculation Period Type field is not set to Order. If you select Mixed while the Calculation Period Type field is set to Order, the system displays a validation error: Mixed is not allowed for Order-level conditions.
- In the Calculation Period Type field, select a periodic option such as Month, Quarter, or Year.
-
In the Calculation Method Type field, select one of the permitted method types: Gross %, Net %, Fixed Price, or Price.
Note: Cost % is not permitted for a Mixed calculation code and is blocked at setup.
- Fill in the G/L Account No. or Item Charge No. field. These fields are mandatory for Mixed calculation codes.
- Configure the remaining periodic fields — Post Accrual to G/L, Use Calendar Period, and Customer/Vendor Posting Group — as needed. These fields behave identically to other periodic calculation types.
-
Close the card to save the code.
Step 2: Attach the Mixed Calculation Code to a Condition Rule
-
Choose the search icon, enter Condition Rules, and then select the related link.
- Open an existing rule or choose New to create one.
- In the Calculation Code field, select the Mixed code you created in step 1, for example MIX-REBATE.
- Configure the remaining rule fields — source type, item type, dates, and posting groups — as required.
-
Close the card to save the rule.
Step 3: Add Rate Lines with Direction-Determining Values
Rate lines under a Mixed calculation code use the sign of the Rate Value field to determine direction:
- A negative value applies the rate as a discount (reduces the line value).
- A positive value applies the rate as a charge (increases the line value).
Note: A rate value of 0 is not valid for Mixed and is blocked on insert and modify.
Add the Discount Rate Line (Negative Value)
- On the Condition Calculation Code card for your Mixed code, go to the Rate Lines FastTab.
- Choose New to add a rate line.
- In the Minimum Quantity field, enter the lower threshold, for example 500.
- Leave the Maximum Quantity field blank to indicate no upper limit.
- In the Rate Value field, enter a negative value, for example -2 to apply a 2 % discount.
- Verify that the Direction field shows Discount. This field is computed from the sign of the Rate Value field for Mixed codes.
- Close the line to save.
Add the Charge Rate Line (Positive Value)
- Choose New to add a second rate line.
- In the Minimum Quantity field, enter 0.
- In the Maximum Quantity field, enter 499.
- In the Rate Value field, enter a positive value, for example 1 to apply a 1 % charge.
- Verify that the Direction field shows Charge.
-
Close the line to save.
Note: The system validates that no two rate lines in the same rule have overlapping Minimum/Maximum Quantity and Minimum/Maximum Amount ranges at the same time. If an overlap is detected, the system displays an error identifying the conflicting line. Two lines with the same quantity and amount ranges but non-overlapping validity date ranges are allowed.
Step 4: Verify Direction on a Sales or Purchase Document
- Create a Sales Order or Purchase Order for a customer or vendor covered by the condition rule.
- Add an item line and release the document.
- On the Condition Lines FactBox or page, locate the condition line generated by the Mixed rule.
-
Confirm that the Direction field shows the correct value based on the quantity on the document line:
- If the quantity meets the discount threshold (for example, 500 units or more), the Direction field shows Discount and the line value is reduced.
- If the quantity falls in the charge bracket (for example, 0–499 units), the Direction field shows Charge and the line value is increased.
-
Post the Sales Order or Purchase Order for invoice.
Step 5: Run the Periodic Settlement Journal
-
Choose the search icon, enter Condition Periodic Settlement Journal, and then select the related link.
- Choose Suggest Periodic Journal Lines to populate the journal based on posted documents within the period.
-
Review the journal lines. For Mixed calculation codes, the signed amount on each Condition Journal Line reflects the direction:
- A negative amount indicates a discount (credit to the customer).
- A positive amount indicates a charge (debit to the customer).
-
Verify the amounts are correct and then choose Post to post the journal.
-
Open the Condition Ledger Entries page for the customer or vendor to confirm that the signed amounts have posted correctly and that G/L entries reflect the correct debit/credit direction.
Results
After completing this walkthrough, you have:
- Created a Mixed calculation code restricted to periodic conditions.
- Defined rate lines where a negative Rate Value applies a discount and a positive Rate Value applies a charge.
- Confirmed that the Direction field on rate lines reflects the correct direction.
- Applied the rule to a sales or purchase document and verified that the direction is determined by the quantity bracket.
-
Posted the periodic settlement journal and confirmed that G/L entries carry the correct debit/credit direction.
Related Information
-
What's New in Aptean Beverage Sales-Purchase Conditions for Drink-IT Edition, version 2603.0.0.0
- Condition Calculation Codes setup
- Condition Periodic Settlement Journal