XV-CZ-11

TaxInclusiveAmount - AlreadyClaimedTaxInclusiveAmount must equal DifferenceTaxInclusiveAmount (… - … is not …); taxed advance payments are given as positive amounts (ISDOC 6.0.2, A.6).

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:TaxInclusiveAmount) - cz:dec(isdoc:AlreadyClaimedTaxInclusiveAmount), cz:dec(isdoc:DifferenceTaxInclusiveAmount)) and (not(isdoc:TaxInclusiveAmountCurr and isdoc:AlreadyClaimedTaxInclusiveAmountCurr and isdoc:DifferenceTaxInclusiveAmountCurr) or cz:same(cz:dec(isdoc:TaxInclusiveAmountCurr) - cz:dec(isdoc:AlreadyClaimedTaxInclusiveAmountCurr), cz:dec(isdoc:DifferenceTaxInclusiveAmountCurr)))

Checked with ISDOC 6.0.2