# F-INV142

Source: https://xmlvalid.com/rules/F-INV142

> Invoice/OrderReference is mandatory when OrderLineReference class is present

- Level: error
- Rule sets: OIOUBL 2.1 Invoice rules (Denmark) 1.17.2
- Context: `doc:Invoice/cac:InvoiceLine`
- Test: `cac:OrderLineReference and not(count(../cac:OrderReference))`

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