---
id: change/bcapps/10524
type: change
title: "#10524 Add a purchase order matching API"
summary: New public codeunits in the Base Application let other apps, starting with E-Documents, create Matched Order Line records through a validated match group. A helper suggests receipts that could cover the remaining amount to invoice on an order.
tier: official
language: en
tags:
  - feature
  - main
  - bc30
  - codeunit invoiceable receipts
  - codeunit po matching
  - codeunit po matching group
system: inventory
review:
  state: reviewed
  by: opus
  at: "2026-10-08T02:07:26.119Z"
  flags: []
generated:
  at: "2026-10-08T01:26:53.141Z"
  pipeline: 0.2.0
  prompts:
    extract-change: 1
  input_hash: c7451ebed589b3f2e3d56754cd5b50fc9a3ec38a
evidence:
  - kind: code
    url: https://github.com/microsoft/BCApps/pull/10524
    title: "microsoft/BCApps#10524: Add a purchase order matching API"
    date: "2026-08-28"
    commit: c7451ebed589b3f2e3d56754cd5b50fc9a3ec38a
    t: null
    quote: null
links:
  learn: []
  objects:
    - object/codeunit/5828
    - object/codeunit/5831
    - object/codeunit/5829
  features: []
  topics: []
  localizations: []
  videos: []
  posts: []
  guidelines: []
  changes: []
number: 10524
repo: microsoft/BCApps
source_id: bcapps-prs
url: https://github.com/microsoft/BCApps/pull/10524
kind: pr
base_branch: main
major: "30"
merged_at: "2026-08-28T09:32:08Z"
author: mynjj
author_type: User
community_contribution: false
labels:
  - "Team: SCM"
change_class: code
change_kind: feature
behavior_change: false
breaking: false
files:
  count: 4
  additions: 2107
  deletions: 0
  al: 3
apps:
  - Base Application
objects_touched:
  - key: codeunit/5828
    page: codeunit/5828
    type: codeunit
    id: 5828
    name: Invoiceable Receipts
    app: Base Application
    status: added
  - key: codeunit/5831
    page: codeunit/5831
    type: codeunit
    id: 5831
    name: PO Matching
    app: Base Application
    status: added
  - key: codeunit/5829
    page: codeunit/5829
    type: codeunit
    id: 5829
    name: PO Matching Group
    app: Base Application
    status: added
objects_unjoined: []
obsoletions: []
backports: []
fixes_issues: []
work_items:
  - 625392
systems:
  - inventory
quote: null
joined_against:
  major: "30"
  commit: ecbc028c25dbe83b61313bc566e6c1d41184bb1c
---

# #10524 Add a purchase order matching API

> New public codeunits in the Base Application let other apps, starting with E-Documents, create Matched Order Line records through a validated match group. A helper suggests receipts that could cover the remaining amount to invoice on an order.

[Pull request](https://github.com/microsoft/BCApps/pull/10524) · merged into `main` (BC30) on 2026-08-28 by mynjj · 4 files (+2107 -0), 3 AL · feature · tier official · reviewed (checked by Opus)

## What changed

- New public codeunits act as a facade for inserting Matched Order Line records
- PO Matching Group buffers matches and validates quantities, prepayment and item tracking rules as each match is added
- Existing persisted matches are discovered breadth-first and loaded so validations consider them
- Iterators expose the buffered matches and the invoiceable receipts
- Additive change; existing BaseApp matching logic is not changed

## AL objects touched

- [Codeunit 5828 "Invoiceable Receipts"](../../objects/codeunit/5828.md), Base Application: added
- [Codeunit 5831 "PO Matching"](../../objects/codeunit/5831.md), Base Application: added
- [Codeunit 5829 "PO Matching Group"](../../objects/codeunit/5829.md), Base Application: added

## Context

- Work items: AB#625392
- Labels: Team: SCM
- Systems: inventory

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