Peppol BIS Billing 3.0.21 · UBL

UBL-CR-665: A UBL invoice should not include the AdditionalDocumentReference ID schemeID unless the…

Peppol BIS Billing 3.0.21 · UBL

warningschema

Original rule text

[UBL-CR-665]-A UBL invoice should not include the AdditionalDocumentReference ID schemeID unless the DocumentTypeCode equals '130'

Stored validation assertion
not(//cac:AdditionalDocumentReference[cbc:DocumentTypeCode != '130' or not(cbc:DocumentTypeCode)]/cbc:ID/@schemeID)

UBL-CR-665 is a warning rule in the schema layer of Peppol BIS Billing 3.0.21 · UBL. An invoice that breaks it is flagged but not rejected.

What this rule requires

In a UBL invoice or credit note, the rule checks every cac:AdditionalDocumentReference: if its cbc:DocumentTypeCode is not exactly '130' (or is missing), then its cbc:ID must not carry a @schemeID. The test forbids any such cbc:ID/@schemeID. This is a warning, so the validator reports it as advisory; the document is not rejected for it.

How to fix

If a cbc:ID under cac:AdditionalDocumentReference has a @schemeID, ensure that the same cac:AdditionalDocumentReference has cbc:DocumentTypeCode with value '130'. If the document type is not '130', remove the @schemeID attribute from cbc:ID. Alternatively, set cbc:DocumentTypeCode to '130' where that is the correct document type.

Guidance on this rule. The original text above is authoritative.

Where to go next

No published Peppol BIS Billing UBL release comparison lists a change to UBL-CR-665.

Validate an invoice against these rules · All release changes