XV-CZ-05

LegalMonetaryTotal/TaxExclusiveAmount (…) must equal the sum of TaxableAmount in the VAT summary (…), in the foreign currency too (ISDOC 6.0.2, A.11).

error: the document is invalid

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
/isdoc:Invoice/isdoc:LegalMonetaryTotal
Test
cz:same(cz:dec(isdoc:TaxExclusiveAmount), cz:dec($sub/isdoc:TaxableAmount)) and (not(isdoc:TaxExclusiveAmountCurr) or cz:same(cz:dec(isdoc:TaxExclusiveAmountCurr), cz:dec($sub/isdoc:TaxableAmountCurr)))

Checked with ISDOC 6.0.2