Rules / IBR-109
Referenced purchase order line identifier must occur maximum once
Referenced purchase order line identifier (ibt-132) must occur maximum once.
Fails
<cac:InvoiceLine>
…<cbc:LineID>…</cbc:LineID>
…<cbc:LineID>…</cbc:LineID>
</cac:InvoiceLine>
Fix
Keep one cac:OrderLineReference/cbc:LineID 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:OrderLineReference/cbc:LineID) <= 1)
Official text: Referenced purchase order line identifier (ibt-132) MUST occur maximum once.