{
  "id": "BR-O-01",
  "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), a Document level allowance (BG-20) or a Document level charge (BG-21) where the VAT category code (BT-151, BT-95 or BT-102) is \"Not subject to VAT\" shall contain exactly one VAT breakdown group (BG-23) with the VAT category code (BT-118) equal to \"Not subject to VAT\".",
  "statement_lang": "en",
  "context": "/ubl:Invoice | /cn:CreditNote",
  "test": "((exists(//cac:TaxCategory[cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']/cbc:ID[normalize-space(.) = 'O']) or exists(//cac:ClassifiedTaxCategory[cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']/cbc:ID[normalize-space(.) = 'O'])) and (count(cac:TaxTotal/cac:TaxSubtotal/cac:TaxCategory[cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']/cbc:ID[normalize-space(.) = 'O']) = 1)) or (not(//cac:TaxCategory[cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']/cbc:ID[normalize-space(.) = 'O']) and not(//cac:ClassifiedTaxCategory[cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']/cbc:ID[normalize-space(.) = 'O']))",
  "meaning": "If a line, a document allowance, or a document charge uses the VAT category \"Not subject to VAT\", the invoice must contain exactly one VAT breakdown group (BG-23) with category code equal to \"Not subject to VAT\". The statement says \"exactly one VAT breakdown group\" and \"equal to\". It does not say \"equal with\", and it does not say \"exactly one VAT category code\". The published test compares that code to O. It passes when no VAT tax category and no classified tax category uses O, and it passes when the VAT breakdown contains exactly one O. An O breakdown makes the first exists true, so the test does not also require a not-subject line, allowance, or charge. The negative branch is not(...) and does not call exists. The tax-scheme comparison is written cbc:ID)='VAT' with no space before =. The category comparison is normalize-space(.) = 'O' with spaces around =.",
  "fix": "Add one VAT breakdown group (BG-23) with category code O, and do not add a second O breakdown.",
  "example_fail": "A line, allowance, or charge uses VAT category code O, and the VAT breakdown has no O category or has two.",
  "example_pass": "One of those uses O, and the VAT breakdown has exactly one O category.",
  "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-01/",
  "source_retrieved": "2026-10-18",
  "last_verified": "2026-10-18"
}
