# NFE-521

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

> Rejeição: Operação Interna e UF do emitente difere da UF do destinatário/remetente contribuinte do ICMS [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`
- Test: `not($idDest = '1' and $indIEDest = '1' and ../nfe:dest/nfe:enderDest and $destUF != $emitUF) or $ufCons = $emitUF or ($ide/nfe:indPres = '1' and ../nfe:transp/nfe:modFrete = '9')`

In English: An internal operation (idDest 1) has a contributor receiver in another state.

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