BR-38
This id stands for 2 different rules, one per rule set below: Factur-X numbers its rules in each profile separately.
What the rule checks
As the rule set's publisher wrote it. The rule runs on every element the context matches, and fails where the test is false; the validator reports the line of that element
Each Document level charge (BG-21) shall have a Document level charge reason (BT-104) or a Document level charge reason code (BT-105).
/ubl:Invoice/cac:AllowanceCharge[cbc:ChargeIndicator = true()] | /cn:CreditNote/cac:AllowanceCharge[cbc:ChargeIndicator = true()]
exists(cbc:AllowanceChargeReason) or exists(cbc:AllowanceChargeReasonCode)
Checked with EN 16931 Invoice (UBL), EN 16931 Credit Note (UBL), Croatia eRačun Invoice (UBL), Croatia eRačun Credit Note (UBL)
Each Document level charge (BG-21) shall have a Document level charge reason (BT-104) or a Document level charge reason code (BT-105).
//ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeAllowanceCharge/ram:ChargeIndicator[udt:Indicator='true']
(../ram:Reason) or (../ram:ReasonCode)
Checked with EN 16931 Invoice (CII)
Each Document level charge (BG-21) shall have a Document level charge reason (BT-104) or a Document level charge reason code (BT-105).
//ubl:Invoice/cac:AllowanceCharge[cbc:ChargeIndicator = 'true'] | //cn:CreditNote/cac:AllowanceCharge[cbc:ChargeIndicator = 'true']
exists(cbc:AllowanceChargeReason) or exists(cbc:AllowanceChargeReasonCode)
Checked with Portugal CIUS-PT Invoice (UBL), Portugal CIUS-PT Credit Note (UBL)