#13917 [Main][ALL-E] Posting a Sales Credit Memo with a different Unit of Measure does not convert the quantity before updating the originating Sales Order (Blanket Sales Order is updated correctly)
Fixed a bug where posting a sales credit memo with a different unit of measure failed to convert the quantity before updating the originating sales order, causing incorrect deductions.
- 4files
- 3AL files
- 1objects
Pull request · merged into main (BC30) on 2026-11-18 by sanjmaurya · 4 files (+139 -6), 3 AL · fix · tier official · reviewed (checked by Opus)
What changed
- Credit memo quantities are now converted to the sales order line’s unit of measure before updating shipped and invoiced quantities
- Previously, 8 PCS was incorrectly deducted as 8 SET instead of 2 SET when units differed
- Regression tests added for different, fractional, and matching units of measure scenarios
- Behaviour changes for users or extensions.
AL objects touched
- Codeunit 1303 “Correct Posted Sales Invoice”, Base Application: modified
src/Layers/ES/BaseApp/Sales/History/CorrectPostedSalesInvoice.Codeunit.al: modified, not in the BC30 snapshot
Context
- Work items: AB#658769
- Labels: Team: SCM
- Systems: sales
- From the description: “Convert the credited base quantity using the sales order line’s Qty. per Unit of Measure before updating quantities.”
Possibly related
No source states these links: they share an object, a model read them, or a person found the same subject.
- Correct or cancel a posted sales invoice — possibly related: Documents correcting posted sales invoices and credit memos with quantity conversion (model-linked)
Source: metadata of a merged pull request in microsoft/BCApps (bcapps): title, labels, changed paths and counts, with a summary in our words. No source text and no description beyond one short quote (D10, D61).