Rules / IBR-SR-31
Charge reason must occur maximum once
Charge reason (ibt-104) must occur maximum once.
Fails
<cac:AllowanceCharge>
<cbc:AllowanceChargeReason>…</cbc:AllowanceChargeReason>
<cbc:AllowanceChargeReason>…</cbc:AllowanceChargeReason>
</cac:AllowanceCharge>
Fix
Keep one cbc:AllowanceChargeReason in cac:AllowanceCharge and delete the extras. If both values matter, one of them belongs in a different field.
Schematron
- Context
cac:AllowanceCharge[cbc:ChargeIndicator = true()]- Test
(count(cbc:AllowanceChargeReason) <= 1)
Official text: Charge reason (ibt-104) MUST occur maximum once