NFE-610
Rejeição: Total da NF difere do somatório dos Valores compõe o valor Total da NF (vNF …, calculado …).
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.
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.
nfe:infNFe/nfe:total
$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
Checked with NF-e 4.00, NF-e 4.00 with authorisation protocol