← All e-invoice error codes

BR-DE-22 XRechnung: two attachments with the same name

Every file attached to an XRechnung needs its own file name.

Auf Deutsch · En français

What the rule says

Not all filename attributes of the embeddedDocumentBinaryObject elements are unique

The rule's official wording (CEN / KoSIT). The German XRechnung rules are published in German.

Why it happens

Two or more attached documents (BT-125) have the same file name.

How to fix it

Give each attachment a distinct name, such as Lieferschein-1.pdf and Lieferschein-2.pdf, or leave out the duplicate.

Applies to

XRechnung only (German rules by KoSIT).

More about BR-DE-22

An XRechnung can carry supporting documents, such as a delivery note or a timesheet, inside the XML. The receiver's system stores them by file name, so two attachments with the same name would overwrite each other.

This often happens when the same document is attached twice, or when a program names every attachment "attachment.pdf".

The fields involved

BT-125 Attached document
CII ram:AdditionalReferencedDocument/ram:AttachmentBinaryObject (@filename)
UBL cac:AdditionalDocumentReference/cac:Attachment/cbc:EmbeddedDocumentBinaryObject (@filename)

Typical situations

  • The same delivery note was attached twice.
  • The software names every attachment "document.pdf".

Example

An attachment with its own file name, in CII:

<ram:AdditionalReferencedDocument>
  <ram:IssuerAssignedID>LS-2026-118</ram:IssuerAssignedID>
  <ram:TypeCode>916</ram:TypeCode>
  <ram:AttachmentBinaryObject mimeCode="application/pdf" filename="Lieferschein-1.pdf">JVBERi0x...</ram:AttachmentBinaryObject>
</ram:AdditionalReferencedDocument>