BR-KSA-87: Tax exchange rate needs source currency, target currency and rate
If /ubl:Invoice/cac:TaxExchangeRate (KSA-36) exists, it must contain non-empty cbc:SourceCurrencyCode (KSA-37), cbc:TargetCurrencyCode (KSA-38) and cbc:CalculationRate (KSA-39).
How to fix it
Complete the block, e.g. <cac:TaxExchangeRate><cbc:SourceCurrencyCode>USD</cbc:SourceCurrencyCode><cbc:TargetCurrencyCode>SAR</cbc:TargetCurrencyCode><cbc:CalculationRate>3.75</cbc:CalculationRate></cac:TaxExchangeRate>, or leave out cac:TaxExchangeRate entirely.
ZATCA's official text
[BR-KSA-87] If the tax exchange rate (KSA-36) exists, then Source Currency Code (KSA-37), Target Currency Code (KSA-38) and Calculation Rate (KSA-39) shall be provided
Source: ZATCA SDK 3.4.8 · ZATCA KSA rules
Fails when (the condition ZATCA's SDK runs)
exists(/ubl:Invoice/cac:TaxExchangeRate) and not(exists(/ubl:Invoice/cac:TaxExchangeRate/cbc:SourceCurrencyCode) and (/ubl:Invoice/cac:TaxExchangeRate/cbc:SourceCurrencyCode) != '' and exists(/ubl:Invoice/cac:TaxExchangeRate/cbc:TargetCurrencyCode) and (/ubl:Invoice/cac:TaxExchangeRate/cbc:TargetCurrencyCode) != '' and exists(/ubl:Invoice/cac:TaxExchangeRate/cbc:CalculationRate) and (/ubl:Invoice/cac:TaxExchangeRate/cbc:CalculationRate) != '')
Related rules
- BR-KSA-88 · Exchange-rate source currency must equal the invoice currency
- BR-KSA-89 · Exchange-rate target currency must equal the tax currency
- BR-KSA-90 · Tax exchange rate may be at most 14 characters long
- BR-KSA-84 · Standard-rated (S) VAT rate must be 15 or 5
- BR-KSA-85 · Buyer phone must start with 0 or + followed by 4 to 15 digits
- BR-KSA-86 · Buyer email should follow the XXX@YYY.ZZ format
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