code change · fixAL Developmentofficial - Microsoftreviewed - checked by Opus

#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 · 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

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