NFE-506
Rejeição: Data de Saída menor que a Data de Emissão (dhSaiEnt …, dhEmi …).
In English In an outgoing NF-e the date of exit (dhSaiEnt) is before the date of issue (dhEmi).
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
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)
Checked with NF-e 4.00, NF-e 4.00 with authorisation protocol