This is an old revision of the document!
Lime CRM layout
These tables and fields must be created before you can use the ERP Connector. The fields can be created by running the SQL-scripts in the installation-folder, but if you already have a hosted Lime CRM application, you need to create them manually.
Company
On the company card, some fields are mandatory and some are not but are hardcoded by database name in the javascript code in the LBS app as well as in Syncify's migration scripts. If they are not named as they should or if they should not be sent to the ERP system that counts as a customization.
The following company fields are used:
Table name: company
| Field Name | Field Type | Field Label | Required | Length | Part of LIP Package | Description |
|---|---|---|---|---|---|---|
| name | text field | Name | True | 200 | No | The name of the company |
| erpid | text field | key | False | 16 | Yes | The integration key, Set label key to avoid duplicates |
| erp_turnover_yearnow | decimal | N/A | False | N/A | Yes | Populated by the integration |
| erp_turnover_lastyear | decimal | N/A | False | N/A | Yes | Populated by the integration |
| erpconnector_graph | html (tab) | N/A | N/A | N/A | Yes | HTML tab for showing the graph for paid invoices the last 5 years |
| invoice | relation (tab) | N/A | N/A | N/A | Yes | Populated by the integration |
Invoice
Invoices are connected to the company on “Customer number ERP” when generated in Lime CRM from the ERP-system. The complete invoice table is part of the LIP Package.
Table name: invoice
| Field name | Field Type | Field label | Required | Length | Description |
|---|---|---|---|---|---|
| invoice_number | text field | N/A | False | 64 | Unique invoice number |
| company | relation (field) | N/A | False | 256 | Relation to company |
| customerid | text field | N/A | False | 128 | Customer ID for matching to company |
| customer_reference | text field | N/A | False | N/A | Customer reference from ERP |
| coworker | relation (field) | N/A | False | N/A | Company reference (Our reference) |
| invoice_type | text field | N/A | False | 64 | Invoice type |
| invoice_date | time (date) | N/A | False | N/A | When invoice is booked |
| invoice_expires | time (date) | N/A | False | N/A | When invoice expires |
| invoice_sum | decimal | N/A | False | N/A | Sum ex VAT (moms) |
| invoice_vat | decimal | N/A | False | N/A | VAT (moms) |
| invoice_total_sum | decimal | N/A | False | N/A | Sum incl VAT |
| currency | text field | N/A | False | 32 | Currency |
| invoice_balance | decimal | N/A | False | N/A | Invoice balance (saldo) |
| paid | Yes/no | N/A | False | N/A | Yes if it is paid |
| paid_date | time (date) | N/A | False | N/A | The date when payment is registered |
| invoice shredded | Yes/no | N/A | False | N/A | Yes if the payment is shredded (makulerad) |
Invoice rows
Invoice rows are connected to a invoice on invoice number in the python import. The complete invoice row table is part of the LIP Package.
Table name: invoicerow
| Field name | Field Type | Field label | Required | Length | Description |
|---|---|---|---|---|---|
| invoice | relation (field) | N/A | Yes | N/A | Relation to invoice |
| item | text field | N/A | Yes | 128 | Item |
| description | text field | N/A | Yes | 128 | Description of Items |
| units | decimal | N/A | Yes | N/A | Number of items |
| row_margin | decimal | N/A | Yes | N/A | Contribution margin |
| row_value | decimal | N/A | Yes | N/A | Sum of row |
| rowid | text field | N/A | Yes | 32 | Used to make a row unique (hidden) |
Lime CRM Bootstrap app
Download the Lime CRM Bootstrap app from the Lime CRM App Store and follow the instructions for installing found there.
The link to the add-on in Lime CRM App Store is: https://appstore.lime-bootstrap.com/#erpconnector
Syncify service
Lastly, the service on the ERP-system server is installed and configured. Follow the instructions found in the Installation folder on how to complete the installation.