* fix(ecm): add support for custom entity in file operations
This commit addresses missing support for specifying custom `entity` values during file operations, ensuring proper handling of multi-entity configurations. Changes include:
- Adding an `entity` parameter to the `fetch` method of `EcmFiles` and ensuring proper filtering based on the provided entity.
- Modifying `dol_move`, `deleteFilesIntoDatabaseIndex`, and other file-related functions to support the `entity` parameter.
- Ensuring entity propagation in operations like file indexing, renaming, and deletion.
This resolves issues where operations were limited to the default entity value (`$conf->entity`), improving flexibility and correctness in multi-entity setups.
* fix(ecm): improve code formatting for entity checks
Ensure consistent coding style for entity-related conditions across file operations by adding spacing around `empty()` calls.
This improves code readability and maintains uniformity in the handling of multi-entity configurations within the `EcmFiles` class and related modules.
* fix(ecm): cast entity to int in SQL queries
Ensure `entity` values are explicitly cast to integers in SQL conditions, improving type safety and preventing potential SQL injection vulnerabilities.
This change applies consistent casting in multiple entity-related checks within the `EcmFiles` class to enhance code security and reliability.
* We added a hook to allow us to modify the Prospect Customer drop down list in Third Party
* modification of the hook on third party card and adding hooks on third party list
---------
Co-authored-by: root <root@dolibarr17.fr>
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
* NEW : add company date birth (SQL structure)
* NEW : add company date birth (UI)
* Rename date_birth in birth
* Rename date_birth in birth (UI)
* Update societe.class.php
---------
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
* Update card.php
#FIX when using THIRDPARTY_CUSTOMERTYPE_BY_DEFAULT and direct link New prospect, New Customer or New Supplier
* Fix name of option for supplier
* Update functions.lib.php (#34718)
Add __MYCOMPANY_URL__ & __MYCOMPANY_PHONEMOBILE__ in getCommonSubstitutionArray
* Fix bad value fourn paiement process (#34722)
* Fix bad value fourn paiement process
* best fix
* fix takepos console error (#34709)
* fix console error
* exit early
---------
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
* Update card.php
* Fix CI
* Clean code
* Comment
* Update card.php
"if (getDolGlobalInt('THIRDPARTY_CUSTOMERTYPE_BY_DEFAULT')) {":
this part of code is wrong when we click on "New customer", Customer AND Prospect are selected. New test on line 1452 cover this case. So when type is C, variable object->client should be 1.
And I corrected the new code with parenthesis.
* Update card.php
distraction error in the new code
---------
Co-authored-by: ldestailleur <eldy@destailleur.fr>
Co-authored-by: Deefaze <6393617+Deefaze@users.noreply.github.com>
Co-authored-by: Lucas Marcouiller <45882981+Hystepik@users.noreply.github.com>
Co-authored-by: Francis Appels <francis.appels@yahoo.com>
Since the improvement of the Prospect/Client/Supplier selection, the THIRDPARTY_CUSTOMERTYPE_BY_DEFAULT variable is no longer taken into account. This code restores this functionality when creating a new third party.
* FIX : bad value fo company ref crashes canvas feature
* fix technical id for company
---------
Co-authored-by: Christophe Battarel <christophe@altairis.fr>