{
  "id": "BR-CO-21",
  "country": "EU",
  "syntax": "ubl",
  "group": "document",
  "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": "Each Document level allowance (BG-20) shall contain a Document level allowance reason (BT-97) or a Document level allowance reason code (BT-98), or both.",
  "statement_lang": "en",
  "context": "/ubl:Invoice/cac:AllowanceCharge[cbc:ChargeIndicator = false()] | /cn:CreditNote/cac:AllowanceCharge[cbc:ChargeIndicator = false()]",
  "test": "exists(cbc:AllowanceChargeReason) or exists(cbc:AllowanceChargeReasonCode)",
  "meaning": "Each Document level allowance (BG-20) must contain a Document level allowance reason (BT-97) or a Document level allowance reason code (BT-98), or both. The statement says \"shall contain\", not \"shall have\", and it ends with a period. The context writes ChargeIndicator = false() with spaces around =. The published test is exists on the reason or exists on the reason code.",
  "fix": "On each document-level allowance, send a Document level allowance reason (BT-97), a Document level allowance reason code (BT-98), or both.",
  "example_fail": "A document-level allowance has neither a reason nor a reason code.",
  "example_pass": "A document-level allowance has a reason and no reason code.",
  "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-21/",
  "source_retrieved": "2026-10-18",
  "last_verified": "2026-10-18"
}
