# XV-FI-07

Source: https://xmlvalid.com/rules/XV-FI-07

> VatRateAmount of the … % rate (…) is neither the sum of RowVatAmount of the rows at that rate (…) nor the rate applied to VatBaseAmount (Finvoice 3.0 guidelines, 14).

- Level: error
- Rule sets: Finvoice 3.0 calculation and payment rules Implementation guidelines 2.6 (16 September 2025)
- Context: `/Finvoice/InvoiceDetails[matches(InvoiceTypeCode, '^(INV|SEI|REC|RES)') or InvoiceTypeCode = 'TES01']/VatSpecificationDetails[VatRatePercent]`
- Test: `not($mine) or not(VatRateAmount) or (($rows and not($rows[not(RowVatAmount)])) and fi:same(fi:dec(VatRateAmount), fi:dec($rows/RowVatAmount))) or (VatBaseAmount and fi:same(fi:dec(VatRateAmount), round-half-to-even(fi:dec(VatBaseAmount) * $rate div 100, 2))) or not(VatBaseAmount or ($rows and not($rows[not(RowVatAmount)])))`

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