# XV-CZ-04

Source: https://xmlvalid.com/rules/XV-CZ-04

> TaxTotal/TaxAmount (…) must equal the sum of TaxAmount of every TaxSubTotal (…), in the foreign currency too (ISDOC 6.0.2, A.10).

- Level: error
- Rule sets: ISDOC amounts and identifiers Standard ISDOC 6.0.2
- Context: `/isdoc:Invoice/isdoc:TaxTotal`
- Test: `cz:same(cz:dec(isdoc:TaxAmount), cz:dec(isdoc:TaxSubTotal/isdoc:TaxAmount)) and (not(isdoc:TaxAmountCurr) or cz:same(cz:dec(isdoc:TaxAmountCurr), cz:dec(isdoc:TaxSubTotal/isdoc:TaxAmountCurr)))`

Validate a document against these rules: https://xmlvalid.com/validate
