BR-KSA-03: Every invoice needs a UUID
The document must have a non-empty cbc:UUID (KSA-1). The executed regex '^[\w.-]+' only checks that the value starts with a letter, digit, underscore, dot or dash, so it is looser than the official text's 'only letters, digits and dashes'.
How to fix it
Generate a standard UUID and add it near the top of the document, e.g. <cbc:UUID>3cf5ee18-ee25-44ea-a444-2c37ba7f28be</cbc:UUID>.
ZATCA's official text
[BR-KSA-03]-The invoice must contain a unique identifier ("UUID") (KSA-1) given by the unit that issued the document (unique message identifier for interchange process). This value must contain only letters, digits, and dashes.
Source: ZATCA SDK 3.4.8 · ZATCA KSA rules
Fails when (the condition ZATCA's SDK runs)
not(exists(cbc:UUID) and (cbc:UUID) != '' and matches(cbc:UUID, '^[\w.-]+'))
Related rules
- BR-E-07 · Exempt (E) document charges must have a VAT rate of 0
- BR-E-08 · Exempt (E) taxable amount must match the exempt lines and adjustments
- BR-E-09 · VAT amount in an exempt (E) breakdown must be 0
- BR-KSA-04 · Issue date must not be in the future
- BR-KSA-05 · Invoice type code must be 388, 383, 381 or 386
- BR-KSA-06 · Invoice transaction code (name attribute) must follow NNPNESB
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