# BR-DE-17

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

> Mit dem Element "Invoice type code" (BT-3) sollen ausschließlich folgende Codes aus der Codeliste UNTDID 1001 übermittelt werden: 326 (Partial invoice), 380 (Commercial invoice), 384 (Corrected invoice), 389 (Self-billed invoice) und 381 (Credit note),875 (Partial construction invoice), 876 (Partial final construction invoice), 877 (Final construction invoice).

- Level: warning
- Rule sets: XRechnung 3.0 rules (UBL) 2.6.0
- Context: `/ubl:Invoice | /cn:CreditNote`
- Test: `normalize-space(cbc:InvoiceTypeCode) = $supportedInvAndCNTypeCodes or normalize-space(cbc:CreditNoteTypeCode) = $supportedInvAndCNTypeCodes`

> Mit dem Element "Invoice type code" (BT-3) sollen ausschließlich folgende Codes aus der Codeliste UNTDID 1001 übermittelt werden: 326 (Partial invoice), 380 (Commercial invoice), 384 (Corrected invoice), 389 (Self-billed invoice) und 381 (Credit note),875 (Partial construction invoice), 876 (Partial final construction invoice), 877 (Final construction invoice).

- Level: warning
- Rule sets: XRechnung 3.0 rules (CII) 2.6.0
- Context: `/rsm:CrossIndustryInvoice`
- Test: `normalize-space(rsm:ExchangedDocument/ram:TypeCode) = ('326', '380', '384', '389', '381', '875', '876', '877')`

## Why it fails

- The invoice type code (BT-3) is one XRechnung does not expect, such as `393` (factored invoice) or `325` (proforma).

## How to fix it

- Use `380` for an ordinary invoice, `381` for a credit note, `384` for a corrected invoice, `389` for self-billing, `326` for a partial invoice and `875`, `876` or `877` for construction invoices. It is a warning: other codes are not rejected, but the buyer may not process them.

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