BR-CL-01Invoice type code is not an invoice code in UNTDID 1001
Mutabiq checks Saudi ZATCA Phase 2 e-invoice XML before you submit it: pre-validation against published ZATCA requirements, not an approval by the authority. This page explains one rule, BR-CL-01.
Five checks a month on the Free plan. The file is checked in memory and is never stored.
The message ZATCA prints
[BR-CL-01]-The document type code MUST be coded by the invoice and credit note related code lists of UNTDID 1001.
Also cited in this report
BR-KSA-05
[BR-KSA-05]-The invoice type code (BT-3) must be equal to one of value from the subset of UN/CEFACT code list 1001, D.16B agreed for KSA electronic invoices. Please refer paragraph 11.2.1 of XML implementation Standards.
What Mutabiq reports
One entry for each way this rule can be reported.
Reported as
What kind of value was found — empty, not_15_digits and the like — never the value itself.
Invoice type code is not an invoice code in UNTDID 1001
Reported asnot_in_untdid1001not an invoice code in UNTDID 1001
What is wrong
The value of cbc:InvoiceTypeCode is not one of the invoice document codes in the UNTDID 1001 list that EN 16931 uses, and ZATCA rejects the document under BR-CL-01. Leading and trailing spaces are removed before the value is looked up, and a value with a space inside it never matches. This check comes before the Saudi one: BR-KSA-05 then narrows the list to 388, 383 and 381, so a code such as 386 passes this rule and fails that one, while a code that is not on the UNTDID 1001 list at all fails both.
What to check in your ERP
Look at the value your system writes into cbc:InvoiceTypeCode. For ZATCA it is 388 for a tax invoice, 383 for a debit note and 381 for a credit note, with nothing else in the element. The usual causes are a document number or an internal document-type code mapped to this field, characters appended by a template, and a code padded to a fixed width with leading zeros.
The clause that runs
Quoted from the validation-rule stylesheet ZATCA publishes, at the file and line named below. The executed guard is what the check runs; the reported test is what it prints when it fails, and the two are not always the same.
As shipped in ZATCA SDK 3.4.8: the copy quoted here is, byte for byte, the file that release ships. The date in the file name is the name ZATCA gives the file; the rules in it are those of SDK 3.4.8.
A worked example
A synthetic document from the measured test corpus that trips this rule, shown where it differs from one that passed. Mutabiq's report names the class of the value, never the value itself.