NFE-521
Rejeição: Operação Interna e UF do emitente difere da UF do destinatário/remetente contribuinte do ICMS [nItem: …].
In English An internal operation (idDest 1) has a contributor receiver in another state.
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:det
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')
Checked with NF-e 4.00, NF-e 4.00 with authorisation protocol