BR-KSA-33: Every invoice needs an invoice counter value (ICV, KSA-16)
The invoice must contain a cac:AdditionalDocumentReference with cbc:ID = 'ICV', and a non-empty cbc:UUID under cac:AdditionalDocumentReference, which holds the invoice counter value (KSA-16).
How to fix it
Add <cac:AdditionalDocumentReference><cbc:ID>ICV</cbc:ID><cbc:UUID>10</cbc:UUID></cac:AdditionalDocumentReference>, with your counter value in cbc:UUID.
ZATCA's official text
[BR-KSA-33]-Each invoice must have an invoice counter value (KSA-16).
Source: ZATCA SDK 3.4.8 · ZATCA KSA rules
Fails when (the condition ZATCA's SDK runs)
not((cac:AdditionalDocumentReference[normalize-space(cbc:ID) = 'ICV'] and (cac:AdditionalDocumentReference/cbc:UUID) != ''))
Related rules
- BR-KSA-34 · Invoice counter value (ICV, KSA-16) must contain only digits
- BR-KSA-29 · Signature ID and referenced signature ID must be ...signature:Invoice
- BR-KSA-30 · Signature method must be the enveloped XAdES URN
- BR-KSA-31 · Simplified invoices cannot be self-billed (KSA-2 position 7 = 0)
- BR-KSA-35 · A supply end date (KSA-24) requires a supply date (KSA-5)
- BR-KSA-36 · Supply end date (KSA-24) must not be before supply date (KSA-5)
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