---
id: change/bcapps/9080
type: change
title: "#9080 Bug 635072: Subcontracting order uses Prod. Order Line location, not Work Center"
summary: The subcontracting order creation process now consistently uses the production order line location instead of the work center location when creating purchase orders, aligning with the worksheet calculation path.
tier: official
language: en
tags:
  - fix
  - main
  - bc30
  - codeunit subc. purchase order creator
system: manufacturing
review:
  state: reviewed
  by: opus
  at: "2026-10-08T02:13:37.791Z"
  flags: []
generated:
  at: "2026-10-08T01:26:53.141Z"
  pipeline: 0.2.0
  prompts:
    extract-change: 1
  input_hash: 87507fd1404295e44fe815d0fa4dae16beae5a0c
evidence:
  - kind: code
    url: https://github.com/microsoft/BCApps/pull/9080
    title: "microsoft/BCApps#9080: Bug 635072: Subcontracting order uses Prod. Order Line location, not Work Center"
    date: "2026-07-08"
    commit: 87507fd1404295e44fe815d0fa4dae16beae5a0c
    t: null
    quote: Standardize on the Prod. Order Line location to match the two existing correct implementations.
links:
  learn: []
  objects:
    - object/codeunit/20557
  features: []
  topics: []
  localizations: []
  videos: []
  posts: []
  guidelines: []
  changes: []
number: 9080
repo: microsoft/BCApps
source_id: bcapps-prs
url: https://github.com/microsoft/BCApps/pull/9080
kind: pr
base_branch: main
major: "30"
merged_at: "2026-07-08T10:20:50Z"
author: alexei-dobriansky
author_type: User
community_contribution: false
labels:
  - "AL: Apps (W1)"
  - Subcontracting
  - "Team: SCM"
change_class: code
change_kind: fix
behavior_change: true
breaking: false
files:
  count: 2
  additions: 46
  deletions: 7
  al: 1
apps:
  - Subcontracting
objects_touched:
  - key: codeunit/20557
    page: codeunit/20557
    type: codeunit
    id: 20557
    name: Subc. Purchase Order Creator
    app: Subcontracting
    status: modified
objects_unjoined: []
obsoletions: []
backports: []
fixes_issues: []
work_items:
  - 635072
systems:
  - manufacturing
quote: Standardize on the Prod. Order Line location to match the two existing correct implementations.
joined_against:
  major: "30"
  commit: ecbc028c25dbe83b61313bc566e6c1d41184bb1c
---

# #9080 Bug 635072: Subcontracting order uses Prod. Order Line location, not Work Center

> The subcontracting order creation process now consistently uses the production order line location instead of the work center location when creating purchase orders, aligning with the worksheet calculation path.

[Pull request](https://github.com/microsoft/BCApps/pull/9080) · merged into `main` (BC30) on 2026-07-08 by alexei-dobriansky · 2 files (+46 -7), 1 AL · fix · tier official · reviewed (checked by Opus)

## What changed

- The InsertReqWkshLine function previously overrode requisition line locations with work center locations
- Both Create Subcontracting Order and CalculateSubcontracts paths now use production order line location consistently
- Test coverage added to verify location handling in subcontracting workflows
- Behaviour changes for users or extensions.

## AL objects touched

- [Codeunit 20557 "Subc. Purchase Order Creator"](../../objects/codeunit/20557.md), Subcontracting: modified

## Context

- Work items: AB#635072
- Labels: AL: Apps (W1), Subcontracting, Team: SCM
- Systems: manufacturing
- From the description: "Standardize on the Prod. Order Line location to match the two existing correct implementations."

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