# BR-55

Source: https://xmlvalid.com/rules/BR-55

> Each Preceding Invoice reference (BG-3) shall contain a Preceding Invoice reference (BT-25).

- Level: error
- Rule sets: EN 16931 rules (UBL) 1.3.17, EN 16931 rules 1.3.16 (UBL), Romanian RO e-Factura rules (UBL) 1.0.9
- Context: `cac:BillingReference`
- Test: `exists(cac:InvoiceDocumentReference/cbc:ID)`

> Each Preceding Invoice reference (BG-3) shall contain a Preceding Invoice reference (BT-25).

- Level: error
- Rule sets: EN 16931 rules (CII) 1.3.17, EN 16931 rules 1.3.16 (CII), EXTENDED-CTC-FR rules (CII) 1.4.0.04
- Context: `/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:InvoiceReferencedDocument`
- Test: `normalize-space(ram:IssuerAssignedID) != ''`

> Each Preceding Invoice reference (BG-3) shall contain a Preceding Invoice reference (BT-25).

- Level: error
- Rule sets: EXTENDED-CTC-FR rules (UBL) 1.4.0.04
- Context: `(/ubl:Invoice | /cn:CreditNote)/cac:BillingReference`
- Test: `exists(cac:InvoiceDocumentReference/cbc:ID)`

> Each Preceding Invoice reference (BG-3) shall contain a Preceding Invoice reference (BT-25).

- Level: error
- Rule sets: Factur-X BASIC WL rules 1.09, Factur-X EN 16931 rules 1.09.2, Factur-X EXTENDED rules 1.09.2
- Context: `/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:InvoiceReferencedDocument`
- Test: `(ram:IssuerAssignedID!='')`

Validate a document against these rules: https://xmlvalid.com/validate
