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

#13344 [29.x]- 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 made by copying a posted invoice no longer reverts the received and invoiced quantities on the original purchase order. GetPurchaseInvoiceLine now skips the Order No. fallback for inventory item lines with no linked item ledger entry, while the corrective credit memo flow still reverts as designed.

Pull request · merged into releases/29.x (BC29) on 2026-11-10 by MSNehaNawal · 18 files (+554 -16), 11 AL · fix · tier official · reviewed (checked by Opus)

What changed

  • New IsCorrectiveCreditMemo helper adds an early exit in Purch. Cr. Memo Line GetPurchaseInvoiceLine
  • For inventory item lines with no linked item ledger entry, the Order No. / Order Line No. fallback is skipped
  • Corrective credit memos that apply item ledger entries still revert the order as before
  • Table change made in the W1, NA, BE, ES, FI, GB, IT, NO, APAC, RU and SE layers
  • Tests added in W1, NA, BE, CZ and IT; background posting tests adjusted
  • Behaviour changes for users or extensions.

AL objects touched

Context

  • Work items: AB#656989
  • Labels: Team: SCM
  • Systems: purchasing
  • From the description: “when there is no linked item ledger entry and the line is an inventory item, skip the Order No. / Order Line No. fallback”

No source states these links: they share an object, a model read them, or a person found the same subject.

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