NFE-1042
Rejeição: Informado referenciamento a nível de item em Nota de crédito (DFeReferenciado).
In English A credit note references documents per item (DFeReferenciado), which only a return with partial refusal (type 06) may.
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($fin = '5' and $itemRefs) or $credit = '06'
Checked with NF-e 4.00, NF-e 4.00 with authorisation protocol