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
What the rule checks
As the rule set's publisher wrote it. The rule runs on every element the context matches, and fails where the test is false; the validator reports the line of that element.
/ubl:Invoice/cac:TaxExchangeRate
exists(/ubl:Invoice/cac:TaxExchangeRate/cbc:SourceCurrencyCode) and exists(/ubl:Invoice/cac:TaxExchangeRate/cbc:TargetCurrencyCode) and exists(/ubl:Invoice/cac:TaxExchangeRate/cbc:CalculationRate)
Checked with Saudi Arabia ZATCA Tax Invoice (UBL), Saudi Arabia ZATCA Simplified Tax Invoice (UBL)