NFE-354
Rejeição: Informado grupo de devolução de tributos para NF-e que não tem finalidade de devolução de mercadoria [nItem: …].
In English The returned taxes group (impostoDevol) is only for returns (finNFe 4) and credit notes of type 03 and 06.
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(nfe:impostoDevol) or $fin = '4' or $ide/nfe:tpNFCredito = ('03', '06')
Checked with NF-e 4.00, NF-e 4.00 with authorisation protocol