UBL-CR-665: A UBL invoice should not include the AdditionalDocumentReference ID schemeID…
warningUBL
What this error means and how to fix it
A UBL-CR rule: the invoice contains a UBL element that EN 16931 does not use. Remove the element, or leave it if your recipient accepts it. This is a warning: on its own it does not reject the invoice.
Warnings are not repaired automatically. The free check shows every finding in the file with its location; if other errors in the same file are in the automatic set (totals, VAT breakdown, rounding, element order), the result page offers the corrected file for 9 €.
Rule text
[UBL-CR-665]-A UBL invoice should not include the AdditionalDocumentReference ID schemeID unless the DocumentTypeCode equals '130'
Where the rule is checked (XPath context and test)
Syntax
Severity
Context (XPath)
Test (XPath)
EN16931-UBL
warning
/ubl:Invoice | /cn:CreditNote
not(//cac:AdditionalDocumentReference[cbc:DocumentTypeCode != '130' or not(cbc:DocumentTypeCode)]/cbc:ID/@schemeID)