# BR-CO-22

Source: https://xmlvalid.com/rules/BR-CO-22

> Each Document level charge (BG-21) shall contain a Document level charge reason (BT-104) or a Document level charge reason code (BT-105), or both.

- Level: error
- Rule sets: EN 16931 rules (UBL) 1.3.17, EN 16931 rules 1.3.16 (UBL), EXTENDED-CTC-FR rules (UBL) 1.4.0.04, Romanian RO e-Factura rules (UBL) 1.0.9
- Context: `/ubl:Invoice/cac:AllowanceCharge[cbc:ChargeIndicator = true()] | /cn:CreditNote/cac:AllowanceCharge[cbc:ChargeIndicator = true()]`
- Test: `exists(cbc:AllowanceChargeReason) or exists(cbc:AllowanceChargeReasonCode)`

> Each Document level charge (BG-21) shall contain a Document level charge reason (BT-104) or a Document level charge reason code (BT-105), or both.

- Level: error
- Rule sets: EN 16931 rules (CII) 1.3.17, EN 16931 rules 1.3.16 (CII), Factur-X BASIC WL rules 1.09, Factur-X EN 16931 rules 1.09.2
- Context: `//ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeAllowanceCharge/ram:ChargeIndicator[udt:Indicator='true']`
- Test: `(../ram:Reason) or (../ram:ReasonCode)`

Validate a document against these rules: https://xmlvalid.com/validate
