# NFE-1142

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

> Rejeição: Soma dos valores de IBS e CBS em compras governamentais divergente [nItem: …].

- 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($purchase) or abs(br:dec($purchase/nfe:vTribIBSUF) + br:dec($purchase/nfe:vTribIBSMun) + br:dec($purchase/nfe:vTribCBS) - (br:dec($uf/nfe:vIBSUF) + br:dec($mun/nfe:vIBSMun) + br:dec($cbs/nfe:vCBS))) le 0.04`

In English: The IBS and CBS of gTribCompraGov differ from vIBSUF + vIBSMun + vCBS by more than R$ 0.04.

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