- Introduction
- Prerequisites
- Installation
- Configuration
- Usage
- Advanced Options
- Maintenance and Diagnostics
- FAQ
DoliHorus - Horus Accounting Synchronisation for Dolibarr
DoliHorus is a Dolibarr module that synchronises your invoices and payments between Dolibarr and Horus, the Belgian accounting software. It integrates directly into your Dolibarr interface and communicates with Horus via a secure OAuth2 connection, with zero external dependencies (native cURL).
Introduction
What is Horus?
Horus is a Belgian accounting software used by many fiduciaries and companies in Belgium. It provides comprehensive management of accounting, journals, accounts and tax declarations.
Why DoliHorus?
- Automatic synchronisation: Send your sales and purchase invoices directly from Dolibarr to Horus, without re-entering data
- Client sync: Automatically create and update client records in Horus from Dolibarr
- Payment tracking: Retrieve payment statuses from Horus and automatically create payments in Dolibarr
- Credit notes: Send your credit notes to Horus in one click
- Configurable tax mapping: Configure the correspondence between your Dolibarr VAT rates and Horus accounting accounts
- Secure connection: OAuth2 authentication for reliable and secure communication
- Multi-entity: Compatible with Dolibarr multi-entity installations
- Zero dependencies: Works with native cURL, no external libraries required
Prerequisites
Before installing DoliHorus, make sure your environment meets the following requirements:
| Component | Minimum version |
|---|---|
| Dolibarr | 18.0 or higher |
| PHP | 7.4 or higher |
| PHP Extensions | curl, json |
You will also need a Horus account with API access (OAuth2 credentials: Client ID and Client Secret). Contact your Horus provider to obtain this information.
Note: DoliHorus is compatible with Dolibarr multi-entity installations. Each entity can have its own Horus configuration.
Installation
From the DoliStore
- Go to the DoliStore and search for DoliHorus
- Purchase the module and download the ZIP archive
- Extract the archive into the
htdocs/custom/folder of your Dolibarr installation - The final folder should be
htdocs/custom/dolihorus/
Activation in Dolibarr
- Log in to Dolibarr as an administrator
- Go to Home → Setup → Modules/Applications
- Search for "DoliHorus" in the modules list
- Click the Enable button
Once the module is activated, a new DoliHorus menu appears in your navigation bar.
Configuration
DoliHorus configuration is done in three steps from the module's administration pages.
Step 1: OAuth2 Connection
- Go to DoliHorus → Setup (page
setup.php) - Enter your Horus instance URL
- Enter your OAuth2 Client ID
- Enter your OAuth2 Client Secret
- Click Test Connection to verify that the credentials are correct
- Once the connection is validated, click Save
Important: OAuth2 credentials are provided by your Horus administrator or fiduciary. Make sure API access is enabled on your Horus account.
Step 2: Accounting Settings
- Go to DoliHorus → Settings (page
config.php) - Select the Horus accounting folder to use
- Configure the journals:
- Sales journal (for customer invoices)
- Purchase journal (for supplier invoices)
- Financial journal (for payments)
- Set the default accounting accounts for products and services
- Configure the default payment type and payment method mapping
- Confirm the configuration
Tip: You can set a specific Horus accounting account for each product or service in its Dolibarr record. The default account will only be used if no specific account is defined.
Step 3: Tax Mapping
- Go to DoliHorus → Tax Mapping (page
tax_mapping.php) - The page displays all your Dolibarr VAT rates
- For each rate, associate the corresponding Horus tax code
- Confirm the mapping
| Dolibarr rate | Typical Horus code | Description |
|---|---|---|
| 21% | 21 | Standard VAT |
| 12% | 12 | Reduced VAT |
| 6% | 6 | Reduced VAT |
| 0% | 0 | Exempt / Intra-community |
Tip: Make sure to map all your VAT rates in use before sending invoices. An unmapped rate will cause an error when sending.
Usage
Client Synchronisation
DoliHorus automatically synchronises client records between Dolibarr and Horus.
Automatic synchronisation:
- When a Dolibarr client is used in an invoice sent to Horus, DoliHorus checks whether it already exists in Horus
- If the client does not exist, it is automatically created with its information (name, address, VAT number)
- If the client already exists, its information is updated if necessary
- Lookup is performed by VAT number to avoid duplicates
Manual synchronisation:
- Open a third-party record in Dolibarr
- Click on the Horus tab
- Click Synchronise to Horus to force synchronisation
Sending Sales Invoices
- Open a validated customer invoice in Dolibarr
- Click on the Horus tab
- Review the invoice summary and accounting information
- Click Send to Horus
- The system transmits the invoice with all lines, VAT amounts and accounting accounts
Automatic sending:
You can enable automatic sending in the module settings. Invoices will then be sent to Horus as soon as they are validated in Dolibarr.
Sending Purchase Invoices
The process is identical for supplier invoices:
- Open a validated supplier invoice
- Click on the Horus tab
- Click Send to Horus
- The invoice is recorded in the configured purchase journal
Sending Credit Notes
Credit notes are sent in the same way as invoices:
- Open a validated credit note in Dolibarr
- Click on the Horus tab
- Click Send to Horus
- The credit note is recorded in Horus with negative amounts
Retrieving Payments
DoliHorus can query Horus to retrieve payment statuses for your invoices.
- Go to DoliHorus → Payments
- Click Check Payments to query Horus
- Invoices paid in Horus are identified
- Click Create Payments to automatically record payments in Dolibarr
Tip: You can set up a scheduled task (cron) to automate payment verification at regular intervals.
Synchronisation Statuses
| Status | Description |
|---|---|
| Not sent | The invoice has not yet been sent to Horus |
| Sent | The invoice has been successfully transmitted to Horus |
| Paid | Horus indicates that the invoice has been paid |
| Error | Sending failed (see the error message for details) |
Advanced Options
The DoliHorus → Setup page contains additional settings to fine-tune the module's behaviour.
Accounting Accounts per Product
You can set a specific Horus accounting account for each product or service in Dolibarr. When sending an invoice, DoliHorus will use:
- The accounting account defined on the product (if set)
- The default accounting account configured in the module settings (otherwise)
Payment Type Mapping
Configure the correspondence between Dolibarr payment methods and Horus payment types:
| Dolibarr method | Horus type |
|---|---|
| Bank transfer | Transfer |
| Credit card | Card |
| Direct debit | Direct debit |
| Cash | Cash |
Automatic Sending
Enable automatic sending so that invoices are transmitted to Horus upon validation. This option can be configured separately for:
- Sales invoices
- Purchase invoices
- Credit notes
Multi-entity
In multi-entity mode, each Dolibarr entity has its own DoliHorus configuration:
- Separate OAuth2 credentials
- Separate Horus accounting folder
- Independent journals and accounting accounts
- Entity-specific tax mapping
Maintenance and Diagnostics
The maintenance page allows you to check the status of your installation and diagnose any issues.
Connection Verification
Go to DoliHorus → Maintenance (page maintenance.php) to run a check:
- OAuth2 connection: Authentication test with Horus
- Valid token: Verification that the access token is active
- Accounting folder: Validation of access to the configured folder
- API version: Compatibility with the Horus API version
About Page
The DoliHorus → About (page about.php) page displays:
- The installed module version
- Licence information
- Useful links to documentation and support
OAuth2 Callback
The callback.php page handles the OAuth2 authentication return. It is used automatically during the initial connection and token renewal. You should not normally need to interact with this page.
Common Issues
Sending fails with "Authentication failed"
- Check your OAuth2 credentials in the configuration
- Test the connection from the Maintenance page
- Verify that your Horus API access is still active
"Tax mapping missing" error
- A VAT rate used in the invoice has no Horus correspondence
- Go to tax mapping and configure the missing rate
"Accounting folder not found" error
- The configured accounting folder is no longer accessible
- Check the configuration and select a valid folder
Client is not created in Horus
- Verify that the VAT number is filled in on the Dolibarr third-party record
- Make sure the API connection is working
Payments are not synchronising
- Verify that invoices have been sent to Horus first
- Test the connection from the Maintenance page
- Check that the financial journal is correctly configured
FAQ
What types of invoices are supported?
DoliHorus supports sales invoices, purchase invoices (suppliers) and credit notes for both types.
Does DoliHorus work with multi-entity?
Yes, DoliHorus supports Dolibarr multi-entity installations. Each entity can have its own OAuth2 configuration, accounting folder and tax mapping.
Are payments automatically created in Dolibarr?
Yes, when DoliHorus detects that an invoice has been paid in Horus, it can automatically create the corresponding payment in Dolibarr. This feature can be triggered manually or via a scheduled task.
Do I need to install additional libraries?
No, DoliHorus exclusively uses PHP's native cURL to communicate with the Horus API. No external dependencies are required.
How are client duplicates handled?
DoliHorus uses the VAT number as a unique identifier for client synchronisation. If a client with the same VAT number already exists in Horus, its information is updated instead of creating a duplicate.
How do I update the module?
- Download the new version from the DoliStore
- Replace the files in
htdocs/custom/dolihorus/ - Access Dolibarr — the module will detect the update and apply necessary migrations
Where can I find help?
- E-dem support: Contact us for any technical questions
- Horus documentation: Contact your Horus provider for API-related questions