code change · fixInventoryofficial - Microsoftreviewed - checked by Opus

#12153 [Main]-Adjust Cost Creates an Output Value Entry with Entry Type = Variance and Expected Cost = Yes After Reversing a Finished Production Order.

Fixed a bug where reversing a finished production order and reposting output caused Adjust Cost to create variance value entries incorrectly marked as expected cost instead of actual cost, preventing Post Inventory Cost to G/L from completing.

Pull request · merged into main (BC30) on 2026-11-26 by DhavalMore88 (community contribution) · 4 files (+202 -3), 3 AL · fix · tier official · reviewed (checked by Opus)

What changed

  • Variance and Indirect Cost entries with zero invoiced quantity now use Valued Quantity instead when posting actual cost adjustments
  • New local procedure GetActualCostAdjmtInvoicedQty determines the correct quantity for posting based on entry type
  • Prevents expected cost flag from being incorrectly set on actual cost adjustments for variance entries
  • Resolves Post Inventory Cost to G/L failures on standard cost items after production order reopening
  • Fix applied across W1, APAC, and RU layers with new test coverage
  • Behaviour changes for users or extensions.

AL objects touched

Context

  • Work items: AB#653000
  • Labels: ADO: Sync, From Fork, Team: SCM
  • Systems: inventory
  • From the description: “Fixed in codeunit 5895 “Inventory Adjustment” (W1, APAC, RU layers), as suggested in review”

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