InvoiceSpec / Rules Registry / fatturapa-1-2 / FATTURAPA-IT-00404
fatal ASSERTION · FATTURAPA-IT-00404 FatturaPA 1.2.2 (Italian SdI) (UBL-2.1) Jurisdiction: IT

FATTURAPA-IT-00404: SdI Error 00404: Duplicate invoice number and date combination already registered in Sistema di Interscambio

Official FatturaPA 1.2.2 (Italian SdI) Spec ↗
01. Technical Specification & XPath Evaluation Context

This rule enforces the uniqueness of the invoice number (BT-1) combined with the invoice issue date (BT-2) within the Italian Sistema di Interscambio (SdI). The context XPath selects the Numero element (BT-1) inside DatiGeneraliDocumento. The Schematron test normalize-space(Numero) != "" ensures the invoice number is not empty or whitespace-only. However, the official assertion message indicates a duplicate check: SdI rejects invoices where the same combination of invoice number and date has already been registered. This is a stateful validation performed by the SdI, not purely by the XPath. The XPath test itself only checks for non-empty Numero, but the rule code FATTURAPA-IT-00404 is associated with the duplicate detection error. In the context of EN 16931 and Peppol BIS Billing 3.0, BT-1 (Invoice number) and BT-2 (Invoice issue date) must be present and together form a unique identifier for the invoice. The SdI enforces this uniqueness across all invoices submitted by a given supplier. The Schematron rule as given is a simplified representation; the actual duplicate check is performed by the SdI backend. For developer documentation, it is crucial to understand that this rule triggers when the invoice number is empty (which would also cause a duplicate if multiple empty numbers are sent) or when the SdI detects a duplicate combination. The XPath evaluation context is the Numero element, and the test ensures it has non-whitespace content. If the test fails (i.e., Numero is empty), the error 00404 is raised, but the message about duplicate is misleading; however, in practice, an empty number would be rejected with a different error. The rule is fatal, meaning the invoice is rejected.

Evaluated XPath Location:
/p:FatturaElettronica/FatturaElettronicaBody/DatiGenerali/DatiGeneraliDocumento/Numero
Deterministic Remediation Steps

1. Ensure that the invoice number (BT-1) is always populated with a non-empty, non-whitespace value. 2. Verify that the combination of invoice number and invoice date (BT-2) has not been used in any previously submitted invoice to the SdI for the same supplier VAT number. 3. If resubmitting a corrected invoice, use a new unique invoice number or ensure the original submission was not accepted. 4. Implement client-side validation to check for empty or whitespace-only invoice numbers before sending to SdI. 5. For duplicate detection, maintain a local database of previously sent invoice numbers and dates per supplier to avoid duplicates. 6. Note that the SdI performs the duplicate check; the Schematron rule provided is a simplified check for non-empty number, but the error code 00404 is specifically for duplicates. Therefore, also ensure that the invoice number is unique per supplier and date.

02. Side-by-Side UBL-2.1 Payload Diff (Rejected vs. Compliant)
--- a/invoice-rejected.xml (FATTURAPA-IT-00404) FAIL
1 - <!-- Incorrect: Invoice number is empty or whitespace, which will trigger FATTURAPA-IT-00404 -->
2 <FatturaElettronicaBody>
3 <DatiGenerali>
4 <DatiGeneraliDocumento>
5 <TipoDocumento>TD01</TipoDocumento>
6 <Divisa>EUR</Divisa>
7 <Data>2023-10-01</Data>
8 <Numero> </Numero> <!-- Empty or whitespace-only invoice number -->
9 <ImportoTotaleDocumento>100.00</ImportoTotaleDocumento>
10 </DatiGeneraliDocumento>
11 </DatiGenerali>
12 </FatturaElettronicaBody>
+++ b/invoice-compliant.xml (EN 16931 VALID)
PASS
1 + <!-- Correct: Invoice number is provided and non-empty -->
2 <FatturaElettronicaBody>
3 <DatiGenerali>
4 <DatiGeneraliDocumento>
5 <TipoDocumento>TD01</TipoDocumento>
6 <Divisa>EUR</Divisa>
7 <Data>2023-10-01</Data>
8 + <Numero>INV-2023-001</Numero> <!-- Unique invoice number -->
9 <ImportoTotaleDocumento>100.00</ImportoTotaleDocumento>
10 </DatiGeneraliDocumento>
11 </DatiGenerali>
12 </FatturaElettronicaBody>
03. Interactive FatturaPA 1.2.2 (Italian SdI) Validation & Auto-Fix Workbench
3 CREDITS
invoice.xmlUNKNOWN
DETECTED SOURCESAP S/4HANA
BT-131 LINE SUM0.00 EUR
BT-106 HEADER0.00 EUR
SCHEMATRON: 1 FATAL· 1ms
Peppol BIS Billing 3.0
BR-01Unrecognized XML Root or Missing EN 16931 Namespace
Spec & Diff
xpath: /

Input does not contain a valid OASIS UBL 2.1 <Invoice> or UN/CEFACT <rsm:CrossIndustryInvoice> root element.

fix: Ensure payload is valid UBL 2.1 or CII D16B XML, or drop an uncompressed ZUGFeRD/Factur-X PDF/A-3.

Automate SAP S/4HANA → Peppol BIS Billing 3.0 AP Delivery

Deploy certified Peppol Access Point & ZUGFeRD ERP connector

04. Adjacent FatturaPA 1.2.2 (Italian SdI) Assertions Browse All Rules →