#13547 [29.X]-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
The correct posted sales invoice functionality now properly handles return orders linked to posted sales invoices through applies-to document numbers on credit memos, fixing incorrect line quantity updates.
- 5files
- 3AL files
- 1objects
Pull request · merged into releases/29.x (BC29) on 2026-11-03 by neeleshsinghal · 5 files (+202 -0), 3 AL · fix · tier official · reviewed (checked by Opus)
What changed
- Corrects quantity update logic when return orders reference posted sales invoices via applies-to field
- Addresses issue where sales order line quantities were incorrectly modified after posting
- Includes test coverage for the copy purchase and sales documents functionality
- Changes applied across multiple localization layers (W1, ES, APAC)
- 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 BC29 snapshot
Context
- Work items: AB#657706
- 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 or canceling posted sales invoices and the related reversals and credit memo creation. (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).