{
  "id": "BR-O-02",
  "country": "EU",
  "syntax": "ubl",
  "group": "not-subject",
  "severity": "fatal",
  "severity_note": "fatal, from the Flag column of the Peppol BIS Billing 3.0 UBL rules index retrieved 2026-10-18.",
  "spec": "Peppol BIS Billing 3.0, May 2026 release, EN 16931 model bound to UBL",
  "statement": "An Invoice that contains an Invoice line (BG-25) where the Invoiced item VAT category code (BT-151) is \"Not subject to VAT\" shall not contain the Seller VAT identifier (BT-31), the Seller tax representative VAT identifier (BT-63) or the Buyer VAT identifier (BT-48).",
  "statement_lang": "en",
  "context": "/ubl:Invoice | /cn:CreditNote",
  "test": "(exists(//cac:ClassifiedTaxCategory[normalize-space(cbc:ID) = 'O'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']) and (not(//cac:AccountingSupplierParty/cac:Party/cac:PartyTaxScheme[cac:TaxScheme/(normalize-space(upper-case(cbc:ID)) = 'VAT')]/cbc:CompanyID) and not(//cac:TaxRepresentativeParty/cac:PartyTaxScheme[cac:TaxScheme/(normalize-space(upper-case(cbc:ID)) = 'VAT')]/cbc:CompanyID) and not(//cac:AccountingCustomerParty/cac:Party/cac:PartyTaxScheme[cac:TaxScheme/(normalize-space(upper-case(cbc:ID)) = 'VAT')]/cbc:CompanyID))) or not(//cac:ClassifiedTaxCategory[normalize-space(cbc:ID) = 'O'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT'])",
  "meaning": "If an invoice line uses VAT category \"Not subject to VAT\", the invoice must not contain the seller VAT identifier (BT-31), the seller tax representative VAT identifier (BT-63), or the buyer VAT identifier (BT-48). The official message says \"shall not contain\" and writes \"identifier\" with a lowercase i. It names BG-25. It does not name BT-32 or BT-47. The published test looks for a line category code O whose tax scheme is VAT, and it requires those three company identifiers to be absent. The line category comparison is normalize-space(cbc:ID) = 'O' with spaces around =. The line tax-scheme comparison is cbc:ID)='VAT' with no space before =. Each identifier check writes (normalize-space(upper-case(cbc:ID)) = 'VAT') with spaces around =. The negative branch is not(//cac:ClassifiedTaxCategory...) and does not call exists.",
  "fix": "On a line coded O, leave out BT-31, BT-63, and BT-48.",
  "example_fail": "A line uses category code O, and BT-31, BT-63, or BT-48 is present.",
  "example_pass": "A line uses O, and BT-31, BT-63, and BT-48 are absent.",
  "example_note": "Illustration of the condition in the official statement. Not an example published by the source.",
  "source_url": "https://docs.peppol.eu/poacc/billing/3.0/rules/ubl-tc434/BR-O-02/",
  "source_retrieved": "2026-10-18",
  "last_verified": "2026-10-18"
}
