Table of Contents
-
Introduction
-
Why Dolibarr Is a Suitable ERP for Moroccan SMEs
-
Understanding Moroccan Accounting Specificities
-
Overview of Dolibarr’s Native Accounting Module
-
Legal and Fiscal Requirements in Morocco
-
Core Accounting Functions in Dolibarr
-
6.1 Chart of Accounts
-
6.2 Journal Entries and General Ledger
-
6.3 VAT Management
-
6.4 Third-party Account Tracking
-
6.5 Bank Reconciliation
-
6.6 Invoice and Payment Linkage
-
6.7 Fiscal Year Management
-
-
Recommended Modules for Moroccan Accounting
-
7.1 Advanced Accounting (Comptabilité Avancée)
-
7.2 Moroccan Chart of Accounts Module (PCG Maroc)
-
7.3 FEC and Legal Archiving Extensions
-
7.4 VAT Declaration Tools
-
7.5 Bank Integration and Reconciliation Add-ons
-
7.6 Payroll Compatibility (CNSS, AMO, IGR)
-
7.7 Invoice Certification and Numbering Controls
-
7.8 Fixed Assets and Amortization Modules
-
7.9 Accounting Reports Generator (Balance, Journals, Bilan)
-
7.10 Export and Compliance Tools (XML, CSV, Audits)
-
-
Step-by-Step Setup for Moroccan Accounting in Dolibarr
-
Case Study: Moroccan SME Using Dolibarr for Compliance
-
Common Mistakes and How to Avoid Them
-
Tips for Working with Your Moroccan Accountant
-
Integration with Other Modules (Sales, HR, Purchases)
-
Conclusion
-
Resources and Where to Download Modules
1. Introduction
Managing accounting in Morocco comes with its own set of challenges: a defined national chart of accounts (Plan Comptable Général), fiscal and social declarations, VAT complexity, and legal reporting obligations. Businesses are required to maintain accurate books, generate auditable records, and meet deadlines with the Direction Générale des Impôts (DGI), CNSS, and other Moroccan authorities.
Dolibarr ERP & CRM, with its modular structure, is an increasingly popular solution among Moroccan SMEs, thanks to its affordability, flexibility, and open-source ecosystem. While it was not originally designed for Moroccan regulations, several extensions and community modules now allow it to meet local compliance requirements.
In this article, you’ll learn how to configure and use Dolibarr to manage Moroccan accounting efficiently, with a strong focus on legal compliance and process automation.
2. Why Dolibarr Is a Suitable ERP for Moroccan SMEs
Dolibarr offers several strategic advantages:
-
Modular system: Activate only what you need (invoicing, accounting, stock, HR, etc.)
-
Open-source: No vendor lock-in and full control over your data
-
Affordable: No licensing fees and easy to deploy on-premise or in the cloud
-
Localizable: Translated into French and Arabic, with Moroccan-specific extensions
-
Expandable: Community modules support local tax, payroll, and legal requirements
Moroccan businesses that want to avoid expensive ERP solutions like Sage or SAP often turn to Dolibarr as a lightweight, robust alternative.
3. Understanding Moroccan Accounting Specificities
Before diving into Dolibarr, it’s important to grasp some of the main accounting rules specific to Morocco:
-
Plan Comptable Général Marocain (PCG Maroc): Standard chart of accounts that must be followed
-
VAT (TVA): Declared monthly or quarterly depending on turnover
-
CNSS / AMO / IGR: Social and payroll obligations for employees
-
Fiscal declarations: Annual balance sheets, trial balance, and journals must be generated
-
FEC (Fichier des Écritures Comptables): File format required during audits
-
Numbered invoices: No gaps or duplication allowed in invoice numbering
-
Cash vs. accrual accounting: Businesses may use either, but consistency is key
All of these affect how Dolibarr should be set up for legally compliant accounting operations in Morocco.
4. Overview of Dolibarr’s Native Accounting Module
Dolibarr includes a basic accounting module, which can be activated via:
Setup > Modules > Accounting
This core module supports:
-
Double-entry accounting
-
Manual journal entries
-
Bank and cash register tracking
-
VAT configuration
-
Fiscal year definition
-
Integration with invoicing and purchase modules
However, for full Moroccan compliance, additional extensions are recommended, especially for local chart of accounts and fiscal documentation.
5. Legal and Fiscal Requirements in Morocco
Dolibarr can meet Moroccan legal requirements if configured correctly and enhanced with the right modules. Some key obligations to consider:
Obligation | Requirement |
---|---|
Chart of Accounts | Must match PCG Maroc |
Journals | Must include purchases, sales, bank, miscellaneous |
FEC File | Must be exportable upon tax audit |
VAT Reporting | Monthly or quarterly, with correct tax codes and rates |
Invoice Numbering | Sequential, immutable, and without gaps |
Annual Reports | Trial balance (balance), income statement (compte de résultat), and balance sheet (bilan) |
Failure to comply may result in audits, penalties, or rejected declarations.
6. Core Accounting Functions in Dolibarr
Dolibarr’s base accounting tools cover several essentials:
6.1 Chart of Accounts
-
Editable via the interface
-
Supports custom account numbers
-
Can be imported using CSV or created from templates
-
Default charts may need modification to match Moroccan standards
6.2 Journal Entries and General Ledger
-
Create manual entries for non-automated movements
-
Filter by journal type, period, or account
-
Full ledger export capabilities
6.3 VAT Management
-
Define tax rates (e.g., 20%, 14%, 10%, 7%, 0%)
-
Assign to products, services, or suppliers
-
Automatic calculation during invoicing and purchase validation
6.4 Third-party Account Tracking
-
Auto-assign accounts to clients and suppliers
-
Track receivables (411xxx) and payables (401xxx)
-
Linked to customer and supplier invoices
6.5 Bank Reconciliation
-
Manual or semi-automated matching
-
Import bank statements (CSV, OFX, etc.)
-
Supports multi-bank, multi-currency management
6.6 Invoice and Payment Linkage
-
Sales and supplier invoices automatically generate accounting entries
-
Payments are tracked against outstanding balances
-
Supports partial payments and payment plans
6.7 Fiscal Year Management
-
Define fiscal years and periods
-
Lock periods to prevent post-closing modifications
-
Support for closing balances and new fiscal opening entries
7. Recommended Modules for Moroccan Accounting
To adapt Dolibarr to Moroccan fiscal requirements, several modules—available on Dolistore or from local integrators—are essential.
7.1 Advanced Accounting (Comptabilité Avancée)
This module enhances Dolibarr’s native accounting with:
-
Better separation of journals (sales, purchases, bank, miscellaneous)
-
Posting preview before validation
-
Improved export of general ledger, trial balance, and journal entries
-
Filtered views by account, journal, or third party
-
Integration with advanced VAT handling
Ideal for users needing full double-entry bookkeeping and periodic reporting.
7.2 Moroccan Chart of Accounts Module (PCG Maroc)
The PCG Maroc module installs the official Moroccan Plan Comptable Général, including:
-
Pre-configured classes (1–7)
-
Client (411...), supplier (401...), tax (445...) accounts
-
Sub-accounts for payroll, provisions, and amortization
-
Configured account types (balance sheet vs income)
This ensures compliance and standardized reporting as expected by Moroccan tax authorities and accountants.
7.3 FEC and Legal Archiving Extensions
Moroccan companies may be required to present FEC (Fichier des Écritures Comptables) upon request from the tax administration.
Modules supporting this feature allow:
-
Export of the FEC in XML/CSV format
-
Compliance with audit structures (balance, journal, entries)
-
Timestamping of journal entries
-
Archiving and locking after fiscal year closure
Very useful for preparing for audits or digital tax controls.
7.4 VAT Declaration Tools
These modules streamline TVA declaration:
-
Automatically aggregate taxable bases by VAT rate
-
Generate declaration summary (form-like)
-
Support for exempted transactions (e.g., exports, nonprofit)
-
Export for submission to Simpl-TVA platform
-
Periodic VAT reports and ledger integration
This drastically reduces time spent preparing monthly or quarterly declarations.
7.5 Bank Integration and Reconciliation Add-ons
To simplify cash monitoring and audit preparation:
-
Import bank statements in CNSS/Maroc-specific formats
-
Automatic matching of transactions
-
Alerts for discrepancies
-
Export bank books by period
Combined with accounting, this helps with real-time treasury visibility.
7.6 Payroll Compatibility (CNSS, AMO, IGR)
While Dolibarr has basic HR modules, Moroccan payroll has complex legal constraints:
-
CNSS contributions
-
AMO (Assurance Maladie Obligatoire)
-
IGR (Impôt Général sur le Revenu)
Modules or integrations with local payroll tools (e.g., Sage Paie Maroc, or open-source Algerian/Moroccan forks) enable:
-
Salary slips
-
Social contribution calculations
-
Accounting entries from payroll to journals
-
CNSS declarations with employee breakdown
Note: This often requires custom development or integration support.
7.7 Invoice Certification and Numbering Controls
To comply with Moroccan laws:
-
Invoice numbers must be sequential, without gaps
-
Duplicate numbering is not allowed
-
Some industries require e-invoice compliance or certified PDF signatures
Modules add:
-
Protection against deletion after validation
-
Auto-locking of periods
-
Electronic signature via Morocco-trusted providers (e.g., Barid e-Sign)
Ensures invoices meet legal and audit-proof standards.
7.8 Fixed Assets and Amortization Modules
Moroccan accounting includes depreciation tracking per legal durations:
-
Amortization per asset type (3, 5, 10 years, etc.)
-
Straight-line (linéaire) and declining balance (dégressif) support
-
Journal entries for amortization and asset value drop
-
Reclassification of assets
-
Asset disposal workflows
Perfect for businesses in transport, real estate, IT, or industrial sectors.
7.9 Accounting Reports Generator (Balance, Journals, Bilan)
These modules help generate:
-
Balance générale (trial balance)
-
Journaux comptables by type (purchases, sales, etc.)
-
Bilan et Compte de Résultat in Moroccan format
-
Grand livre (general ledger per account)
-
Export-ready files for the accountant
Compatible with fiscal year closures and aligned with PCG account classes.
7.10 Export and Compliance Tools (XML, CSV, Audits)
Many of the modules above also support:
-
Data exports for accountants and auditors
-
Archival formats (CSV, XML, ZIP)
-
Integration with national declaration platforms
-
Data integrity checks and logs
These make Dolibarr a serious contender for audit-ready bookkeeping.
8. Step-by-Step Setup for Moroccan Accounting in Dolibarr
Step 1: Install Core and Necessary Modules
-
Activate the Accounting module
-
Install or import the PCG Maroc chart of accounts
-
Add Advanced Accounting, VAT Declaration, and FEC Export
Step 2: Configure Fiscal Year
-
Go to Setup > Accounting > Fiscal Periods
-
Define start/end dates and open the fiscal year
-
Assign journals for purchases, sales, bank, etc.
Step 3: Define VAT Codes
-
Set up VAT rates: 20%, 14%, 10%, 7%, 0%
-
Assign applicable rates to products/services/suppliers
Step 4: Assign Accounts to Third Parties and Products
-
For each client and supplier, link accounting accounts (e.g., 411000, 401000)
-
For products/services, assign income/expense accounts (e.g., 706xxx, 601xxx)
Step 5: Configure Numbering and Locking
-
Use protected invoice numbering sequences
-
Prevent deletion after validation
-
Enable period locking after closing
Step 6: Track Transactions and Post Entries
-
Validate invoices, link payments
-
Import and reconcile bank statements
-
Generate manual entries where needed (payroll, provisions)
Step 7: Generate Reports and Exports
-
Monthly: VAT summary, ledger
-
Quarterly: Trial balance, cash flow
-
Annually: Balance sheet, income statement, FEC
This setup ensures you are ready for legal and fiscal audits in Morocco.
9. Case Study: Moroccan SME Using Dolibarr for Compliance
Company: EcoBat SARL (Construction firm in Casablanca)
Employees: 20
Modules Used:
-
Core Accounting + PCG Maroc
-
Advanced VAT and FEC Export
-
Fixed Assets & Amortization
-
Budget Control and Purchasing
-
HR and Timesheets
Results:
-
Saved over 25% in accounting software license fees
-
Automated monthly VAT preparation
-
Exported FEC file accepted during DGI audit
-
Reduced invoice errors and improved tracking
EcoBat’s success shows how a small business can achieve full fiscal compliance using Dolibarr and the right modules.
10. Common Mistakes and How to Avoid Them
Mistake | Solution |
---|---|
Using wrong chart of accounts | Install and use PCG Maroc module |
Not assigning accounts to products or clients | Map each element correctly to ensure ledger accuracy |
Deleting validated invoices | Lock invoices and periods after validation |
Forgetting VAT config | Always double-check tax codes in products and invoice lines |
No backup before year closing | Schedule database and document backups monthly |
11. Tips for Working with Your Moroccan Accountant
-
Grant them access (read-only or with validation rights) to your Dolibarr instance
-
Provide exports: FEC, balance, journals
-
Use French interface for better collaboration
-
Agree on roles: you enter data, they review and submit
-
Schedule quarterly reviews to ensure consistency and compliance
12. Integration with Other Modules (Sales, HR, Purchases)
Dolibarr’s strength lies in how accounting integrates with:
-
Sales: Invoices and payments trigger accounting entries
-
Purchases: Supplier invoices linked to expenses
-
Stock: Goods received update inventory and COGS
-
HR/Payroll: Employee expenses and salaries linked to accounts
-
Projects: Revenue and cost tracking per project
This creates a unified financial picture and simplifies management reporting.
13. Conclusion
Managing Moroccan accounting with Dolibarr is not only possible—it can be powerful, cost-effective, and legally compliant. With the right configuration, localized modules, and a bit of training, Dolibarr can support your full accounting lifecycle: from daily bookkeeping to annual declarations.
By combining open-source flexibility with local compliance tools, Dolibarr becomes an ideal platform for entrepreneurs, SMEs, and accounting professionals in Morocco.