{
  "id": "BR-O-11",
  "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 a VAT breakdown group (BG-23) with a VAT category code (BT-118) \"Not subject to VAT\" shall not contain other VAT breakdown groups (BG-23).",
  "statement_lang": "en",
  "context": "/ubl:Invoice | /cn:CreditNote",
  "test": "(exists(cac:TaxTotal/cac:TaxSubtotal/cac:TaxCategory[cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']/cbc:ID[normalize-space(.) = 'O']) and count(cac:TaxTotal/cac:TaxSubtotal/cac:TaxCategory[normalize-space(cbc:ID) != 'O'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']) = 0) or not(cac:TaxTotal/cac:TaxSubtotal/cac:TaxCategory[cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']/cbc:ID[normalize-space(.) = 'O'])",
  "meaning": "If a VAT breakdown uses the category \"Not subject to VAT\", the invoice must not contain other VAT breakdown groups (BG-23). The official message says \"other VAT breakdown groups\" in the plural. It does not name a seller or buyer identifier, and it does not mention a VAT rate. The quoted category name has no space after the opening quote. The published test passes when no O VAT breakdown exists, because the negative branch is not(...) and does not call exists. When an O breakdown exists, the count of VAT tax categories whose code is not O must be 0. That count is a relative path, not a descendant search, and a second O category is not in it. The positive branch calls exists. The tax-scheme comparison is cbc:ID)='VAT' with no space before =. The O comparison is normalize-space(.) = 'O' with spaces around =. The other-category comparison is normalize-space(cbc:ID) != 'O' with spaces around !=.",
  "fix": "When a VAT breakdown is category O, do not add another VAT breakdown group with a different category code.",
  "example_fail": "The invoice has an O VAT breakdown and another VAT breakdown whose category code is not O.",
  "example_pass": "The only VAT tax category is O, or the invoice has no O VAT breakdown.",
  "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-11/",
  "source_retrieved": "2026-10-18",
  "last_verified": "2026-10-18"
}
