DC502

If the document currency is …, all currency codes for amounts should also be …; this document has amounts in ….

error: the document is invalid

Why it fails

  • The document is in a foreign currency, but some amounts were written in MYR (often the tax amounts, without TaxCurrencyCode).

How to fix it

Write every amount in the document currency; to report the tax in MYR, give TaxCurrencyCode MYR and the exchange rate in cac:TaxExchangeRate.

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.

Context
/*
Test
$currency = '' or empty($others)

Checked with MyInvois e-Invoice