BR-CL-01: Invoice type code must be a valid UNTDID 1001 code
Checks that the value of cbc:InvoiceTypeCode (or cbc:CreditNoteTypeCode) is a single code, without spaces, from the UNTDID 1001 subset listed in the rule; for cbc:InvoiceTypeCode the list includes 388, 381 and 383, which the official samples use for invoices, credit notes and debit notes.
How to fix it
Use one of the listed codes as the element value, e.g. <cbc:InvoiceTypeCode name="0100000">388</cbc:InvoiceTypeCode>, with no extra spaces or text.
ZATCA's official text
[BR-CL-01]-The document type code MUST be coded by the invoice and credit note related code lists of UNTDID 1001.
Source: ZATCA SDK 3.4.8 · EN 16931 (CEN) rules
Fails when (the condition ZATCA's SDK runs)
not((self::cbc:InvoiceTypeCode and ((not(contains(normalize-space(.), ' ')) and contains(' 80 82 84 130 202 203 204 211 295 325 326 380 381 383 384 385 386 387 388 389 390 393 394 395 456 457 527 575 623 633 751 780 935 ', concat(' ', normalize-space(.), ' '))))) or (self::cbc:CreditNoteTypeCode and ((not(contains(normalize-space(.), ' ')) and contains(' 81 83 261 262 296 308 396 420 458 532 ', concat(' ', normalize-space(.), ' '))))))
Related rules
- BR-53 · With a tax currency (BT-6), give the VAT total in it (BT-111)
- BR-54 · Each item attribute needs a name (BT-160) and a value (BT-161)
- BR-55 · A billing reference must give the preceding invoice number (BT-25)
- BR-CL-03 · Amount currencyID must be an ISO 4217 alpha-3 code
- BR-CL-04 · Invoice currency code must be an ISO 4217 alpha-3 code
- BR-CL-05 · Tax currency code must be an ISO 4217 alpha-3 code
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