{
  "id": "BR-AF-09",
  "country": "EU",
  "syntax": "ubl",
  "group": "igic",
  "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": "The VAT category tax amount (BT-117) in a VAT breakdown (BG-23) where VAT category code (BT-118) is \"IGIC\" shall equal the VAT category taxable amount (BT-116) multiplied by the VAT category rate (BT-119).",
  "statement_lang": "en",
  "context": "/*/cac:TaxTotal/cac:TaxSubtotal/cac:TaxCategory[normalize-space(cbc:ID) = 'L'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']",
  "test": "(abs(xs:decimal(../cbc:TaxAmount)) - 1 < round((abs(xs:decimal(../cbc:TaxableAmount)) * (xs:decimal(cbc:Percent) div 100)) * 10 * 10) div 100 ) and (abs(xs:decimal(../cbc:TaxAmount)) + 1 > round((abs(xs:decimal(../cbc:TaxableAmount)) * (xs:decimal(cbc:Percent) div 100)) * 10 * 10) div 100 )",
  "meaning": "The VAT category tax amount (BT-117) in a VAT breakdown (BG-23) where VAT category code (BT-118) is \"IGIC\" must equal the VAT category taxable amount (BT-116) multiplied by the VAT category rate (BT-119). The message omits \"the\" before \"VAT category code\". The published test compares category code L, divides the percent by 100, rounds that product to two decimal places, uses absolute values, and allows the tax amount and that rounded product to differ by less than 1. The official test has two spaces before each round. The stored test keeps one. It also keeps a single space before the closing parenthesis after div 100.",
  "fix": "Set BT-117 on the L breakdown to BT-116 multiplied by BT-119 as a percentage. The published test divides the percent by 100 and allows a difference of less than 1.",
  "example_fail": "An L breakdown has taxable amount 100, category rate 0, and tax amount 50.",
  "example_pass": "That breakdown has taxable amount 100, category rate 0, and tax amount 0.",
  "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-AF-09/",
  "source_retrieved": "2026-10-18",
  "last_verified": "2026-10-18"
}
