NFE-697
The rule sets below word this rule differently; each wording is shown with its rule set.
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.
Rejeição: Alíquota interestadual do ICMS com origem diferente do previsto [nItem: …] (4% e origem …).
nfe:infNFe/nfe:det
not($dif/nfe:pICMSInter) or br:dec($dif/nfe:pICMSInter) != 4 or $icms/nfe:orig = ('1', '2', '3', '8')
Checked with NF-e 4.00, NF-e 4.00 with authorisation protocol
Rejeição: Alíquota interestadual do ICMS com origem diferente do previsto [nItem: …] (…% e produto importado, origem …).
nfe:infNFe/nfe:det
not($dif/nfe:pICMSInter) or not(br:dec($dif/nfe:pICMSInter) = (7, 12)) or not($icms/nfe:orig = ('1', '2', '3', '8'))
Checked with NF-e 4.00, NF-e 4.00 with authorisation protocol