What it means
In a UBL file, cac:AdditionalDocumentReference is used for two different things. With document type code 130 it holds the invoiced object identifier (BT-18). Without that code it describes a supporting document (BG-24), which can have an attachment: an embedded file (BT-125) or a link to one (BT-124). This rule checks that a reference with code 130 has no cac:Attachment.
Why it matters
This rule is an error, not a warning. A reference with code 130 is read as an identifier only, and a supporting document is read from a reference without that code. When one reference tries to be both, the file breaks the EN 16931 UBL rules.
How to fix it
In your invoicing software, check the references and attached documents on the invoice. Keep the invoiced object reference, such as a subscription number or a meter point, as one reference with no file attached to it. Add the PDF or other supporting document separately, as its own supporting document. If you build the XML yourself, remove cac:Attachment from the cac:AdditionalDocumentReference that has cbc:DocumentTypeCode 130 and put it in another cac:AdditionalDocumentReference without that code.
Once the file is corrected, check it again for free: Validate an invoice against EN 16931
Or fix the invoice in a form and download the corrected file, for 1 credit: Fix a rejected e-invoice
The rule as published
A UBL invoice shall not include an AdditionalDocumentReference simultaneously referring an Invoice Object Identifier and an Attachment Where this rule applies
| Rule set | Version |
|---|---|
| EN 16931 (UBL) | 1.3.17 |
| EN 16931 (UBL credit note) | 1.3.17 |
| XRechnung 3.0 (UBL) | 3.0.2 |
| XRechnung 3.0 (UBL credit note) | 3.0.2 |
| Peppol BIS Billing 3.0 (invoice) | 2026.5 |
| Peppol BIS Billing 3.0 (credit note) | 2026.5 |
| SI-UBL 2.0 / NLCIUS (invoice) | 2.0.3.13 |
| SI-UBL 2.0 / NLCIUS (credit note) | 2.0.3.13 |
| France CTC (UBL invoice) | 1.4.0-04 |
| France CTC (UBL credit note) | 1.4.0-04 |
| CIUS-RO UBL Invoice 1.0.9 | 1.0.9 |
| CIUS-RO UBL Credit Note 1.0.9 | 1.0.9 |
Check your file
Drop your e-invoice to see whether UBL-CR-666 still fails, and which other rules do.
Related rules
- UBL-CR-667 The buyer's item number must be written without a scheme
- UBL-CR-668 The seller's item number must be written without a scheme
- UBL-CR-669 A price discount must not carry a reason code
- UBL-CR-670 A price discount must not carry a reason text
- UBL-CR-671 A price discount must not carry a multiplier factor
- UBL-CR-672 A credit note's type code must not carry a listID attribute