---
id: change/bcapps/10924
type: change
title: "#10924 [main] Bug 648630 Movement Worksheet Creates Incorrect Warehouse Movement for FEFO Lot-Tracked Items"
summary: Fixed availability calculation in Create Pick codeunit to exclude outbound quantities when calculating available inventory for warehouse movements of FEFO lot-tracked items, preventing the worksheet from selecting already-committed lots.
tier: official
language: en
tags:
  - fix
  - main
  - bc30
  - codeunit create pick
system: warehouse
review:
  state: reviewed
  by: opus
  at: "2026-10-08T02:06:16.324Z"
  flags: []
generated:
  at: "2026-10-08T01:26:53.141Z"
  pipeline: 0.2.0
  prompts:
    extract-change: 1
  input_hash: b0ddbf3eca7ef6a105b124a0b93985ba55d07856
evidence:
  - kind: code
    url: https://github.com/microsoft/BCApps/pull/10924
    title: "microsoft/BCApps#10924: [main] Bug 648630 Movement Worksheet Creates Incorrect Warehouse Movement for FEFO Lot-Tracked Items"
    date: "2026-09-07"
    commit: b0ddbf3eca7ef6a105b124a0b93985ba55d07856
    t: null
    quote: Movement Worksheet Creates Incorrect Warehouse Movement for FEFO Lot-Tracked Items When Picked-Not-Shipped and Pending Picks Exist.
links:
  learn: []
  objects:
    - object/codeunit/7312
  features: []
  topics: []
  localizations: []
  videos: []
  posts: []
  guidelines: []
  changes: []
number: 10924
repo: microsoft/BCApps
source_id: bcapps-prs
url: https://github.com/microsoft/BCApps/pull/10924
kind: pr
base_branch: main
major: "30"
merged_at: "2026-09-07T14:25:42Z"
author: MSNehaNawal
author_type: User
community_contribution: false
labels:
  - "Team: SCM"
change_class: code
change_kind: fix
behavior_change: true
breaking: false
files:
  count: 2
  additions: 219
  deletions: 0
  al: 1
apps:
  - Base Application
objects_touched:
  - key: codeunit/7312
    page: codeunit/7312
    type: codeunit
    id: 7312
    name: Create Pick
    app: Base Application
    status: modified
objects_unjoined: []
obsoletions: []
backports: []
fixes_issues: []
work_items:
  - 648630
systems:
  - warehouse
quote: Movement Worksheet Creates Incorrect Warehouse Movement for FEFO Lot-Tracked Items When Picked-Not-Shipped and Pending Picks Exist.
joined_against:
  major: "30"
  commit: ecbc028c25dbe83b61313bc566e6c1d41184bb1c
---

# #10924 [main] Bug 648630 Movement Worksheet Creates Incorrect Warehouse Movement for FEFO Lot-Tracked Items

> Fixed availability calculation in Create Pick codeunit to exclude outbound quantities when calculating available inventory for warehouse movements of FEFO lot-tracked items, preventing the worksheet from selecting already-committed lots.

[Pull request](https://github.com/microsoft/BCApps/pull/10924) · merged into `main` (BC30) on 2026-09-07 by MSNehaNawal · 2 files (+219 -0), 1 AL · fix · tier official · reviewed (checked by Opus)

## What changed

- CalcTotalAvailQtyToPick in Create Pick now subtracts quantity already in outbound bins when called from the Movement Worksheet
- The adjusted quantity is clamped at zero before being added to total available quantity
- Movement Worksheet now picks the next available FEFO lot instead of one already committed to sales orders
- Fixes a regression for lot-tracked items with picked-not-shipped quantities and pending picks
- Adds regression tests in the SCM movement test codeunit
- Behaviour changes for users or extensions.

## AL objects touched

- [Codeunit 7312 "Create Pick"](../../objects/codeunit/7312.md), Base Application: modified

## Context

- Work items: AB#648630
- Labels: Team: SCM
- Systems: warehouse
- From the description: "Movement Worksheet Creates Incorrect Warehouse Movement for FEFO Lot-Tracked Items When Picked-Not-Shipped and Pending Picks Exist."

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