# XV-FI-03

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

> The sum of RowVatExcludedAmount of the invoice rows (…) must be RowsTotalVatExcludedAmount, or InvoiceTotalVatExcludedAmount when there are no invoice level discounts or charges (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']`
- Test: `not($rows) or $rows[not(RowVatExcludedAmount)] or (if (RowsTotalVatExcludedAmount) then fi:same(fi:dec(RowsTotalVatExcludedAmount), $rowSum) else ($invoiceLevel or not(InvoiceTotalVatExcludedAmount) or fi:same($excluded, $rowSum)))`

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