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

#9783 [Master] Purchase Return Order Posting Fails for Manually Reserved Lot-Tracked Items with Exact Cost Reversing Mandatory Enabled: "Applies-to Entry must not be filled out when reservations exist in Item Ledger Entry Entry No.='XXX'"

Purchase return order posting now correctly handles manually reserved lot-tracked items when exact cost reversing is mandatory by automatically deriving the applies-to entry from the existing reservation during posting.

Pull request · merged into main (BC30) on 2026-07-31 by Shikhverma · 3 files (+121 -5), 1 AL · fix · tier official · reviewed (checked by Opus)

What changed

  • Fixes posting failure for lot-tracked purchase returns reserved against the receipt entry when Exact Cost Reversing Mandatory is enabled
  • When the return line is fully reserved against an item ledger entry and Appl.-to Item Entry is blank, the value is derived from the reserved entry
  • No manual entry of the exact-cost link is needed any more
  • Change made in the Purch. Line-Reserve codeunit; new test added and existing costing test adjusted
  • Behaviour changes for users or extensions.

AL objects touched

Context

  • Work items: AB#644262
  • 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).