# NFE-1040

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

> Rejeição: Valor do Tributo Regular da UF difere do calculado [nItem: …] (vTribRegIBSUF …).

- 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:det/nfe:imposto/nfe:IBSCBS/nfe:gIBSCBS`
- Test: `not($regular) or abs(br:dec($regular/nfe:vTribRegIBSUF) - round($vBC * br:dec($regular/nfe:pAliqEfetRegIBSUF) div 100, 2)) le 0.01`

In English: vTribRegIBSUF is not vBC × pAliqEfetRegIBSUF (R$ 0.01 tolerance).

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