code change · fixPurchasing & Payablesofficial - Microsoftreviewed - checked by Opus

#10611 [main]- Bug 647007 Copy Document on a Purchase Credit Memo 'Quantity Received', and 'Quantity Invoiced' reverted back on original Purchase Order

Posting a purchase credit memo created with Copy Document from a posted invoice no longer reverts the received and invoiced quantities on the original purchase order. GetPurchaseInvoiceLine now skips the Order No./Order Line No. fallback for inventory item lines without a linked item ledger entry.

Pull request · merged into main (BC30) on 2026-08-27 by MSNehaNawal · 18 files (+521 -16), 11 AL · fix · tier official · reviewed (checked by Opus)

What changed

  • The Purchase Cr. Memo Line table gains logic to detect whether a credit memo is corrective or merely copied
  • Posting a copied credit memo no longer reverts the source purchase order line quantities
  • Corrective credit memos with item ledger entry links continue to work as designed
  • Added test cases to verify quantities remain correct after posting copied credit memos
  • The fix applies across all localization layers (W1, NA, BE, ES, FI, GB, IT, NO, RU, SE, APAC)
  • Behaviour changes for users or extensions.

AL objects touched

Context

  • Work items: AB#647007
  • Labels: Team: SCM
  • Systems: purchasing

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).