Rules / IBR-SR-30
Allowance reason must occur maximum once
Allowance reason (ibt-097) 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 = false()]- Test
(count(cbc:AllowanceChargeReason) <= 1)
Official text: Allowance reason (ibt-097) MUST occur maximum once