{
  "id": "BR-CO-11",
  "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-18.",
  "spec": "Peppol BIS Billing 3.0, May 2026 release, EN 16931 model bound to UBL",
  "statement": "Sum of allowances on document level (BT-107) = Σ Document level allowance amount (BT-92).",
  "statement_lang": "en",
  "context": "cac:LegalMonetaryTotal",
  "test": "xs:decimal(cbc:AllowanceTotalAmount) = (round(sum(../cac:AllowanceCharge[cbc:ChargeIndicator=false()]/xs:decimal(cbc:Amount)) * 10 * 10) div 100) or (not(cbc:AllowanceTotalAmount) and not(../cac:AllowanceCharge[cbc:ChargeIndicator=false()]))",
  "meaning": "The sum of allowances on document level (BT-107) must equal the sum of the document-level allowance amounts (BT-92). The statement uses U+03A3 and ends with a period. The published test rounds that sum to two decimals. It also passes when the allowance total is absent and no document-level allowance is present. That absent branch is not() and does not call exists. The charge-indicator comparison is ChargeIndicator=false() with no space before =.",
  "fix": "Set BT-107 to the sum of the document-level allowance amounts (BT-92). Omit the allowance total only when the invoice has no document-level allowance.",
  "example_fail": "Document-level allowance amounts are 10 and 5, and BT-107 is 10.",
  "example_pass": "Those same amounts, and BT-107 is 15.",
  "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-11/",
  "source_retrieved": "2026-10-18",
  "last_verified": "2026-10-18"
}
