PintLint

Rules / IBR-078

Only one invoiced object is allowed on document level

Only one invoiced object (ibt-018) is allowed on document level.

Fails

<cac:AdditionalDocumentReference><cbc:ID>A</cbc:ID><cbc:DocumentTypeCode>130</cbc:DocumentTypeCode></cac:AdditionalDocumentReference>
<cac:AdditionalDocumentReference><cbc:ID>B</cbc:ID><cbc:DocumentTypeCode>130</cbc:DocumentTypeCode></cac:AdditionalDocumentReference>

Fix

Keep one cac:AdditionalDocumentReference with cbc:DocumentTypeCode 130 (the invoiced object) on the document. Other references use other type codes.

Schematron
Context
/ubl:Invoice | /cn:CreditNote
Test
(count(cac:AdditionalDocumentReference[cbc:DocumentTypeCode='130']) <= 1)

Official text: Only one invoiced object (ibt-018) is allowed on document level.

Official · PINT shared rules. Severity: error. Runs on UBL XML.

Check your invoice for this rule