# BR-NL-8

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

> If the invoice type code (cbc:InvoiceTypeCode) is 381, the document MUST use the CreditNote scheme

- 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: `(. != '381') or /cn:CreditNote`

> If the credit note type code (cbc:CreditNoteTypeCode) is 380, 384 or 389, the document MUST use the Invoice scheme

- 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: `(. = '381') or /ubl:Invoice`

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