NFE-870
Rejeição: Data de validade incompatível com data de fabricação [nItem: …].
In English A batch's expiry date (dVal) is before its date of manufacture (dFab).
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
every $r in $prod/nfe:rastro satisfies not(exists(br:date($r/nfe:dVal)) and exists(br:date($r/nfe:dFab))) or br:date($r/nfe:dVal) ge br:date($r/nfe:dFab)
Checked with NF-e 4.00, NF-e 4.00 with authorisation protocol