PintLint

Rules / IBR-089

IBR-089 error

Only one invoiced object

Only one invoiced object (ibt-128) is allowed per line (ibg-25).

Fails

<cac:InvoiceLine>
  <cac:DocumentReference>…</cac:DocumentReference>
  <cac:DocumentReference>…</cac:DocumentReference>
</cac:InvoiceLine>

Fix

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

Schematron
Context
cac:InvoiceLine | cac:CreditNoteLine
Test
(count(cac:DocumentReference[cbc:DocumentTypeCode = 130]) <= 1)

Official text: Only one invoiced object (ibt-128) is allowed per line (ibg-25).

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

Check an invoice