code change · fixPlatform, DevOps & Performanceofficial - Microsoftreviewed - checked by Opus

#13479 [29.x][ALL-E] Canceling a posted purchase invoice fails or misallocates item charges assigned to posted document types other than Purchase Receipts

Fixed a bug where canceling a posted purchase invoice could fail or reverse item charges incorrectly when charges were assigned to documents other than Purchase Receipts. The fix now handles all supported document types and uses the correct cost amount field for each.

Pull request · merged into releases/29.x (BC29) on 2026-11-30 by sanjmaurya · 10 files (+980 -124), 8 AL · fix · tier official · reviewed (checked by Opus)

What changed

  • Canceling a posted purchase invoice now recreates item charge assignments for Purchase Receipt, Transfer Receipt, Purchase Return Shipment, Sales Shipment and Sales Return Receipt
  • Cost Amount (Non-Invtbl.) is used for Purchase Return Shipment and Sales Shipment; Cost Amount (Actual) is used for the other targets
  • Rounding is based only on supported value entries, so skipped targets no longer shift quantities to the remaining assignments
  • Changes are in Copy Document Mgt. across several layers, with small edits to the purchase and sales item charge assignment codeunits
  • Behaviour changes for users or extensions.

AL objects touched

Context

  • Work items: AB#657337
  • Labels: Ownership: Needs Review, Team: Other
  • Systems: platform, purchasing, sales

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