# UBL-SR-07

> If there is a preceding invoice reference, the preceding invoice number shall be present

Checked against Peppol BIS Billing 3.0 2026.5

Canonical: https://einvoicecheck.eu/rules/ubl-sr-07

## Official rule text

If there is a preceding invoice reference, the preceding invoice number shall be present

## Why did my invoice fail UBL-SR-07?

If a Preceding invoice reference group (BG-3) is present, it must contain the Preceding Invoice number (BT-25), the identifier of the referenced earlier invoice. In UBL, when cac:BillingReference/cac:InvoiceDocumentReference exists it must carry a non-empty cbc:ID; an empty or missing ID makes the reference meaningless.

## Common causes

- cac:InvoiceDocumentReference is emitted with only cbc:IssueDate but no cbc:ID.
- Source invoice number field is null yet the billing-reference block is still generated.
- cbc:ID element is present but empty (whitespace only).

## How do I fix it?

```
Populate the preceding invoice number: <cac:InvoiceDocumentReference><cbc:ID>INV-2025-900</cbc:ID></cac:InvoiceDocumentReference> — or omit the entire cac:BillingReference if no prior invoice applies.
```
