NFE-382

The rule sets below word this rule differently; each wording is shown with its rule set.

error: the document is invalid

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.

Message

Rejeição: CFOP não permitido para o CST informado [nItem: …] (CST …, CFOP …).

Context
nfe:infNFe/nfe:det
Test
not($simple and $cst = ('00', '20', '40', '41', '90')) or $cfop = ('5101', '5102', '5103', '5104', '5115', '5910') or ($emitUF = 'RS' and $cst = '90' and $cfop = '5949') or ($emitUF = 'CE' and $cst = '90' and $cfop = '5405') or ($emitUF = 'SP' and $cst = '40' and $cfop = '5949')

Checked with NF-e 4.00, NF-e 4.00 with authorisation protocol

Message

Rejeição: CFOP não permitido para o CST informado [nItem: …] (CST 60, CFOP …).

Context
nfe:infNFe/nfe:det
Test
not($simple and $cst = '60') or $cfop = ('5405', '5656', '5667', '5910')

Checked with NF-e 4.00, NF-e 4.00 with authorisation protocol