NFE-523
Rejeição: CFOP não é de Operação Estadual e UF emitente igual à UF destinatário [nItem: …] (CFOP …; a critério da UF).
In English An interstate CFOP is used with the issuer and receiver in the same state (a check some states make).
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($c1 = ('2', '6') and ../nfe:dest/nfe:enderDest and $destUF = $emitUF and string(../nfe:emit/nfe:CNPJ | ../nfe:emit/nfe:CPF) != string(../nfe:dest/nfe:CNPJ | ../nfe:dest/nfe:CPF)) or ($ufCons and $ufCons != $emitUF) or ($fin = '3' and $cfop = '6206') or (../nfe:entrega/nfe:UF and ../nfe:entrega/nfe:UF != $emitUF) or (../nfe:retirada/nfe:UF and ../nfe:retirada/nfe:UF != $destUF)
Checked with NF-e 4.00, NF-e 4.00 with authorisation protocol