PintLint

Rules / IBR-SR-06

IBR-SR-06 error

Preceding invoice reference must occur maximum once

Preceding invoice reference (ibt-025) must occur maximum once.

Fails

<cac:BillingReference>
  <cac:InvoiceDocumentReference>…</cac:InvoiceDocumentReference>
  <cac:InvoiceDocumentReference>…</cac:InvoiceDocumentReference>
</cac:BillingReference>

Fix

Keep a single cac:InvoiceDocumentReference here and delete the duplicates. If both values matter, one of them belongs in a different field.

Schematron
Context
cac:BillingReference
Test
(count(cac:InvoiceDocumentReference) <= 1)

Official text: Preceding invoice reference (ibt-025) MUST occur maximum once

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

Check an invoice