Exporting to Unit4
The Export Process
Once a document is confirmed automatically or manually, the microservice will run the export to ERP and will either leave the document in an EXPORTED or a FAILED EXPORT status.
- It will also send a text file which contains all of the info / warning messages from the system(you can configure what messages are sent in the extension configuration), this can be used to check if there were any warnings generated. (We are working on a way to make these more visible in the Incoming Invoices Screen).
When the status is EXPORTED the Rossum system will be updated with the transaction number (ERPx) or the EI02 report number (ERPCR/ERP7)
- Please note with ERPCR/ERP7 EI02 / IMS failures should be appropriately handled in Unit4 as we can not “see” any errors once we send the data over. The API we’re using only allows us to push the request to be run later, not to run the EI02.
To re-process a FAILED EXPORT item, a user will need to manually send the document back to the TO_REVIEW status, from the exported page. This is done by selecting the document(s) and then chosing the "Back to Review status" from the options.
Specific Fields
There are some specific fields which have some additional logic on the export process.
Invoice Date
The system will use the Tax Point Date from rossum where available and then fail over to the Issue Date if no tax point date is available. Failing either date, the system will return '1900-01-01T00:00:00.000'. We recommend that you make either/both Tax Point Date or Issue Date mandatory in Rossum.
You may also override this and set the invoice date to the export date/current date by using the extension setting.
Arrival / Registered Date
If the extension setting arrivalDateOutput is set, the <ArrivalDate> XML element will be included for ERP7/CR exports and the registeredDate field will be set for ERPx exports.
If set, the <ArrivalDate> / registeredDate value will be set to either:
-
rossumArrived: thearrived_attimestamp set on the document in Rossum. -
export: the current export timestamp.
If not set, these export fields will not be included.
AP Line Description
This is based on the setting firstLineAsDescription
Amount fields
Working in combination with ignoreTax somtimes the net amount will be set to the gross and the tax will be set to zero, this is on both header and lines.
Product code on matched PO lines
We will always use the product code from the matched purchase order line.
ERP7 / ERPCR PO Invoices With Multiple Lines for the Same Order Line
To avoid downstream issues with the ERP7 / ERPCR systems the system will pre-aggregate invoice lines for the same order and order line number.
This is because the ERP7 / ERPCR import system is unable to handle multiple lines for the same order_id and line number.
The line net, tax, gross and quantity will be aggregated and everything else on the line will be taken from the first line during the aggregation.