# SDI-00409

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

> Fattura duplicata nel lotto

- Level: error
- Rule sets: SdI checks (FatturaPA ordinary invoice) Specifiche tecniche 1.9.1
- Context: `/p:FatturaElettronica/FatturaElettronicaBody`
- Test: `not(../FatturaElettronicaBody[not(. is current())][DatiGenerali/DatiGeneraliDocumento[Numero = $number and (if ($art73) then xs:date(Data) = $date else year-from-date(xs:date(Data)) = year-from-date($date)) and ((TipoDocumento = 'TD04') = ($type = 'TD04'))]])`

> Fattura duplicata nel lotto

- Level: error
- Rule sets: SdI checks (FatturaPA simplified invoice) Specifiche tecniche 1.9.1
- Context: `/s:FatturaElettronicaSemplificata/FatturaElettronicaBody`
- Test: `not(../FatturaElettronicaBody[not(. is current())][DatiGenerali/DatiGeneraliDocumento[Numero = $number and year-from-date(xs:date(Data)) = year-from-date($date) and ((TipoDocumento = 'TD08') = ($type = 'TD08'))]])`

In English: Two invoices in the same file have the same number and year (the same date for invoices under art. 73); a credit note may share the number of an invoice.

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