{
  "id": "BR-G-01",
  "country": "EU",
  "syntax": "ubl",
  "group": "export",
  "severity": "fatal",
  "severity_note": "fatal, from the Flag column of the Peppol BIS Billing 3.0 UBL rules index retrieved 2026-10-17.",
  "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 \"Export outside the EU\" shall contain in the VAT breakdown (BG-23) exactly one VAT category code (BT-118) equal with \"Export outside the EU\".",
  "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(.) = 'G']) or exists(//cac:ClassifiedTaxCategory[cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']/cbc:ID[normalize-space(.) = 'G'])) and (count(cac:TaxTotal/cac:TaxSubtotal/cac:TaxCategory[cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']/cbc:ID[normalize-space(.) = 'G']) = 1)) or (not(//cac:TaxCategory[cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']/cbc:ID[normalize-space(.) = 'G']) and not(//cac:ClassifiedTaxCategory[cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']/cbc:ID[normalize-space(.) = 'G']))",
  "meaning": "If a line, a document allowance, or a document charge uses the VAT category \"Export outside the EU\", the VAT breakdown must contain exactly one VAT category code equal with \"Export outside the EU\". The statement asks for exactly one, not at least one. The published test compares that code to G. It passes when no VAT tax category and no classified tax category uses G, and it passes when the VAT breakdown contains exactly one G. A breakdown that already uses G makes the first exists true, so the test does not also require an export line, allowance, or charge.",
  "fix": "Add one VAT breakdown (BG-23) with category code G, and do not add a second G breakdown.",
  "example_fail": "A line, allowance, or charge uses VAT category code G, and the VAT breakdown has no G category or has two.",
  "example_pass": "One of those uses G, and the VAT breakdown has exactly one G 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-G-01/",
  "source_retrieved": "2026-10-17",
  "last_verified": "2026-10-17"
}
