---
id: change/bcapps/11134
type: change
title: "#11134 [Main][All-E][Repair Item] Posted Purchase Invoice Order No. is blank when invoice rounding creates a generated line"
summary: Posted purchase invoice now correctly shows the Order No. from the source purchase order even when invoice rounding creates a system-generated line.
tier: official
language: en
tags:
  - fix
  - main
  - bc30
  - codeunit purch.-post
system: purchasing
review:
  state: reviewed
  by: opus
  at: "2026-10-08T02:05:51.095Z"
  flags: []
generated:
  at: "2026-10-08T01:26:53.141Z"
  pipeline: 0.2.0
  prompts:
    extract-change: 1
  input_hash: a3766339eecc0f98392aadd161f3d5fcadd9c48a
evidence:
  - kind: code
    url: https://github.com/microsoft/BCApps/pull/11134
    title: "microsoft/BCApps#11134: [Main][All-E][Repair Item] Posted Purchase Invoice Order No. is blank when invoice rounding creates a generated line"
    date: "2026-09-08"
    commit: a3766339eecc0f98392aadd161f3d5fcadd9c48a
    t: null
    quote: Ignore valid system-generated invoice rounding lines when determining whether all posted purchase invoice lines belong to the same purchase order.
links:
  learn: []
  objects:
    - object/codeunit/90
  features: []
  topics: []
  localizations: []
  videos: []
  posts: []
  guidelines: []
  changes: []
number: 11134
repo: microsoft/BCApps
source_id: bcapps-prs
url: https://github.com/microsoft/BCApps/pull/11134
kind: pr
base_branch: main
major: "30"
merged_at: "2026-09-08T12:39:04Z"
author: sanjmaurya
author_type: User
community_contribution: false
labels:
  - "Team: SCM"
change_class: code
change_kind: fix
behavior_change: true
breaking: false
files:
  count: 15
  additions: 815
  deletions: 50
  al: 10
apps:
  - Base Application
objects_touched:
  - key: codeunit/90
    page: codeunit/90
    type: codeunit
    id: 90
    name: Purch.-Post
    app: Base Application
    status: modified
objects_unjoined: []
obsoletions: []
backports: []
fixes_issues: []
work_items:
  - 647878
systems:
  - purchasing
quote: Ignore valid system-generated invoice rounding lines when determining whether all posted purchase invoice lines belong to the same purchase order.
joined_against:
  major: "30"
  commit: ecbc028c25dbe83b61313bc566e6c1d41184bb1c
---

# #11134 [Main][All-E][Repair Item] Posted Purchase Invoice Order No. is blank when invoice rounding creates a generated line

> Posted purchase invoice now correctly shows the Order No. from the source purchase order even when invoice rounding creates a system-generated line.

[Pull request](https://github.com/microsoft/BCApps/pull/11134) · merged into `main` (BC30) on 2026-09-08 by sanjmaurya · 15 files (+815 -50), 10 AL · fix · tier official · reviewed (checked by Opus)

## What changed

- System-generated invoice rounding lines are now excluded when checking if all lines belong to the same purchase order
- Ensures Order No. is properly copied to posted purchase invoice headers
- Other lines with blank or different Order No. values still prevent header population
- Regression tests added for single-order, multiple-order, and manual-line scenarios
- Behaviour changes for users or extensions.

## AL objects touched

- [Codeunit 90 "Purch.-Post"](../../objects/codeunit/90.md), Base Application: modified

## Context

- Work items: AB#647878
- Labels: Team: SCM
- Systems: purchasing
- From the description: "Ignore valid system-generated invoice rounding lines when determining whether all posted purchase invoice lines belong to the same purchase order."

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