BR-KSA-88: Exchange-rate source currency must equal the invoice currency

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

Error: the invoice is rejectedConditional, see belowFields: KSA-37, BT-5

If cac:TaxExchangeRate/cbc:SourceCurrencyCode (KSA-37) is present and non-empty, it must match cbc:DocumentCurrencyCode (BT-5).

How to fix it

Put the same code as cbc:DocumentCurrencyCode in cac:TaxExchangeRate/cbc:SourceCurrencyCode (e.g. USD in both).

ZATCA's official text

[BR-KSA-88] If exist, Source Currency Code (KSA-37) must be the same as Invoice currency code (BT-5)
Source: ZATCA SDK 3.4.8 · ZATCA KSA rules

Fails when (the condition ZATCA's SDK runs)

exists(/ubl:Invoice/cac:TaxExchangeRate/cbc:SourceCurrencyCode) and (/ubl:Invoice/cac:TaxExchangeRate/cbc:SourceCurrencyCode) != '' and not(matches(normalize-space(//cbc:DocumentCurrencyCode), /ubl:Invoice/cac:TaxExchangeRate/cbc:SourceCurrencyCode) and (/ubl:Invoice/cac:TaxExchangeRate/cbc:SourceCurrencyCode !='') )

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