* NEW : Add support of customer discount of the invoice in the sell journal * Correction phpstan * Correction phpstan * Correction phpstan * Correction phan * Correction phan * Correction phan * Correction phan * FIX #39146 : add SQL structure in llx_societe_perentity * FIX phpstan: Societe::$client (int<0,3>) does not accept -1 (#39244) Societe::$client is annotated @var int<0,3> (domain 0=no customer, 1=customer, 2=prospect, 3=both) in societe.class.php, but the create form in societe/card.php pre-set it to -1 as a transient "nothing pre-selected" placeholder, tripping PHPStan level 10 on develop. The value is never persisted (save paths compute 0..3) and the only reader, the switch() building the form, treats -1 and 0 identically via its default case. Use 0 (the property's own default) so the assignment matches the declared type. No behavior change. Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com> * NEW Accountancy - FEC export - Add constant ACCOUNTING_EXPORT_FEC_ADD_TIMESTAMP to add a timestamp in export file name * The test on dolibarr_main_restrict_os_commands was moved into dumpDatabase() * Fix missing extrafields propagation and object links when creating supplier credit note (#39285) Co-authored-by: Zakaria Boushaba <z.boushaba@vold.africa> * NEW Filecheck can show diff of modified files (#39022) * NEW: Show diff against original file in filecheck integrity report * NEW: Compare against develop branch for alpha/beta versions in filecheck diff * NEW: Improve filecheck diff granularity on large files with anchor-based split * Update version.inc.php * Create migration script 24.0.0-25.0.0.sql * FIX #39146: Fos thirdparties, Manage fk_account, payment method and payment term per entity if MAIN_COMPANY_PERENTITY_SHARED is set. * Missign migration file * Add oncontentvisibility in list of forbidden keys * Clean files * Debug v24 * Doc * Qual: Improve AI skills (#39320) * Qual: Improve AI skills * New: AI skill - common Dolibarr Development # New: AI skill - common Dolibarr Development Added a new SKILL.md file with best practices for Dolibarr development, including database access guidelines, code searching techniques, and tool execution hints (preferring pre-commit). * NEW: Add dolibarr-interactive-test skill for creating interactive test cases (#39328) # NEW: Add dolibarr-interactive-test skill for creating interactive test cases This skill provides guidance on creating PHP scripts for Dolibarr that: - Set up test data in the database - Provide direct links to view results in the web interface - Allow users to tear down/clean up test data - Handle proper authentication and CSRF protection - Debug database errors including InnoDB monitor output * Qual: Rename $from as $from_line (filecheck_diff.php) (#39319) # Qual: Rename $from as $from_line (filecheck_diff.php) SqlInjectionPlugin is configured to consider that '$from' is an SQL expression and requires that assignments to it are protected from Sql Injection. Renaming '$from' fixes false positives. * FIX: CDavLib getSqlCalEvents broken after actioncomm_cdav table removal, Add CalDav tests (#39322) * # FIX: CDavLib getSqlCalEvents broken after actioncomm_cdav table removal # FIX: CDavLib getSqlCalEvents broken after actioncomm_cdav table removal, Add CalDav tests Add CalDav tests, which resulted in detecting Issue. ## Issue The `CDavLib::getSqlCalEvents()` method in `htdocs/dav/dav.class.php` has been generating broken SQL queries, causing the new `CDavLibTest::testGetFullCalendarObjects` test to fail. ## Root Cause The issue stems from the removal of the `actioncomm_cdav` table. The original code referenced: - `ac.sourceuid` field (from a non-existent `ac` alias) - `ac.uuidext` field (from the removed `actioncomm_cdav` table) - Used incorrect phone field names (`sp.phone`, `sp.phone_perso`, `sp.phone_mobile`) - Used incorrect country field `sp.fk_pays` instead of `sp.fk_country` - Missing JOIN for the `user` table (`sp` alias) ## Fixes Applied ### 1. SQL String Concatenation Upgraded to the use of `$this->db->prefix()` instead of `.MAIN_DB_PREFIX.` literal strings. ### 2. Phone Field Names Updated phone field names to match current Dolibarr schema: - `sp.phone` → `sp.office_phone as phone` - `sp.phone_perso` → `sp.personal_mobile as phone_perso` - `sp.phone_mobile` → `sp.user_mobile as phone_mobile` ### 3. Country Field Fixed the country JOIN to use the correct field: - `sp.fk_pays` → `sp.fk_country` - `s.fk_pays` remains unchanged (correct for societe table) ### 4. Removed Non-Existent Fields Removed `ac.sourceuid` and `a.sourceuid` from the SELECT clause as these fields do not exist in the `actioncomm` table. These were likely from the removed `actioncomm_cdav` table. ### 5. Added Missing JOINs Added proper JOIN for the user table: ```php LEFT JOIN ' . $this->db->prefix() . 'user as sp ON sp.rowid = a.fk_user_action ``` ### 6. OURI Parameter Handling Fixed the `$ouri` parameter handling to use `a.recurid` instead of the non-existent `ac.uuidext`: ```php // When both OID and OURI are provided $sql .= ' AND (a.id = ' . ((int) $oid) . ' OR a.recurid = \''. $this->db->escape($ouri) . '\')'; // When only OURI is provided } elseif ($ouri !== false) { $sql .= ' AND a.recurid = \''. $this->db->escape($ouri) . '\''; } ``` ## Test Cases Added Added test cases to `test/phpunit/CDavLibTest.php` to verify: 1. OID and OURI parameters together produce SQL with both `a.id =` and `a.recurid =` conditions 2. OURI parameter alone produces SQL with only `a.recurid =` condition (no `a.id =`) ## Regression Origin This regression dates back to when the `actioncomm_cdav` table was removed from Dolibarr. The code was not properly updated to handle the removal, leaving broken references to fields and tables that no longer exist. ## Files Modified - `htdocs/dav/dav.class.php` - Method `getSqlCalEvents()` (lines 69-111) - `test/phpunit/CDavLibTest.php` - Method `testGetSqlCalEvents()` (lines 123-138) ## Verification All CDavLibTest tests pass: - testCdavLibConstruct - testGetSqlCalEvents - testToVCalendar - testGetFullCalendarObjects * FIX: Phan type warnings and PHPUnit 7.x compatibility - Fix Phan type warnings in dav.class.php by casting $ouri to string before escape() - Add PHPUnit compatibility helper in CommonClassTest for assertMatchesRegularExpression which was introduced in PHPUnit 8.0, providing backward compatibility with PHPUnit 7.x Fixes: - PhanTypeMismatchArgument warnings for $ouri parameter - assertMatchesRegularExpression undefined method error in CI with PHPUnit < 8.0 * fix delete in paymentvat.class.php (#39323) Co-authored-by: Laurent Destailleur <eldy@destailleur.fr> * NEW add method confirmProduced in MOs API (#39324) * FIX commande/stats: do not default "Created by" filter to current user (#39256) The order statistics query is not filtered on the current user on first page load, so the results shown are global. However the "Created by" selector defaulted to the current user (select_dolusers auto-selects $user->id when the passed value is empty), wrongly suggesting the displayed figures were limited to that user. Pass -1 instead of 0 when no user is selected so the combo keeps its empty entry, matching the unfiltered query. The empty option posts -1, which the query turns back into "no user filter", so the round-trip stays consistent after a refresh. * FIX Missing translation for "Weight" * Fix/supplier doc keep project (#39306) * FIX : situation invoice credit note wrong amount in progressive mode When creating a credit note "with same lines" from a situation invoice, the code always subtracts the previous situation invoice's line values before inverting the sign, assuming lines are stored cumulative (INVOICE_USE_SITUATION = 1, legacy mode). In progressive mode (INVOICE_USE_SITUATION = 2), each situation invoice line already stores its own delta amount and percent, so this extra subtraction credits the wrong amount and percent (e.g. 60% / 1272 instead of the correct 20% / 424 on a real cycle). Skip the subtraction in progressive mode so the credit note reuses the source line's own delta values, as expected. * FIX supplier order/proposal loses project after supplier selection On the create form of a supplier order (fourn/commande/card.php) and a supplier price request (supplier_proposal/card.php), the project select was filtered on the supplier third party as soon as one was chosen: the `if ($socid > 0)` branch took precedence over the PROJECT_CAN_ALWAYS_LINK_TO_ALL_SUPPLIERS constant. As a result, a supplier document created from a customer project lost its preselected project when the page reloaded after picking the supplier (the customer project is not linked to the supplier, so it was filtered out). This aligns the behavior with the supplier invoice (fourn/facture/card.php), which gives priority to PROJECT_CAN_ALWAYS_LINK_TO_ALL_SUPPLIERS. The external user restriction now targets $user->socid (the real external-user marker) instead of $socid > 0, which also matched internal users after selecting a supplier. * Fix Standalone reception creation (#39299) Fatal error: Uncaught Error: Call to a member function fetch_optionals() on null * Fix missing include * add method confirmProduced in MOs API which was missing --------- Co-authored-by: atm-corentin <165782689+atm-corentin@users.noreply.github.com> Co-authored-by: Alexandre SPANGARO <alexandre.spangaro@gmail.com> Co-authored-by: Alexandre SPANGARO <aspangaro.dolibarr@gmail.com> Co-authored-by: atm-jonathan <146709163+atm-jonathan@users.noreply.github.com> Co-authored-by: sonikf <93765174+sonikf@users.noreply.github.com> Co-authored-by: Laurent Destailleur <eldy@destailleur.fr> * Avoid autofill button being considered as submit button by web browsers (#39330) * Fix: Add verification for allowed table from listofreferent in unlink project (#38310) * Try to fix error on pgsql * Create llx_links_extrafields.sql (#39347) * Create llx_links_extrafields.sql * Create llx_links_extrafields.key.sql * Update 24.0.0-25.0.0.sql * NEW Product/service creation in a dialog popup from the add-line block ('@FIXME Not working yet') (#39307) * FIX Product/service creation in a dialog popup from the add-line block (marked '@FIXME Not working yet') product/card.php is now popup-aware: it reads dol_openinpopup (added to the URL by dolButtonToOpenUrlInDialogPopup), propagates it into the creation form, closes properly on Cancel (buttonsSaveCancel), and after a successful creation reloads the parent page on backtopage (with the new id substituted) instead of navigating inside the iframe. In the add-line block, the popup buttons (MAIN_FEATURES_LEVEL >= 2) no more pass the callback 'jsRefreshProductCombo' (a function that was never defined, and passed in the jsonopen slot instead of jsonclose, see the phan suppress) : the child page now drives the parent reload itself. The backtopage now includes the object id, so combined with the 'idprod_ID' preselection fix, the created product can be autoselected in the combo. Tested end-to-end on a real 23.0.3 database. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * Add copyright * FIX phpcs: indentation of hidden field * chore: retrigger CI (lock check setup canceled by GitHub infra) --------- Co-authored-by: Claude Fable 5 <noreply@anthropic.com> * FIX: Remove always-true error checks in mysql dump export (#39339) $errormsg is initialized to '' just above and nothing sets it before these checks in the mysql branch, so PHPStan correctly flags both negated conditions as always true (booleanNot.alwaysTrue). Unlike the postgresql branch below, this is the first $what branch evaluated, so there is no earlier code path that could have set $errormsg yet. Co-authored-by: Laurent Destailleur <eldy@destailleur.fr> * NEW - API Get sales representative (#39338) * Doc * New import Leave Balance (Datastructure) (#37001) * New import Leave Balance (Datastructure) * fix --------- Co-authored-by: Lucas Marcouiller <lmarcouiller@dolicloud.com> * Qual: Update Phan baseline.txt with reduced issue counts (#36996) This commit updates the Phan baseline.txt file. * Better log * Log * Better error management * Doc * Fix error message * CI * Try to fix CI * fix phan (#37007) * CI * fix phan (#37008) PhanTypeMismatchArgumentNullable Argument 3 ($txt) is $productlot->batch of type ?string but \TCPDF::MultiCell() takes string defined at htdocs/includes/tecnickcom/tcpdf/tcpdf.php:5871 (expected type to be non-nullable) * CI * NEW Add new EUID number (#36997) * Doc * ci * Fix CI * Improve OAuth HTTP error details (#36951) Keep throwing TokenResponseException on HTTP 4xx/5xx while also capturing the response body (ignore_errors) to include a short snippet for admins. Co-authored-by: caminotravelcenter <caminotravelcenter@localhost> Co-authored-by: Laurent Destailleur <eldy@destailleur.fr> * NEW add import of leave balance (Implementation) (#37011) * New add import Leave Balance * add eof * Update modHoliday.class.php --------- Co-authored-by: Lucas Marcouiller <lmarcouiller@dolicloud.com> Co-authored-by: Laurent Destailleur <eldy@destailleur.fr> * NEW add image format avif (#37014) * add format avif * Update functions.lib.php * Exclude non interesting warning * Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop * CI * CI * CI * Trans * CI * CI * CI * Fix typo in phpstan.neon.dist for isset() rule (#37018) See https://github.com/Dolibarr/dolibarr/actions/runs/21444577128/job/61756970301?pr=37017 * Remove jstz.min.js from JavaScript array (#37017) jstz.min.js was deleted in |
||
|---|---|---|
| .agents | ||
| .github | ||
| .phan | ||
| .tx | ||
| dev | ||
| doc | ||
| htdocs | ||
| scripts | ||
| test | ||
| .codeclimate.yml | ||
| .editorconfig | ||
| .gitattributes | ||
| .gitignore | ||
| .mailmap | ||
| .pre-commit-config.yaml | ||
| .travis.yml | ||
| ChangeLog | ||
| composer.json.disabled | ||
| COPYING | ||
| COPYRIGHT | ||
| DCO | ||
| phpstan.neon.dist | ||
| pyproject.toml | ||
| README.md | ||
| robots.txt | ||
| SECURITY.md | ||
DOLIBARR ERP & CRM
Dolibarr ERP & CRM is a modern software package that helps manage your organization's activities (contacts, quotes, invoices, orders, stocks, agenda, human resources, ecm, manufacturing…).
It's an Open-Source Software suite (written in PHP with JavaScript enhancements) designed for small, medium or large companies, foundations and freelancers.
You can freely use, study, modify or distribute it according to its license.
You can use it as a standalone application or as a web application to access it from the Internet or from a LAN.
Dolibarr has a large community ready to help you, free forums and preferred partners ready to offer commercial support should you need it
LICENSE
Dolibarr is released under the terms of the GNU General Public License as published by the Free Software Foundation; either Version 3 of the License, or (at your option) any later version (GPL-3+).
See the COPYING file for a full copy of the license.
Other licenses apply for some included dependencies. See COPYRIGHT for a full list.
INSTALLING
There is a lot of different solutions to install Dolibarr.
Using packages
If you have low technical skills and you're looking to install Dolibarr ERP/CRM with just few clicks, you can use one of the packaged versions (see next chapter if you have IT knowledge) :
- DoliWamp for Windows
- DoliDeb for Debian, Ubuntu
- DoliRpm for Red Hat, Fedora, OpenSuse, Mandriva or Mageia
- The Docker image (see chapter "Using Docker")
Releases can be downloaded from official website.
Using the generic step by step setup (recommended for IT users)
You can use any web server supporting PHP (Apache, Nginx, ...) and a supported database (MariaDB, MySQL or PostgreSQL) to install the standard version:
-
Verify that your installed PHP version is supported see PHP support.
-
Uncompress the downloaded .zip archive to copy the
dolibarr/htdocsdirectory and all its files inside your web server root or get the files directly from GitHub (recommended if you know git as it makes it easier if you want to upgrade later):git clone https://github.com/dolibarr/dolibarr -b x.y(where x.y is the main version like 9.0, 19.0, ...) -
Set up your web server to use
dolibarr/htdocsas root if your web server does not already define a directory to point to. -
Create an empty
htdocs/conf/conf.phpfile and set write permissions for your web server user (write permission will be removed once install is finished) -
From your browser, go to the dolibarr "install/" page
The URL will depend on how your web configuration directs to your dolibarr installation. It may look like:
http://localhost/dolibarr/htdocs/install/or
http://localhost/dolibarr/install/or
http://yourdolibarrvirtualhost/install/ -
Follow the installer instructions
Using Docker images
Dolibarr is also available as a Docker image. Installation instructions are available here.
Using ready to use SaaS/Cloud offers
If you lack the time to install it yourself, consider exploring commercial 'ready-to-use' Cloud offerings (refer to https://saas.dolibarr.org). Keep in mind that this third option comes with associated costs.
UPGRADING
Dolibarr supports upgrading, usually without the need for any (commercial) support (depending on if you use any commercial extensions). It supports upgrading all the way from any version after 2.8 without breakage. This is unique in the ERP ecosystem and a benefit our users highly appreciate!
Follow these step-by-step instructions to seamlessly upgrade Dolibarr to the latest version:
- At first make a backup of your Dolibarr files & then see
- Verify that your installed PHP version is supported by the new version see PHP support.
- Overwrite all old files from the 'dolibarr' directory with files provided in the new version's package.
- At your next access, Dolibarr will redirect you to the "install/" page to follow the upgrade process.
If an
install.lockfile exists to lock any other upgrade process, the application will ask you to remove the file manually (you should find theinstall.lockfile in the directory used to store generated and uploaded documents, in most cases, it is the directory called "documents").
WHAT'S NEW
See the ChangeLog file.
FEATURES
Main application/modules (all optional)
- Third-Parties Management: Customers, Prospects (Leads) and/or Suppliers + Contacts
- Members/Membership/Foundation management
Product Management
- Products and/or Services catalogue
- Stock / Warehouse management + Inventory
- Barcodes
- Batches / Lots / Serials
- Product Variants
- Bill of Materials (BOM)
- Manufacturing Orders (MO)
- Workstations / Workplaces
Customer/Sales Management
- Customers/Prospects + Contacts management
- Opportunities or Leads management
- Commercial proposals management (online signing)
- Customer Orders management
- Contracts/Subscription management
- Interventions management
- Ticket System (+ Knowledge management)
- Partnership management
- Shipping management
- Customer Invoices/Credit notes and payment management
- Point of Sale (POS)
Supplier/Purchase Management
- Suppliers/Vendors + Contacts
- Supplier (pricing) requests
- Purchase Orders management
- Delivery/Reception
- Supplier Invoices/Credit notes and payment management
- INCOTERMS
Finance/Accounting
- Invoices/Payments
- Bank accounts management
- Direct debit and Credit transfer management (European SEPA)
- Accounting management
- Donations management
- Loan management
- Margins
- Reports
Collaboration
- Shared calendar/agenda (with
icalandvcalimport/export for third-party tools integration) - Projects & Tasks management
- Event organization
- Ticket System
- Surveys
HR - Human Resources Management
- Employee leave management
- Expense reports
- Recruitment management
- Employee/staff management
- Timesheets
Other application/modules
- Electronic Document Management (EDM)
- Bookmarks
- Reporting
- Data export/import
- Barcodes
- LDAP connectivity
- Click-To-Dial integration
- Mass emailing
- RSS integration
- Social platforms linking
- Payment platforms integration (PayPal, Stripe, Paybox...)
- Email-Collector
- AI support via API
(around 100 modules available by default, 1000+ addons at the official marketplace Dolistore.com)
Other general features
- Multi-Language Support (Localization in most major languages)
- Multi-users and groups with finely-grained rights
- Multi-Currency
- Multi-Company (by adding an external module)
- Very user-friendly and easy to use
- Customizable dashboards
- Highly customizable: enable only the modules you need, add user personalized fields, choose your skin, several menu managers (can be used by internal users as a back-office with a particular menu, or by external users as a front-office with another one)
- APIs (REST, SOAP)
- Code that is easy to understand, maintain and develop (PHP with no heavy framework; trigger and hook architecture)
- Support a lot of country-specific features:
- Spanish Tax RE and IRPF
- French NPR VAT rate (VAT called "Non Perçue Récupérable" for DOM-TOM)
- Canadian double taxes (federal/province) and other countries using cumulative VAT
- Tunisian tax stamp
- Argentina invoice numbering using A,B,C...
- Greece fetch customer vat details from AADE, all invoice types, MyData(external free module)
- ZATCA e-invoicing QR-Code
- Compatible with European directives (2006/112/CE ... 2010/45/UE)
- Compatible with data privacy rules (Europe's GDPR, ...)
- ...
- Flexible PDF & ODT generation for invoices, proposals, orders...
- ...
System Environment / Requirements
- PHP
- MariaDB, MySQL or PostgreSQL
- Compatible with all Cloud solutions that match PHP & MySQL or PostgreSQL prerequisites.
See exact requirements on the Wiki
Extending
Dolibarr can be extended with a lot of other external applications or modules from third-party developers available at the DoliStore.
WHAT DOLIBARR CAN'T DO YET
These are features that Dolibarr does not yet fully support:
- Tasks dependencies in projects
- Payroll module
- Native embedded Webmail, but you can send email to contacts in Dolibarr with e.g. offers, invoices, etc.
- Dolibarr can't do coffee (yet)
DOCUMENTATION
Administrator, user, developer and translator's documentation are available along with other community resources in the Wiki.
CONTRIBUTING AND RELEASE PROCESS
This project exists thanks to all the people who contribute. Please read the instructions on how to contribute (report a bug/error, a feature request, send code, ...) [Contributing]
A View on Contributors:
The release process is described into the file dev/build/makepack-howto.md
CREDITS
Dolibarr is the work of many contributors over the years and uses some fine PHP libraries.
See COPYRIGHT file.
NEWS AND SOCIAL NETWORKS
Follow Dolibarr project on:
Sponsors
Support this project by becoming a sponsor. Your logo will show up here. 🙏 [Become a sponsor/backer]
