{
  "id": "BR-AE-04",
  "country": "EU",
  "syntax": "ubl",
  "group": "reverse-charge",
  "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 a Document level charge (BG-21) where the Document level charge VAT category code (BT-102) is \"Reverse charge\" shall contain the Seller VAT Identifier (BT-31), the Seller tax registration identifier (BT-32) and/or the Seller tax representative VAT identifier (BT-63) and the Buyer VAT identifier (BT-48) and/or the Buyer legal registration identifier (BT-47).",
  "statement_lang": "en",
  "context": "/ubl:Invoice | /cn:CreditNote",
  "test": "(exists(//cac:AllowanceCharge[cbc:ChargeIndicator=true()]/cac:TaxCategory[normalize-space(cbc:ID) = 'AE'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']) and (exists(//cac:AccountingSupplierParty/cac:Party/cac:PartyTaxScheme/cbc:CompanyID) or exists(//cac:TaxRepresentativeParty/cac:PartyTaxScheme[cac:TaxScheme/(normalize-space(upper-case(cbc:ID)) = 'VAT')]/cbc:CompanyID)) and (exists(//cac:AccountingCustomerParty/cac:Party/cac:PartyTaxScheme[cac:TaxScheme/(normalize-space(upper-case(cbc:ID)) = 'VAT')]/cbc:CompanyID) or exists(//cac:AccountingCustomerParty/cac:Party/cac:PartyLegalEntity/cbc:CompanyID))) or not(exists(//cac:AllowanceCharge[cbc:ChargeIndicator=true()]/cac:TaxCategory[normalize-space(cbc:ID) = 'AE'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']))",
  "meaning": "If a document-level charge uses VAT category \"Reverse charge\", the invoice must include at least one of the seller VAT identifier (BT-31), the seller tax registration identifier (BT-32), or the seller tax representative VAT identifier (BT-63), and at least one of the buyer VAT identifier (BT-48) or the buyer legal registration identifier (BT-47). The published test looks for a charge whose category code is AE.",
  "fix": "On a charge coded AE, send at least one of BT-31, BT-32, or BT-63, and at least one of BT-48 or BT-47.",
  "example_fail": "A document-level charge uses category code AE, and every seller identifier named in the rule is missing, or every buyer identifier named in the rule is missing.",
  "example_pass": "A charge uses AE, at least one of BT-31, BT-32, or BT-63 is present, and at least one of BT-48 or BT-47 is present.",
  "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-AE-04/",
  "source_retrieved": "2026-10-17",
  "last_verified": "2026-10-17"
}
