# SDI-00418

Source: https://xmlvalid.com/rules/SDI-00418

> 2.1.1.3 <Data> antecedente a 2.1.6.3 <Data>

- Level: error
- Rule sets: SdI checks (FatturaPA ordinary invoice) Specifiche tecniche 1.9.1
- Context: `/p:FatturaElettronica/FatturaElettronicaBody`
- Test: `$type != 'TD04' or (every $d in DatiGenerali/DatiFattureCollegate/Data satisfies $date ge xs:date($d))`

> 2.1.1.3 <Data> antecedente a 2.1.2.2 <DataFR>

- Level: error
- Rule sets: SdI checks (FatturaPA simplified invoice) Specifiche tecniche 1.9.1
- Context: `/s:FatturaElettronicaSemplificata/FatturaElettronicaBody`
- Test: `not(DatiGenerali/DatiFatturaRettificata) or $date ge xs:date(DatiGenerali/DatiFatturaRettificata/DataFR)`

In English: The invoice date (2.1.1.3) is before the date of the invoice it refers to: 2.1.6.3 in a credit note, DataFR (2.1.2.2) in a simplified invoice.

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