code change · fixWarehouseofficial - Microsoftreviewed - checked by Opus

#10795 [master] Discrepancy in inventory picks when the quantity exceeds the available inventory.

Fixed a calculation error in inventory pick creation that was incorrectly dropping shortage lines when availability exceeded demand with the 'Always Create Pick Line' setting enabled.

Pull request · merged into main (BC30) on 2026-09-03 by neeleshsinghal · 2 files (+97 -1), 1 AL · fix · tier official · reviewed (checked by Opus)

What changed

  • Corrected fallback formula that was subtracting too much, causing blank-bin quantity to become zero or negative
  • Applied Minimum() function to cap availability at the original remaining quantity to pick
  • Restores missing shortage lines for un-pickable remainders in production inventory picks
  • Does not affect normal cases where availability is less than demand
  • Added test coverage for the production warehouse handling scenario
  • Behaviour changes for users or extensions.

AL objects touched

Context

  • Work items: AB#648374
  • Labels: Team: SCM
  • Systems: warehouse
  • From the description: “Cap availability with Minimum(QtyAvailToPickBase, OriginalRemQtyToPickBase), restoring the shortage line without affecting the normal case.”

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