# NFE-382

Source: https://xmlvalid.com/rules/NFE-382

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

- Level: error
- Rule sets: SEFAZ authorisation rules of NF-e 4.00 MOC 7.0 Anexo I, NTs up to 2026.010
- 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')`

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

- Level: error
- Rule sets: SEFAZ authorisation rules of NF-e 4.00 MOC 7.0 Anexo I, NTs up to 2026.010
- Context: `nfe:infNFe/nfe:det`
- Test: `not($simple and $cst = '60') or $cfop = ('5405', '5656', '5667', '5910')`

In English: An NF-e with the DANFE Simplificado Tipo 2 uses a CFOP the CST does not allow (CST 00, 20, 40, 41, 90 with 5101 to 5104, 5115, 5910; CST 60 with 5405, 5656, 5667, 5910; exceptions for RS, CE and SP).

Validate a document against these rules: https://xmlvalid.com/validate
