Rules / IBR-SR-31
IBR-SR-31 error
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 a single cbc:AllowanceChargeReason here and delete the duplicates. 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