Rules / IBR-094
Contract reference must occur maximum once
Contract reference (ibt-012) must occur maximum once.
Fails
<Invoice>
…<cbc:ID>…</cbc:ID>
…<cbc:ID>…</cbc:ID>
</Invoice>
Fix
Keep one cac:ContractDocumentReference/cbc:ID in the invoice and delete the extras. If both values matter, one of them belongs in a different field.
Schematron
- Context
/ubl:Invoice | /cn:CreditNote- Test
(count(cac:ContractDocumentReference/cbc:ID) <= 1)
Official text: Contract reference (ibt-012) MUST occur maximum once.