---
id: change/bcapps/11968
type: change
title: "#11968 Bug 648782: omit the buyer PartyTaxScheme when the company has no VAT registration"
summary: Purchase order PEPPOL export now omits the PartyTaxScheme block when the company has no VAT registration number, preventing invalid XML validation failures.
tier: official
language: en
tags:
  - fix
  - main
  - bc30
  - codeunit export purchase order peppol30
system: development
review:
  state: reviewed
  by: opus
  at: "2026-10-08T02:03:14.134Z"
  flags: []
generated:
  at: "2026-10-08T01:26:53.141Z"
  pipeline: 0.2.0
  prompts:
    extract-change: 1
  input_hash: 8287973a14228a5baff7cfb27c2fbafeef43b034
evidence:
  - kind: code
    url: https://github.com/microsoft/BCApps/pull/11968
    title: "microsoft/BCApps#11968: Bug 648782: omit the buyer PartyTaxScheme when the company has no VAT registration"
    date: "2026-09-30"
    commit: 8287973a14228a5baff7cfb27c2fbafeef43b034
    t: null
    quote: The block is optional but CompanyID inside it is mandatory, so the Order fails schematron validation.
links:
  learn: []
  objects:
    - object/codeunit/37202
  features: []
  topics: []
  localizations: []
  videos: []
  posts: []
  guidelines: []
  changes: []
number: 11968
repo: microsoft/BCApps
source_id: bcapps-prs
url: https://github.com/microsoft/BCApps/pull/11968
kind: pr
base_branch: main
major: "30"
merged_at: "2026-09-30T14:12:27Z"
author: Explorer986
author_type: User
community_contribution: false
labels:
  - "AL: Apps (W1)"
  - "Ownership: Needs Review"
  - "Team: Other"
change_class: code
change_kind: fix
behavior_change: true
breaking: false
files:
  count: 2
  additions: 71
  deletions: 0
  al: 1
apps:
  - PEPPOL
objects_touched:
  - key: codeunit/37202
    page: codeunit/37202
    type: codeunit
    id: 37202
    name: Export Purchase Order PEPPOL30
    app: PEPPOL
    status: modified
objects_unjoined: []
obsoletions: []
backports: []
fixes_issues: []
work_items:
  - 648782
systems:
  - development
quote: The block is optional but CompanyID inside it is mandatory, so the Order fails schematron validation.
joined_against:
  major: "30"
  commit: ecbc028c25dbe83b61313bc566e6c1d41184bb1c
---

# #11968 Bug 648782: omit the buyer PartyTaxScheme when the company has no VAT registration

> Purchase order PEPPOL export now omits the PartyTaxScheme block when the company has no VAT registration number, preventing invalid XML validation failures.

[Pull request](https://github.com/microsoft/BCApps/pull/11968) · merged into `main` (BC30) on 2026-09-30 by Explorer986 · 2 files (+71 -0), 1 AL · fix · tier official · reviewed (checked by Opus)

## What changed

- PartyTaxScheme block is skipped entirely when VAT Registration No. is empty
- Prevents schema validation errors caused by mandatory CompanyID element inside an otherwise optional block
- Aligns behavior with remittance advice and sales XMLports
- No VAT number fallback to GLN to avoid reporting incorrect tax data
- Low risk change only affecting companies without VAT registration
- Behaviour changes for users or extensions.

## AL objects touched

- [Codeunit 37202 "Export Purchase Order PEPPOL30"](../../objects/codeunit/37202.md), PEPPOL: modified

## Context

- Work items: AB#648782
- Labels: AL: Apps (W1), Ownership: Needs Review, Team: Other
- Systems: development
- From the description: "The block is optional but CompanyID inside it is mandatory, so the Order fails schematron validation."

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