{
  "id": "BR-CO-13",
  "country": "EU",
  "syntax": "ubl",
  "group": "totals",
  "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": "Invoice total amount without VAT (BT-109) = Σ Invoice line net amount (BT-131) - Sum of allowances on document level (BT-107) + Sum of charges on document level (BT-108).",
  "statement_lang": "en",
  "context": "cac:LegalMonetaryTotal",
  "test": "((cbc:ChargeTotalAmount) and (cbc:AllowanceTotalAmount) and (xs:decimal(cbc:TaxExclusiveAmount) = round((xs:decimal(cbc:LineExtensionAmount) + xs:decimal(cbc:ChargeTotalAmount) - xs:decimal(cbc:AllowanceTotalAmount)) * 10 * 10) div 100 )) or (not(cbc:ChargeTotalAmount) and (cbc:AllowanceTotalAmount) and (xs:decimal(cbc:TaxExclusiveAmount) = round((xs:decimal(cbc:LineExtensionAmount) - xs:decimal(cbc:AllowanceTotalAmount)) * 10 * 10 ) div 100)) or ((cbc:ChargeTotalAmount) and not(cbc:AllowanceTotalAmount) and (xs:decimal(cbc:TaxExclusiveAmount) = round((xs:decimal(cbc:LineExtensionAmount) + xs:decimal(cbc:ChargeTotalAmount)) * 10 * 10 ) div 100)) or (not(cbc:ChargeTotalAmount) and not(cbc:AllowanceTotalAmount) and (xs:decimal(cbc:TaxExclusiveAmount) = xs:decimal(cbc:LineExtensionAmount)))",
  "meaning": "The invoice total without VAT (BT-109) must equal the sum of line net amounts (BT-131), minus document-level allowances (BT-107), plus document-level charges (BT-108). The published test also covers a missing allowance total or a missing charge total.",
  "fix": "Recalculate BT-109 from the line net sum, the document allowances, and the document charges.",
  "example_fail": "Line net amounts sum to 100, document allowances are 10, document charges are 5, and BT-109 is 100.",
  "example_pass": "Those same inputs, and BT-109 is 95.",
  "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-CO-13/",
  "source_retrieved": "2026-10-17",
  "last_verified": "2026-10-17"
}
