---
id: change/bcapps/10522
type: change
title: "#10522 [main] Bug 647499 Bin Replenishment with Pick by FEFO Creates Incorrect Inventory Movements"
summary: Fixed bin replenishment with FEFO-based picking to correctly calculate quantities and clear processed worksheet lines in basic warehouse locations.
tier: official
language: en
tags:
  - fix
  - main
  - bc30
  - codeunit create inventory pick/movement
system: warehouse
review:
  state: reviewed
  by: opus
  at: "2026-10-08T02:07:27.278Z"
  flags: []
generated:
  at: "2026-10-08T01:26:53.141Z"
  pipeline: 0.2.0
  prompts:
    extract-change: 1
  input_hash: 65c74a5015783211023aa073af95867aca954c12
evidence:
  - kind: code
    url: https://github.com/microsoft/BCApps/pull/10522
    title: "microsoft/BCApps#10522: [main] Bug 647499 Bin Replenishment with Pick by FEFO Creates Incorrect Inventory Movements"
    date: "2026-08-27"
    commit: 65c74a5015783211023aa073af95867aca954c12
    t: null
    quote: Bin Replenishment with Pick by FEFO Creates Incorrect Inventory Movements and Leaves Movement Worksheet Lines Unprocessed
links:
  learn: []
  objects:
    - object/codeunit/7322
  features: []
  topics: []
  localizations: []
  videos: []
  posts: []
  guidelines: []
  changes: []
number: 10522
repo: microsoft/BCApps
source_id: bcapps-prs
url: https://github.com/microsoft/BCApps/pull/10522
kind: pr
base_branch: main
major: "30"
merged_at: "2026-08-27T15:12:28Z"
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: 162
  deletions: 3
  al: 1
apps:
  - Base Application
objects_touched:
  - key: codeunit/7322
    page: codeunit/7322
    type: codeunit
    id: 7322
    name: Create Inventory Pick/Movement
    app: Base Application
    status: modified
objects_unjoined: []
obsoletions: []
backports: []
fixes_issues: []
work_items:
  - 647499
systems:
  - warehouse
quote: Bin Replenishment with Pick by FEFO Creates Incorrect Inventory Movements and Leaves Movement Worksheet Lines Unprocessed
joined_against:
  major: "30"
  commit: ecbc028c25dbe83b61313bc566e6c1d41184bb1c
---

# #10522 [main] Bug 647499 Bin Replenishment with Pick by FEFO Creates Incorrect Inventory Movements

> Fixed bin replenishment with FEFO-based picking to correctly calculate quantities and clear processed worksheet lines in basic warehouse locations.

[Pull request](https://github.com/microsoft/BCApps/pull/10522) · merged into `main` (BC30) on 2026-08-27 by MSNehaNawal · 2 files (+162 -3), 1 AL · fix · tier official · reviewed (checked by Opus)

## What changed

- FEFO inventory movements now exclude the destination bin when calculating available quantity to pick, ensuring correct lot selection and full quantity fulfillment
- Handled warehouse activity buffers for FEFO movements are now recorded with blank From Bin to match worksheet lines and enable proper deletion of processed lines
- Prevents incorrect inventory movements and unprocessed worksheet lines that occurred when the earliest FEFO lot was already in the replenishment bin
- Behaviour changes for users or extensions.

## AL objects touched

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

## Context

- Work items: AB#647499
- Labels: Team: SCM
- Systems: warehouse
- From the description: "Bin Replenishment with Pick by FEFO Creates Incorrect Inventory Movements and Leaves Movement Worksheet Lines Unprocessed"

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