Invoice imports — QUiCK and MOL

The shared QUiCK import engine, processing of the MOL folder, the rights and the differences in content scope.

The invoice list provides two import endpoints. The QUiCK import uses the same shared engine as the nightly background job; both imports insert through the shared addInvoice() path.

QUiCK import (finance/invoice.quickimport)

  1. Right: core modify + quickimport; the client must be among the user's allowed companies (otherwise error_quickimport_client).
  2. Dlbtquickimport::run() brings in, for one client and period, the invoices that exist in QUiCK but not yet in the system.
  3. The same engine runs in the cron::quick_invoice background job; building an invoice from the invoice image happens only in the admin run.
  4. With the debug right the response gives more detailed diagnostics.

MOL import (finance/invoice.mol)

molImport() processes the files of the folder set in mol_import_dir (under the storage root) and links them to invoices; the response gives a summary or an error. Error keys: error_mol_import_dir, error_mol_import_dir_not_found, error_mol_no_files, error_mol_import_none.

Data model

Table names carry the installation's own prefix in the database: invoice and invoice_item (through the shared insert path), doc, doc_link; library: dlbtquickimport.

Permissions

KeyClassContent scope
quickimportlegacy permission table onlyclient among the user's allowed companies
molSUBSCRIPTIONthe code checks no content scope here

Known limitations

The MOL import reads a configured folder on the server, so users do not upload the files through the interface, and the endpoint does not narrow by content scope.