{
  "id": "BR-IC-08",
  "country": "EU",
  "syntax": "ubl",
  "group": "intra-community",
  "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": "In a VAT breakdown (BG-23) where the VAT category code (BT-118) is \"Intra-community supply\" the VAT category taxable amount (BT-116) shall equal the sum of Invoice line net amounts (BT-131) minus the sum of Document level allowance amounts (BT-92) plus the sum of Document level charge amounts (BT-99) where the VAT category codes (BT-151, BT-95, BT-102) are \"Intra-community supply\".",
  "statement_lang": "en",
  "context": "/*/cac:TaxTotal/cac:TaxSubtotal/cac:TaxCategory[normalize-space(cbc:ID) = 'K'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']",
  "test": "(exists(//cac:InvoiceLine) and (xs:decimal(../cbc:TaxableAmount) = (sum(../../../cac:InvoiceLine[cac:Item/cac:ClassifiedTaxCategory/normalize-space(cbc:ID)='K']/xs:decimal(cbc:LineExtensionAmount)) + sum(../../../cac:AllowanceCharge[cbc:ChargeIndicator=true()][cac:TaxCategory/normalize-space(cbc:ID)='K']/xs:decimal(cbc:Amount)) - sum(../../../cac:AllowanceCharge[cbc:ChargeIndicator=false()][cac:TaxCategory/normalize-space(cbc:ID)='K']/xs:decimal(cbc:Amount))))) or (exists(//cac:CreditNoteLine) and (xs:decimal(../cbc:TaxableAmount) = (sum(../../../cac:CreditNoteLine[cac:Item/cac:ClassifiedTaxCategory/normalize-space(cbc:ID)='K']/xs:decimal(cbc:LineExtensionAmount)) + sum(../../../cac:AllowanceCharge[cbc:ChargeIndicator=true()][cac:TaxCategory/normalize-space(cbc:ID)='K']/xs:decimal(cbc:Amount)) - sum(../../../cac:AllowanceCharge[cbc:ChargeIndicator=false()][cac:TaxCategory/normalize-space(cbc:ID)='K']/xs:decimal(cbc:Amount)))))",
  "meaning": "In a VAT breakdown whose category is \"Intra-community supply\", the taxable amount (BT-116) must equal the sum of invoice line net amounts (BT-131) minus document-level allowance amounts (BT-92) plus document-level charge amounts (BT-99), counting only intra-community lines, allowances, and charges. The official message includes \"the\" before \"VAT category code\" and says \"net amounts\" in the plural. The published test compares category code K, adds the K charges and subtracts the K allowances from the K line net amounts, and requires the taxable amount to equal that sum. It does not allow a difference of less than 1. Each branch also requires an invoice line or a credit note line to exist.",
  "fix": "Set BT-116 on the K breakdown to the K line net amounts, minus the K allowances, plus the K charges.",
  "example_fail": "K lines net to 100, there is a K allowance of 10, and the K breakdown taxable amount is 100.",
  "example_pass": "K lines net to 100, there is a K allowance of 10, and the K breakdown taxable amount is 90.",
  "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-IC-08/",
  "source_retrieved": "2026-10-17",
  "last_verified": "2026-10-17"
}
