# BR-NL-9

Source: https://xmlvalid.com/rules/BR-NL-9

> For suppliers in the Netherlands, if the document is a corrective invoice (cbc:InvoiceTypeCode = 384), the document MUST contain an invoice reference (cac:BillingReference/cac:InvoiceDocumentReference/cbc:ID)

- Level: error
- Rule sets: SI-UBL 2.0 rules (NLCIUS, UBL) 2.0.3.13, SI-UBL 2.0 G-account rules (NLCIUS, UBL) 1.0.2.13
- Context: `cbc:InvoiceTypeCode[$s]|cbc:CreditNoteTypeCode[$s]`
- Test: `(. != '384') or /*/cac:BillingReference/cac:InvoiceDocumentReference/cbc:ID`

> For suppliers in the Netherlands, if the document is a corrective invoice (rsm:ExchangedDocument/ram:TypeCode = 384), the document MUST contain an invoice reference (/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:InvoiceReferencedDocument/ram:IssuerAssignedID)

- Level: error
- Rule sets: NLCIUS rules (CII) 1.0.3.13
- Context: `/*/rsm:ExchangedDocument/ram:TypeCode[$si]`
- Test: `not($s) or (. != 384) or ../rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:InvoiceReferencedDocument/ram:IssuerAssignedID`

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