BR-CL-KSA-14: The QR code value must be 1 to 1000 characters long
Applies only when the QR element exists: the content of cac:AdditionalDocumentReference with cbc:ID = 'QR' / cac:Attachment / cbc:EmbeddedDocumentBinaryObject must be at least 1 and at most 1000 characters. (The rule's test text is written as the failure condition: it fires when the length is over 1000 or under 1.)
How to fix it
Keep the Base64 QR value in cbc:EmbeddedDocumentBinaryObject non-empty and no longer than 1000 characters.
ZATCA's official text
[KSA-14]Field character limit for QR Code field has been exceeded. The maximum character limit for this field is 1000 characters.
Source: ZATCA SDK 3.4.8 · ZATCA KSA rules
Fails when (the condition ZATCA's SDK runs)
exists(cac:AdditionalDocumentReference[normalize-space(cbc:ID) = 'QR']/cac:Attachment/cbc:EmbeddedDocumentBinaryObject) and (string-length(cac:AdditionalDocumentReference[normalize-space(cbc:ID) = 'QR']/cac:Attachment/cbc:EmbeddedDocumentBinaryObject) > 1000 or string-length(cac:AdditionalDocumentReference[normalize-space(cbc:ID) = 'QR']/cac:Attachment/cbc:EmbeddedDocumentBinaryObject) < 1)
Related rules
- BR-KSA-27 · Simplified invoices must carry a QR code (KSA-14)
- BR-CL-14 · Country codes must be ISO 3166-1 alpha-2 codes
- BR-CL-16 · Payment means code must be from the UNCL4461 list
- BR-CL-18 · Tax category codes must come from the UNCL5305 code list
- BR-CO-04 · Every invoice line needs a VAT category code
- BR-CO-10 · Total line amount must equal the sum of all line net amounts
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