NFE-600
Rejeição: CSOSN incompatível na operação com Não Contribuinte [nItem: …] (CSOSN …).
In English A sale to a non-contributor (indIEDest 9) has a CSOSN outside 102, 103, 300, 400 and 500.
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($indIEDest = '9' and $tpNF = '1' and $csosn) or $csosn = ('102', '103', '300', '400', '500') or $cfop = ('5915', '5916', '6915', '6916', '5912', '5913') or ($crt = '4' and $csosn = '900' and $cfop = ('5904', '6904', '5551', '6551'))
Checked with NF-e 4.00, NF-e 4.00 with authorisation protocol