# NFE-506

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

> Rejeição: Data de Saída menor que a Data de Emissão (dhSaiEnt …, dhEmi …).

- 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`
- Test: `not($tpNF = '1' and $ide/nfe:dhSaiEnt castable as xs:dateTime and $ide/nfe:dhEmi castable as xs:dateTime) or xs:dateTime($ide/nfe:dhSaiEnt) ge xs:dateTime($ide/nfe:dhEmi)`

In English: In an outgoing NF-e the date of exit (dhSaiEnt) is before the date of issue (dhEmi).

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