Supplier invoice import
Turn a ZIP of Italian FatturaPA XML e-invoices into Suppliers and draft Purchase Invoices.
Import Supplier Invoice reads a ZIP of FatturaPA XML files, Italy's e-invoice format. Each file becomes a Supplier (found by Tax ID or name, or created), its Contact and Address, and a draft Purchase Invoice with the XML attached.
Import a ZIP
Create an Import Supplier Invoice. Set Company, Item Code (the item every invoice line uses), Supplier Group, Tax Account and Default Buying Price List. Attach the Zip File.
Press Import Invoices (erp.import_supplier_invoice.process_file_data). The status becomes Processing File Data and a background job starts.
The job reads the ZIP in chunks of ten files, each chunk in its own transaction. If a node dies, at most one chunk is lost and the next run picks up from the last committed chunk.
Check the status: File Import Completed, Partially Completed - Check Error Log, or Error when the ZIP cannot be read. A file that fails gets an Error Log entry such as "Unable to read bad.xml".
Review and submit the draft Purchase Invoices.
The record is named Import Invoice on <time>. Starting without a ZIP is refused. macOS resource forks and folders inside the ZIP are skipped.
What a file becomes
For a file from Rossi Fornitori Srl with Tax ID IT01234567890:
| Record | Values |
|---|---|
| Supplier | Rossi Fornitori Srl, the import's Supplier Group, fiscal code and fiscal regime from the file |
| Contact | First name Rossi Fornitori Srl |
| Address | Via Roma 1, Milano, MI, 20100, Italy, type Billing |
| Purchase Invoice | Draft, currency EUR, Supplier Invoice No FT-100, bill date, destination code and document type from the file |
| Items | One row per line with the import's Item Code, the file's item name, quantity, rate and UOM. A missing UOM such as pz is created |
| Taxes | One Actual row on the Tax Account with the file's tax, 17.60 |
| Discount | 5 on the Grand Total, giving 92.60 |
| Payment Schedule | Mode, IBAN and due date from the file, the amount cut by the discount to 92.60 |
The file's own total, 97.60, is kept as Imported Grand Total. Files of a supplier already created reuse that Supplier.
The reader takes UTF-8, UTF-8 with a byte order mark, and UTF-16, and refuses files with a DOCTYPE.