# NFE-1045

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

> Rejeição: Valor do Diferimento do Município difere do calculado [nItem: …] (vDif …).

- 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($mun/nfe:gDif) or abs(br:dec($mun/nfe:gDif/nfe:vDif) - round($vBC * $rMun div 100 * br:dec($mun/nfe:gDif/nfe:pDif) div 100, 2)) le 0.01`

In English: The deferred municipal IBS (gIBSMun/gDif/vDif) is not vBC × the municipal rate (or pAliqEfet) × pDif (R$ 0.01 tolerance).

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