BR-KSA-CL-04: VAT exemption reason code must fit the VAT category
For document-level cac:TaxTotal/cac:TaxSubtotal/cac:TaxCategory with cbc:ID Z, E or O, a present cbc:TaxExemptionReasonCode (BT-121) must belong to that category: Z: VATEX-SA-32, VATEX-SA-33, VATEX-SA-34-1, VATEX-SA-34-2, VATEX-SA-34-3, VATEX-SA-34-4, VATEX-SA-34-5, VATEX-SA-35, VATEX-SA-36, VATEX-SA-EDU, VATEX-SA-HEA, VATEX-SA-MLTRY, VATEX-SA-DIPLOMAT, VATEX-SA-DUTYFREE, VATEX-SA-ROYALDECREE, VATEX-SA-32(bis); E: VATEX-SA-29, VATEX-SA-29-7, VATEX-SA-30; O: VATEX-SA-OOS. Unlike the message, the executed check also covers O, and an absent or empty code does not fail this rule (BR-KSA-23, BR-KSA-24 and BR-KSA-69 cover missing codes).
How to fix it
Use a code that matches the category, e.g. <cbc:ID>E</cbc:ID> with <cbc:TaxExemptionReasonCode>VATEX-SA-29</cbc:TaxExemptionReasonCode>.
ZATCA's official text
[BR-KSA-CL-04]-If VAT category Code (BT-118) is 'Z', or 'E', VAT exemption (or exception) reason code (BT-121) must exist with one of the values from paragraph 11.2.4 of XML implementation standards on Tax exemption (or exception) reason code - specific to Saudi Arabia.
Source: ZATCA SDK 3.4.8 · ZATCA KSA rules
Fails when (the condition ZATCA's SDK runs)
not(exists(cbc:TaxExemptionReasonCode) and ((not(contains(normalize-space(cbc:TaxExemptionReasonCode), ' ')) and normalize-space(cbc:ID) ='Z' and contains(' VATEX-SA-32 VATEX-SA-33 VATEX-SA-34-1 VATEX-SA-34-2 VATEX-SA-34-3 VATEX-SA-34-4 VATEX-SA-34-5 VATEX-SA-35 VATEX-SA-36 VATEX-SA-EDU VATEX-SA-HEA VATEX-SA-MLTRY VATEX-SA-DIPLOMAT VATEX-SA-DUTYFREE VATEX-SA-ROYALDECREE VATEX-SA-32(bis) ', concat(' ', normalize-space(cbc:TaxExemptionReasonCode), ' ')))) or ((not(contains(normalize-space(cbc:TaxExemptionReasonCode), ' ')) and normalize-space(cbc:ID) ='E' and contains(' VATEX-SA-29 VATEX-SA-29-7 VATEX-SA-30 ', concat(' ', normalize-space(cbc:TaxExemptionReasonCode), ' ')))) or ((not(contains(normalize-space(cbc:TaxExemptionReasonCode), ' ')) and normalize-space(cbc:ID) ='O' and contains(' VATEX-SA-OOS ', concat(' ', normalize-space(cbc:TaxExemptionReasonCode), ' ')))) or normalize-space(cbc:TaxExemptionReasonCode)='' )
Related rules
- BR-47 · Each VAT breakdown needs a VAT category code (BT-118)
- BR-E-01 · Exempt (E) items need an 'E' VAT breakdown
- 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-23 · VAT-exempt (E) breakdown needs an exemption reason code (BT-121)
- BR-KSA-24 · Not-subject-to-VAT (O) breakdown needs a reason code (BT-121)
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