Advanced Price Management
Release : Advanced Price Management 25.0.9509.58406
Description
This hotfix addresses net sales price calculation in Advanced Price Management:
- Corrects rounding of line amounts when using Net Price calculation and discounts.
- Prevents divide-by-zero when posting documents with zero Quantity/Quantity to Invoice on specific lines.
User Stories
No User Story developed in this release.
Bugs
| Title | Description | Technical description | Impact on previous versions |
|---|---|---|---|
| [23092] – Correct net sales price rounding for line amount calculation | In some scenarios using Net Price calculation with discounts, the computed line amount excluding VAT could deviate due to rounding behavior. This release aligns rounding to the Unit-Amount and Amount Rounding Precision consistently across calculations. | Impacted AL objects: Codeunit 8120284 (isaAPM_NetPriceCalculationMgmt), Codeunit 8120285 (isaAPM_NetPriceCalcSubscribers). Logic updated to compute net unit prices consistently per sales UOM and recalculate line amounts with correct rounding. | Non-breaking. Totals may change in edge cases where prior rounding produced a different amount; results now adhere to Business Central rounding precision. |
| [23114] – Prevent divide‑by‑zero when posting with zero quantities | Posting Sales Invoices/Credit Memos that included lines with zero quantities could trigger a divide-by-zero error during net price derivation. The calculation now safely handles zero-quantity lines. | Impacted AL objects: Codeunit 8120284 (isaAPM_NetPriceCalculationMgmt), Codeunit 8120285 (isaAPM_NetPriceCalcSubscribers). In subscribers for Sales Invoice Line and Sales Cr. Memo Line initialization, the effective quantity is guarded and net price computation is performed without division by zero. | Non-breaking. Eliminates runtime errors on zero-quantity lines. Behavior change limited to preventing errors and ensuring a valid net price is stored. |
Events
| Update/New | Event Type | Object | Function | Description |
|---|---|---|---|---|
| Updated | Event Subscriber | Table “Sales Invoice Line” – OnAfterInitFromSalesLine | SalesInvoiceLineOnAfterInitFromSalesLine | Updated computation of isaAPM_NetSalesPriceInSalesUOM: added guard for zero Quantity (effective quantity defaulted) and conditional handling when Unit of Measure equals the sales price UOM to avoid divide-by-zero and ensure correct net price. |
| Updated | Event Subscriber | Table “Sales Cr.Memo Line” – OnAfterInitFromSalesLine | SalesCrMemoLineOnAfterInitFromSalesLine | Updated computation of isaAPM_NetSalesPriceInSalesUOM: added guard for zero Quantity (effective quantity defaulted) and conditional handling when Unit of Measure equals the sales price UOM to avoid divide-by-zero and ensure correct net price. |