---
id: change/bcapps/9797
type: change
title: "#9797 Bug 641388: Fix WIP transfer remainder over-creation when open line quantity is reduced"
summary: Fixed a bug in the Create Transfer Order to Subcontractor report where reducing an open WIP transfer line quantity caused incorrect duplicate lines to be created instead of properly tracking the remainder.
tier: official
language: en
tags:
  - fix
  - main
  - bc30
  - report subc. create transf. order
system: manufacturing
review:
  state: reviewed
  by: opus
  at: "2026-10-08T02:10:29.855Z"
  flags: []
generated:
  at: "2026-10-08T01:26:53.141Z"
  pipeline: 0.2.0
  prompts:
    extract-change: 1
  input_hash: 50dcc04baf4fbde30b1f160bb0f679f6c14bab1a
evidence:
  - kind: code
    url: https://github.com/microsoft/BCApps/pull/9797
    title: "microsoft/BCApps#9797: Bug 641388: Fix WIP transfer remainder over-creation when open line quantity is reduced"
    date: "2026-07-31"
    commit: 50dcc04baf4fbde30b1f160bb0f679f6c14bab1a
    t: null
    quote: null
links:
  learn: []
  objects:
    - object/report/20501
  features: []
  topics: []
  localizations: []
  videos: []
  posts: []
  guidelines: []
  changes: []
number: 9797
repo: microsoft/BCApps
source_id: bcapps-prs
url: https://github.com/microsoft/BCApps/pull/9797
kind: pr
base_branch: main
major: "30"
merged_at: "2026-07-31T10:50:27Z"
author: ChethanT
author_type: User
community_contribution: false
labels:
  - "AL: Apps (W1)"
  - "Team: SCM"
change_class: code
change_kind: fix
behavior_change: true
breaking: false
files:
  count: 2
  additions: 20
  deletions: 10
  al: 1
apps:
  - Subcontracting
objects_touched:
  - key: report/20501
    page: report/20501
    type: report
    id: 20501
    name: Subc. Create Transf. Order
    app: Subcontracting
    status: modified
objects_unjoined: []
obsoletions: []
backports: []
fixes_issues: []
work_items:
  - 641388
systems:
  - manufacturing
quote: null
joined_against:
  major: "30"
  commit: ecbc028c25dbe83b61313bc566e6c1d41184bb1c
---

# #9797 Bug 641388: Fix WIP transfer remainder over-creation when open line quantity is reduced

> Fixed a bug in the Create Transfer Order to Subcontractor report where reducing an open WIP transfer line quantity caused incorrect duplicate lines to be created instead of properly tracking the remainder.

[Pull request](https://github.com/microsoft/BCApps/pull/9797) · merged into `main` (BC30) on 2026-07-31 by ChethanT · 2 files (+20 -10), 1 AL · fix · tier official · reviewed (checked by Opus)

## What changed

- Corrected quantity calculation for open WIP transfer lines by using Quantity field instead of the zero-valued Quantity (Base) field
- Implemented proper conversion to base unit of measure using the same factor applied elsewhere in the report
- Re-enabled the previously disabled regression test WIPTransferRemainderCreatedWhenOpenLineQuantityReduced which now passes
- Validated all 19 tests in the Subc. WIP Trans. Create Test suite with no regressions
- Behaviour changes for users or extensions.

## AL objects touched

- [Report 20501 "Subc. Create Transf. Order"](../../objects/report/20501.md), Subcontracting: modified

## Context

- Work items: AB#641388
- Labels: AL: Apps (W1), Team: SCM
- Systems: manufacturing

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