# NFE-610

Source: https://xmlvalid.com/rules/NFE-610

> Rejeição: Total da NF difere do somatório dos Valores compõe o valor Total da NF (vNF …, calculado …).

- Level: error
- Rule sets: SEFAZ authorisation rules of NF-e 4.00 MOC 7.0 Anexo I, NTs up to 2026.010
- Context: `nfe:infNFe/nfe:total`
- Test: `$det/nfe:prod/nfe:CFOP[starts-with(., '3')] or abs($vNF - ($base - br:dec($t/nfe:vICMSDeson))) le 0.5 or abs($vNF - ($base - br:sum($icms[nfe:indDeduzDeson = '1']/nfe:vICMSDeson))) le 0.5`

In English: vNF is more than R$ 0.50 away from vProd - vDesc - vICMSDeson + vST + vFCPST + vICMSMonoReten + vFrete + vSeg + vOutro + vII + vIPI + vIPIDevol + vServ (+ PIS and COFINS ST when they add to the total). Not checked for imports.

## Why it fails

- vICMSDeson subtracted although no item has indDeduzDeson 1, or the reverse.
- IBS and CBS added to vNF; in 2026 they stay out of it.

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