# BR-CL-01 — Type code doesn't match the UBL document

> https://billhorse.com/en/rules/br-cl-01/

## What does this error mean?

In UBL a credit note is a distinct <CreditNote> document and an invoice an <Invoice>. The document type code (BT-3) must come from the matching UNTDID 1001 list — the most common error is code 381 (credit note) in an <Invoice> instead of a <CreditNote>.

## How to fix it

For a credit note emit a <CreditNote> document (CreditNoteTypeCode/CreditNoteLine), not an <Invoice> with type 381. Conversely, invoice codes (e.g. 380) belong in an <Invoice>.
