Advanced Price Management
Release: Advanced Price Management – 26.0.9645.40299
Description
This release focuses on fixing multiple bugs related to Grouped Line Discount calculation, improving the Net Unit Price behavior for corrective documents and inventory pick postings, and enhancing the Price List Lines user interface. Key improvements include proper quantity-to-base-UoM conversion for discount thresholds, always returning the highest applicable discount rate, correct line amount recalculation on credit memos and invoice copies, and better visibility of price/discount level details on price list lines. Code quality improvements include centralized subscriber guard logic and Confirm Management adoption.
User Stories
No User Story developed in this release.
Bugs
| Title | Description | Impact on previous version |
|---|---|---|
| [23862] – Grouped Line Discount Quantity Bug | When using Grouped Line Discount with a quantity threshold, the discount was incorrectly applied because the quantity was not converted to the base unit of measure. The system used the sales line quantity directly instead of converting it using the “Qty. per Unit of Measure” factor. Fixed in codeunit 8120290 isaAPM_GroupedLineDiscountMgmt — procedure CalculateSalesLineThresholdValue now differentiates: if a UoM code is specified on the price line, the threshold uses SalesLine.Quantity directly; if no UoM code is specified, the threshold is computed as SalesLine.Quantity * SalesLine."Qty. per Unit of Measure". |
Medium risk — Existing Grouped Line Discount configurations using quantity thresholds without a specific UoM code on the price line will now compute thresholds in base quantity. Discount results may change for items sold in non-base units of measure. |
| [23866] – IUOM on Line Discount Group | When configuring a Grouped Line Discount price line with Asset Type “All Items”, the Unit of Measure Code field was not editable, preventing users from specifying a UoM filter. Fixed in table 8120267 isaAPM_PriceLine (TableRelation for “Unit of Measure Code” now references the generic “Unit of Measure” table when Asset Type = “All Items”) and page 8120269 isaAPM_PriceListLines (Variant Code and Unit of Measure Code fields are now editable/enabled for Grouped Line Discount lines). |
Medium risk — “All Items” Grouped Line Discount lines previously restricted by UoM will now accept any system-wide Unit of Measure. The UoM filter on IsMatchingSalesLineForDiscount for “All Items” has been removed, broadening discount applicability. |
| [23869] – Fix Always Highest Rate Grouped Line Discount | The Grouped Line Discount calculation did not always return the highest discount rate. The previous algorithm relied on record sorting by Minimum threshold ascending, which could return incorrect results when discount percentages were not strictly ascending with the Minimum value. Fixed in codeunit 8120290 isaAPM_GroupedLineDiscountMgmt — procedure FindApplicableGroupedLineDiscount now iterates all matching records and returns the highest “Line Discount %” found. |
Low risk — The new algorithm is more resilient; customers whose discount tiers had strictly ascending percentages will see no change. Customers with non-ascending discount percentage tiers may now get different (correct) results. |
| [23872] – Clean Code and Rename | Code cleanup: replaced direct Confirm() calls with Confirm Management codeunit in codeunit 8120278 isaAPM_Analysis Price, refactored subscriber guard logic into a centralized ProcessSubscriber procedure in codeunit 8120285 isaAPM_NetPriceCalcSubscribers, promoted local variables to global scope, and renamed test files for consistency. |
Low risk — No functional change for end users. Note: the removal of SalesLine.IsTemporary() exit guard in subscriber procedures means APM net price calculation logic will now execute on temporary Sales Line records where it was previously suppressed. |
| [24032] – Price + Discount Visibility on Price List Lines | On the Price List Lines page, the action text for price levels, discount levels, and substitution details was not informative enough. Labels like “View Discount Levels” did not show the count or actual values. Fixed in table 8120267 isaAPM_PriceLine — new procedure GetApplicationBaseActionTxt displays: create label (0 records), actual stored value (1 record), or parameterized count label (N records). The UI column order on page 8120269 has also been adjusted (“Unit of Measure Code” moved after “Application Base”). |
Low risk — UI-only improvement. Two new integration events added for extensibility (see Events section). |
| [24041] – Inv Pick Posting Amount Issue | When posting an Inventory Pick related to a sales order using Net Unit Price calculation, the amount on the resulting sales invoice line was incorrect. The Line Amount was not recalculated based on the APM net price when copying from a posted invoice line. Fixed in codeunit 8120284 isaAPM_NetPriceCalculationMgmt — the CopySalesLineAPMSalesPrice overload for Sales Invoice Line source now calls UpdateLineAmountBasedOnAPMNetPrice and validates the Line Amount accordingly. |
Medium risk — The Validate("Line Amount") call triggers the standard BC OnValidate cascade, which may recalculate discounts and taxes. Inventory Pick posting flows using Net Unit Price will now produce correct line amounts. |
| [24090] – Corrective Document Amount Line Incorrect Using Net Unit Price | When creating a corrective credit memo from a posted sales invoice using Net Unit Price, the line amount was not correctly recalculated. The CopySalesLineAPMSalesPrice procedure for Sales Invoice Line source did not validate the Line Amount based on APM net price logic. This is the same fix as [24041], applied through the same code change in codeunit 8120284. |
Medium risk — Same impact as [24041]. Corrective documents will now have properly recalculated line amounts. |
| [24091] – Suppress Warnings | Suppression of compiler warnings related to unused variables and parameters in the APM codebase. No functional change. | Low risk — No behavioral impact. |
Events
| Status | Type | Object Name | Event Name | Description |
|---|---|---|---|---|
| New | IntegrationEvent | isaAPM_PriceLine (Table 8120267) | OnBeforeSetApplicationBaseActionTxt | Raised at the entry of SetApplicationBaseActionTxt before any action text is computed. Exposes the current PriceLine record, a var Text parameter for ApplicationBaseActionTxt, and a var Boolean IsHandled. When a subscriber sets IsHandled to true, the procedure exits immediately, allowing the action text to be fully replaced by external code. |
| New | IntegrationEvent | isaAPM_PriceLine (Table 8120267) | OnAfterSetApplicationBaseActionTxt | Raised at the end of SetApplicationBaseActionTxt after the action text has been computed by GetApplicationBaseActionTxt. Exposes the current PriceLine record and a var Text parameter for ApplicationBaseActionTxt, allowing subscribers to modify or replace the computed display text. |