Export Supplier invoices

Prerequisites

Exporting supplier invoices from Next Project requires that the customer uses Next e-Invoice as receiving system for supplier invoices. Additional requirements for the export process are:

  • Suppliers are synced
  • Supplier invoices are fetched from Next e-Invoice and booked in accounting system.

Process

For general information on how the e-Invoice module works, consult the user documentation (only available in Swedish for now)

Export criteria

A filter should be used in /supplierinvoice/ to determine which supplier invoices to export to the accounting system:

  • All supplier invoices will pass two approval steps before it is considered approved. Filter should therefore be used to only fetch invoices with approval2 = true.
  • Only export Supplier invoices that have not already been exported. I.e. only look for supplier invoices where externalno is not set.
  • If disablepayment is true, the invoice should be exported, but not be included in payment files generated by the accounting system (blocked for payment).

Flow

The flow for supplier invoices is:

  1. The suppliers of the supplier invoices are exported from Next to the accounting system (created if new, and updated if already existing)
  2. The projects on the supplier invoice accounting rows need to exist in the accounting system. Create the projects in the accounting system if necessary.
  3. The supplier invoice and its related accounting rows are exported from Next e-Invoice, using the endpoint and filter in the export criteria above, to the accounting system to update the accounts receivable and the ledger
    1. To get accounting details for a supplier invoice you can use endpoint /supplierinvoice/{supplierinvoice_id}/accounting/
  4. Supplier invoice info is updated in Next e-Invoice through PUT /supplierinvoice/{supplierinvoice_id}
    1. externalno = supplier invoice number in accounting system
    2. integrationmessage - for example “Successfully exported” or error message
    3. exporteddate - date for export
  5. voucher rows are imported from accounting system to Next to generate costs in projects (see separate scenario for voucher rows)