BR-KSA-33: Every invoice needs an invoice counter value (ICV, KSA-16)

Explained by Matheel from ZATCA's rule text and the condition SDK 3.4.8 executes · Updated

Error: the invoice is rejectedAll invoicesFields: 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

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