Invoice counter value contains something other than digits
Reported asnot_digitscontains something other than digits
What is wrong
The invoice counter value (KSA-16), carried in the cbc:UUID of the ICV document reference, contains a character that is not a digit. ZATCA refuses the document under BR-KSA-34, whose message reads: the invoice counter value (KSA-16) contains only digits. Only the characters 0 to 9 are allowed - no letters, no hyphens, no spaces, no thousands separators and no prefix. Two things about the check are worth knowing. A counter that is absent or empty is not reported here: the test is a regular expression that allows an empty value, and a missing value is read as an empty one, so it passes. Presence is a different rule, BR-KSA-33, and appears in this report as the finding titled Invoice counter value is missing. And the path ZATCA evaluates is not restricted to the ICV reference - it reads whichever cac:AdditionalDocumentReference carries a cbc:UUID. On a ZATCA invoice the ICV reference is the only one that does, so the two readings coincide; on a document where some other reference carries one, that is the value judged. One further limit, stated so it is not assumed: BR-KSA-34's published wording also asks that the counter be greater than the previous invoice's. That half is not checked here and cannot be, because a pre-validator sees one document and never the one before it, so a counter that is all digits but repeats or runs backwards passes this check and can still be refused once the authority sees the sequence.
What to check in your ERP
The counter is a plain decimal integer and nothing else: 1, 2, 3 and upward, written with no formatting around it. The element name is misleading and is the commonest cause of this finding - cbc:UUID holds the counter, not a GUID, and a mapping written from the element name rather than from the field definition will put a UUID there. The other usual causes are the invoice number written into the counter, which normally carries a prefix and dashes; a branch or device code prefixed to keep counters apart across sites, which the counter does not need because each device keeps its own series; a thousands separator applied by a report formatter; a leading apostrophe picked up from a spreadsheet export; and whitespace, including an XML writer set to pretty-print, which puts the value on its own indented line. The counter is not the invoice number (BT-1) and does not reset per customer, per branch or per year - it increments by one for every document the issuing device or system emits, credit and debit notes included.