# HR-BR-17

Source: https://xmlvalid.com/rules/HR-BR-17

> Ako se koristi referenca narudžbenice na stavci računa (HR-BT-9), zabranjeno je koristiti BT-13 Referencu narudžbenice na razini računa

- Level: error
- Rule sets: Croatian eRačun rules (UBL) 13.03.2026
- Context: `cac:InvoiceLine | cac:CreditNoteLine`
- Test: `(exists(cac:OrderLineReference/cac:OrderReference/cbc:ID) and not($hasOrderReference)) or (not(exists(cac:OrderLineReference/cac:OrderReference/cbc:ID)) and ($hasOrderReference)) or (not(exists(cac:OrderLineReference/cac:OrderReference/cbc:ID)) and not($hasOrderReference))`

In English: When a purchase order reference is given on an invoice line (HR-BT-9), the document level purchase order reference (BT-13) must not be used.

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