Export Customer invoices
Prerequisites
- The customer invoice is created in Next and is approved before it is transferred to accounting system.
- Accounting system is master for invoice number
Limitations
- Next Project does not store the rounding amount for an invoice even though it is shown on the invoice pdf. The amount is therefore not available to fetch from the API.
Integrators need to handle rounding amounts in the integration.
There are settings in Next Project to not use rounding on invoice pdfs - the data in the API will look the same regardless of this setting.
Relevant endpoint examples
List customer invoices: /customerinvoice/
Scenarios
When it comes to customer invoices it is important to make sure that the integration supports scenarios such as:
- Invoice with and without VAT
- Invoice with tax reduction (Sweden)
- Invoice with reversed contractor VAT - if applicable (omvänd byggmoms)
- Credit invoice (part credit and full credit)
- Invoices with or without OCR
- Invoice updates to Next – external invoice number, paid date etc
- Invoices that are unlocked and locked again in Next
- Invoices that are locked, but where the subsequent integration job has failed
Process for creating and synchronizing customer invoices
Customer invoices are usually handled according to the following steps:
- A preliminary customer invoice is created and given a preliminary number shown in the field
invoicenumber
- The invoice is reviewed by a project leader or corresponding role and marked
readyforinvoice
if ok - The invoice is reviewed by an administrator and marked as
locked
to indicate that invoice is ready to be transferred to the accounting system invoiceno
will be set by Next, but note that this is only an internal number in Next.- The invoice is exported to the accounting system to update the accounts receivable and the ledger
- Definite invoice number is set by accounting system.
- The definite invoice number from the accounting system is posted to the field
extinvoiceno
in Next - The invoice is distributed to the customer. Distribution is generally handled from Next by using our customer invoice distribution service (Next c-invoice) which also supports electronic invoices.
Comments to above
- It is recommended to let the accounting system generate the definite invoice number and post it to Next since this will reduce the risk of mismatches and also make it possible for users to create manual invoices in the accounting system without the need of having multiple number series.
- The field
extinvoiceno
can be used as a feedback field to indicate that there are pending jobs or if errors have occurred for a specific invoice. For example:- When the GET from accounting system is started, “Pending” is posted to the field
- If an error occurs the error message with a prefix is posted to the field, for ex “!ErrorXXX”
- An invoice can be locked, unlocked and locked again. It is therefore crucial that the integration only handles a POST once to update the accounts receivable and the ledger. Scenarios that might lead to an invoice being unlocked could be:
- An error has occurred where changes need to be made to make it possible to trigger a new export with correct data.
- The customer address or reference is wrong and needs to be updated before distributing the invoice to the customer.
- An attachment is missing and needs to be added before distributing the invoice to the customer.
- Invoices should therefore only be exported if:
locked
is true andextinvoiceno
is emptylocked
is true,extinvoiceno
has an error message but the record has been changed since the last run.
Updated 3 months ago
Did this page help you?