NFE-772
Rejeição: Operação Interestadual e UF de destino igual à UF de origem (UF …).
In English An interstate operation (idDest 2) has the receiver in the issuer's state, between different CNPJs, with no delivery or pick-up place 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
not($idDest = '2' and $dest/nfe:enderDest and $destUF = $emitUF and $cnpjDiffers) or ($ufCons[. != $emitUF]) or ($deliveryUF and $deliveryUF != $emitUF and not($pickupUF)) or ($pickupUF and $pickupUF != $destUF and not($deliveryUF)) or ($deliveryUF and $pickupUF and $deliveryUF != $pickupUF)
Checked with NF-e 4.00, NF-e 4.00 with authorisation protocol