# PEPPOL-EN16931-P0100

Source: https://xmlvalid.com/rules/PEPPOL-EN16931-P0100

> Invoice type code MUST be set according to the profile.

- Level: error
- Rule sets: Peppol BIS Billing 3.0 rules 3.0.21
- Context: `cbc:InvoiceTypeCode`
- Test: `not($profile = ('01','02')) or (some $code in tokenize('71 80 82 84 102 218 219 326 331 380 382 383 384 386 388 393 395 553 575 623 780 817 870 875 876 877', '\s') satisfies normalize-space(text()) = $code)`

## Why it fails

- The invoice type code is not one the billing process allows, for example `381` (a credit note code) in an Invoice document.

## How to fix it

- Use an invoice code such as `380`. Send a credit note as a `CreditNote` document with type code `381`.

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