Rules / IBR-111
Item price discount must occur maximum once
Item price discount (ibt-147) must occur maximum once.
Fails
<cac:InvoiceLine>
…<cbc:Amount>…</cbc:Amount>
…<cbc:Amount>…</cbc:Amount>
</cac:InvoiceLine>
Fix
Keep one cac:Price/cac:AllowanceCharge/cbc:Amount in cac:InvoiceLine and delete the extras. If both values matter, one of them belongs in a different field.
Schematron
- Context
cac:InvoiceLine | cac:CreditNoteLine- Test
(count(cac:Price/cac:AllowanceCharge/cbc:Amount) <= 1)
Official text: Item price discount (ibt-147) MUST occur maximum once.