NFE-590
Rejeição: Informado CST para emissor do Simples Nacional (CRT=1 ou 4) [nItem: …] (CST …).
In English An issuer in the Simples Nacional (CRT 1 or 4) gives a CST; it takes a CSOSN, except the fuel CSTs 02, 15, 53 and 61.
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($crt = ('1', '4')) or not($cst) or $cst = ('02', '15', '53', '61')
Checked with NF-e 4.00, NF-e 4.00 with authorisation protocol