Electronic Invoice makes Italian e-invoicing part of the document you are already working on. It generates a compliant FatturaPA XML from your posted sales and purchase documents, builds reverse-charge self-invoices out of your VAT entries, and turns the XML invoices your suppliers send you into ready-to-post purchase documents.
The app covers the three directions of the cycle:
The app builds the file and passes it to the transmission codeunit you configure. The connection to SDI itself is provided by your intermediary's connector app — see section 1.
The field and button names below are those shown when the English language is active.
Page: Electronic Document Format
Business Central already uses this page to know which codeunit builds a FatturaPA file and which one sends it. The app adds two more:
The last three come from your intermediary's connector app. Without them the app still generates and downloads files, but Send to SDI and Import From Service have nothing to call.
Page: Sales & Receivables Setup
Page: Company Information
Fill the fiscal identification fields, and pay particular attention to Liquidation Status: the export refuses to build a file while it is blank, because the value is mandatory in the XML.
Page: Fattura Document Type List
The list of TD codes (TD01, TD04, TD16 … TD27). The app replaces the standard Self-Billing column with its own, which it keeps aligned with the standard one. Tick Self-Billing on every code you want to be usable on a purchase document — typically TD16, TD17, TD18, TD19 and TD20. A code that is not ticked cannot be selected on a purchase document.
The XML is only as good as the data behind it. Before the first send, check:
MP01, MP05, …).TP01, TP02, …).Page: Posted Sales Invoice / Posted Sales Credit Memo (cards and lists)
Three actions are added to the ribbon:
What happens: the generated file name is stored on the document in Elect. Inv. File Name, in the form IT<your VAT number>_<progressive>.xml. That field is the app's record that the document has been processed: as long as it is filled, you can see at a glance which documents have already been sent.
If you need to rebuild a file — because you corrected something, or because the transmission failed — press Reset File Name first, then generate again.
Beyond the standard FatturaPA content, the file carries:
<Allegati>, so the PDF travels with the invoice.AltriDatiGestionali on the exempt lines.<Causale> element. On self-invoices in foreign currency it is filled automatically (see section 6).Characters that FatturaPA does not accept are normalised automatically, and telephone numbers are checked against the 5–12 digit rule before the file is built.
Page: Sales & Receivables Setup → Validate Document On Posting
With the option on, every sales document is checked as part of posting, and every purchase document destined to become a self-invoice is checked too.
What is checked: company information, the FatturaPA number series, the payment method and its Fattura PA code, the payment terms and their Fattura code, and — on purchases — that the Vendor Cr. Memo No. does not exceed 20 characters, which is a frequent cause of rejection.
What happens: the problems are collected and shown together in the standard Error Messages page, instead of stopping at the first one. Fix them all in one pass and post again.
When you post a purchase with reverse charge, Business Central creates both purchase and sales VAT entries. The sales side is the self-invoice you owe to SDI, and the app builds it for you.
Page: Purchase Invoice / Purchase Credit Memo
What happens: the self-invoice is built from the VAT entries themselves — one XML line per VAT identifier — so the amounts always agree with what was actually posted. The SDI Id field carries the identifier of the original supplier invoice when the code you use requires it (TD16).
Documents in foreign currency. The VAT entries only hold local-currency amounts, which is not enough for the file. For each line the app sums the base amounts of the purchase lines sharing the same VAT identifier and writes an AltriDatiGestionali block with the currency code, the original amount and the document date. The header XML Document Reason is filled automatically with the document total in the original currency and the exchange factor used. Amounts are computed from the original line values rather than from the currency factor, so no rounding drift is introduced.
If you want a different wording in <Causale>, type it into XML Document Reason before generating: the automatic text is only written when the field is empty.
Some of the data the XML needs is discovered after posting. The app extends the standard update pages so it can still be corrected:
Change the value, confirm, then generate the file again (remember Reset File Name if one was already produced).
Copying a document never carries e-invoicing data across: file name, Fattura document type, SDI Id and customer purchase order date are cleared on the copy, so a new document is never mistaken for one already sent.
Page: XML Invoice List
This is the inbox of everything that arrived from your suppliers. One row per XML file:
Actions:
Page: XML Invoice Lines
The Detail action shows exactly what the app read out of the file, as name/value pairs grouped in sections: fornitore (supplier), cliente (your company), testata (document header), contratto (contract references), pagamenti (payment schedule) and righe (lines). Nothing is hidden — when a value did not end up where you expected on the purchase invoice, this page tells you whether it was missing from the file or lost in the mapping.
Page: XML Invoice List → Validate
Action: select a row and press Validate, then confirm.
What happens: the app creates a Purchase Invoice — or a Purchase Credit Memo when the document type in the file is TD04 — and fills it:
DettaglioLinee, with description (split over Description and Description 2 when longer than 50 characters), unit of measure, VAT %, quantity and direct unit cost. The item or account behind each line comes from the mapping described in section 10.Review the draft, correct what needs correcting, and post it as any other purchase invoice. Once posted, the XML Invoice List row shows NAV Invoice No. and Posted.
Undo Validate deletes the draft document and returns the row to the not-validated state, so you can fix a mapping and try again. It only works while the document has not been posted.
Page: Item Vendor Mapping
One line per supplier code you want to recognise:
Resolution order. For each line of the file the app looks for a value to match, first the supplier's own item code, then the SKU, then the description. It then tries, in order:
Create the global default row first: it is the safety net that lets any file be imported, typically pointing to a costs G/L account you review manually. Then add specific rules for the suppliers whose invoices you receive most often.
Page: Job Queue Entries
Create one entry that runs Codeunit 18161915 — PTG EI Scheduler on the recurrence you want (nightly is typical).
What happens: the entry runs the download codeunit — collecting the delivery notifications of the files you sent — and then the import codeunit, loading the new supplier invoices into the XML Invoice List. Your team arrives to a populated inbox and only has to review and validate.
<Causale> is yours to control. Type your own text in XML Document Reason and the app leaves it alone; leave it empty on a foreign-currency self-invoice and the app fills it.