XRechnung (Germany)
BR-DE-26
Corrected invoice requires preceding-invoice reference
What it means
When the document type code (BT-3) is 384 (corrected invoice), the document must reference the invoice it corrects (BG-3 PRECEDING INVOICE REFERENCE).
How to fix it
Add cac:BillingReference/cac:InvoiceDocumentReference with the original invoice number (BT-25) and, if available, its issue date (BT-26).
Catch this before it reaches the receiving authority:
# CLI
npx @eleata/validate-einvoice validate invoice.xml --format xrechnung-ubl
# GitHub Action — fail the build on any invalid invoice
- uses: hernaninverso/validate-einvoice-action@v1
with:
files: invoices/**/*.xml
api-key: ${{ secrets.EINVOICE_API_KEY }}