Validation rules

UBL-SR-07 — UBL rule

A cac:BillingReference is present but the preceding invoice number (BT-25, InvoiceDocumentReference/cbc:ID) is missing.

Rule
UBL-SR-07 — official EN 16931 / XRechnung rule
Severity
error
Business term
BT-25 — Preceding invoice number
Field in your JSON
invoice.preceding_invoice
Detected by
tier 3 — KoSIT validator (authoritative)
Reachability
Only reachable when validating your own XML — normbill-generated documents cannot trigger it

The serializer only emits BillingReference when invoice.preceding_invoice is set, always with its cbc:ID.

How to fix it

Add cbc:ID inside cac:InvoiceDocumentReference, or remove the empty BillingReference. Through normbill, set invoice.preceding_invoice.

UBL-SR-07 auf Deutsch — was bedeutet der Fehler?

Der KoSIT-Validator lehnt die Rechnung ab, weil eine cac:BillingReference vorhanden ist, aber die Nummer der Vorgängerrechnung (BT-25, InvoiceDocumentReference/cbc:ID) fehlt.

So beheben Sie den Fehler

Ergänzen Sie cbc:ID in cac:InvoiceDocumentReference — oder entfernen Sie die leere BillingReference. Über normbill setzen Sie invoice.preceding_invoice.

Related rules

  • BR-DE-26 — A corrected invoice (type_code 384) should reference the invoice it corrects (BT-25).
  • BR-55 — A preceding-invoice reference (BG-3) is present but the preceding invoice number (BT-25) is missing.
  • UBL-SR-06 — A cac:BillingReference contains more than one cac:InvoiceDocumentReference — each preceding-invoice…
  • UBL-SR-08 — The invoicing period (BG-14) appears more than once — only one document-level cac:InvoicePeriod is allowed.
  • UBL-SR-05 — Payment terms (BT-20) appear more than once — across all cac:PaymentTerms elements only a single cbc:Note is…
  • UBL-SR-09 — The seller name (BT-27) appears more than once — the supplier party may carry only one…

Official sources

Every 422 from the API lists the rule id, the path in your request JSON, a plain-language message and a suggested fix — see the docs overview for the report format.

Or try it live: drop any XRechnung XML on the free validator — same KoSIT-backed report, no account.

Spotted something?

Bug, missing feature, wrong validation result — tell us. The page you're on is attached automatically; email optional.