BR-04: Every invoice needs an invoice type code (BT-3)

Explained by Matheel from ZATCA's rule text and the condition SDK 3.4.8 executes · Updated

Error: the invoice is rejectedAll invoicesFields: BT-3

Checks that the document has a non-empty cbc:InvoiceTypeCode (or, in a cn:CreditNote document, a non-empty cbc:CreditNoteTypeCode).

How to fix it

Add a type code under the root element, e.g. <cbc:InvoiceTypeCode name="0100000">388</cbc:InvoiceTypeCode> as in the official samples; the value must also be in the BR-CL-01 code list.

ZATCA's official text

[BR-04]-An Invoice shall have an Invoice type code (BT-3).
Source: ZATCA SDK 3.4.8 · EN 16931 (CEN) rules

Fails when (the condition ZATCA's SDK runs)

not((exists(cbc:InvoiceTypeCode) and (cbc:InvoiceTypeCode) !='') or (exists(cbc:CreditNoteTypeCode) and (cbc:CreditNoteTypeCode) !=''))

Related rules

Validate your invoice against ZATCA's rules

Paste the XML and see every error and warning. It runs in your browser; the invoice goes nowhere.

Validate an invoice or try Matheel