#13417 [Master]-Sales Order line quantities are incorrectly updated after posting a Return Order linked to a Posted Sales Invoice via Applies-to Doc. No. on a Credit Memo.
Posting a return order that is linked to a posted sales invoice through Applies-to Doc. No. on a credit memo no longer updates the original sales order line quantities incorrectly. The fix is in Correct Posted Sales Invoice for the W1, APAC and ES layers, with new tests.
- 5files
- 3AL files
- 1objects
Pull request · merged into main (BC30) on 2026-11-02 by neeleshsinghal · 5 files (+202 -0), 3 AL · fix · tier official · reviewed (checked by Opus)
What changed
- Fixes issue where return order posting incorrectly adjusted sales order line quantities
- Involves credit memo applies-to document links to posted invoices
- Changes made to correct posted sales invoice codeunit across regions
- Added test coverage for the purchase/sales copy document scenario
- 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#657201
- Labels: Team: SCM
- Systems: sales
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 via credit memos and return order linking (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).