From 7ccd50d2b8fe8ba487a6365207dbba8d147eb970 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 25 Jul 2023 12:38:27 +0200 Subject: [PATCH 01/40] Fix class not initialized --- htdocs/admin/system/security.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/htdocs/admin/system/security.php b/htdocs/admin/system/security.php index dbad63d37ab..82c6cc93b8e 100644 --- a/htdocs/admin/system/security.php +++ b/htdocs/admin/system/security.php @@ -48,6 +48,8 @@ $execmethod = getDolGlobalInt('MAIN_EXEC_USE_POPEN', 1); * View */ +$form = new Form($db); + llxHeader(); print load_fiche_titre($langs->trans("Security"), '', 'title_setup'); From 01eca1eb47ed576305b78b75f0896799ceaa782a Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 25 Jul 2023 12:56:11 +0200 Subject: [PATCH 02/40] Debug v18 --- htdocs/admin/system/security.php | 4 ++-- htdocs/langs/fr_FR/admin.lang | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/htdocs/admin/system/security.php b/htdocs/admin/system/security.php index 82c6cc93b8e..c78669a4cca 100644 --- a/htdocs/admin/system/security.php +++ b/htdocs/admin/system/security.php @@ -669,7 +669,7 @@ print '
'; print 'WEBSITE_MAIN_SECURITY_FORCESTS = '.getDolGlobalString('>WEBSITE_MAIN_SECURITY_FORCESTS', ''.$langs->trans("Undefined").'').'   ('.$langs->trans("Example").": \"max-age=31536000; includeSubDomains\")
"; print '
'; -print 'WEBSITE_MAIN_SECURITY_FORCEPP = '.getDolGlobalString('WEBSITE_MAIN_SECURITY_FORCEPP', ''.$langs->trans("Undefined").'').'   ('.$langs->trans("Example").": \"camera: 'none'; microphone: 'none';\")
"; +print 'WEBSITE_MAIN_SECURITY_FORCEPP = '.getDolGlobalString('WEBSITE_MAIN_SECURITY_FORCEPP', ''.$langs->trans("Undefined").'').'   ('.$langs->trans("Example").": \"camera: (); microphone: ();\")
"; print '
'; print '
'; @@ -678,7 +678,7 @@ print '
'; print load_fiche_titre($langs->trans("LimitsAndMitigation"), '', 'folder'); print ''; -print 'For a higher security, we also recommend to implement limits and mitigation on number of endpoints per minutes for the following URL'."
"; +print $langs->trans("RecommendMitigationOnURL").'
'; print '
'; print '
'; diff --git a/htdocs/langs/fr_FR/admin.lang b/htdocs/langs/fr_FR/admin.lang index 98bb6acdd2a..e207fdfd8a6 100644 --- a/htdocs/langs/fr_FR/admin.lang +++ b/htdocs/langs/fr_FR/admin.lang @@ -2397,3 +2397,4 @@ DefaultForTypeDesc=Modèle utilisé par défaut lors de la création d'un nouvel OptionXShouldBeEnabledInModuleY=L'option "%s" doit être activée dans le module %s OptionXIsCorrectlyEnabledInModuleY=L'option "%s" doit être activée dans le module %s AtBottomOfPage=En bas de page +RecommendMitigationOnURL=For a higher security, we also recommend to implement limits and mitigation on number of endpoints per minutes for the following URL \ No newline at end of file From 2bc6cd20ddce52234460a6d51938e8670c2967d5 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 25 Jul 2023 13:15:52 +0200 Subject: [PATCH 03/40] Debug v18 --- htdocs/admin/system/security.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/htdocs/admin/system/security.php b/htdocs/admin/system/security.php index c78669a4cca..89161dffb3c 100644 --- a/htdocs/admin/system/security.php +++ b/htdocs/admin/system/security.php @@ -169,6 +169,12 @@ if (in_array($functiontokeep, $arrayoffunctionsdisabled)) { print ''.$functiontokeep.''; print '
'; +$arrayofstreams = stream_get_wrappers(); +if (!empty($arrayofstreams)) { + sort($arrayofstreams); + print "PHP streams = ".(join(',', $arrayofstreams)).'   ('.$langs->trans("RecommendedValueIs", 'file,http,https,php').')'."
\n"; +} + print '
'; // XDebug From d2e15b149b5e1560ee98bbc02c46d21ad9d6e429 Mon Sep 17 00:00:00 2001 From: UT from dolibit <45215329+dolibit-ut@users.noreply.github.com> Date: Tue, 25 Jul 2023 23:07:28 +0200 Subject: [PATCH 04/40] Update modExport.class.php (#25486) defgroup brief --- htdocs/core/modules/modExport.class.php | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/htdocs/core/modules/modExport.class.php b/htdocs/core/modules/modExport.class.php index df996a312bf..7f36c78273b 100644 --- a/htdocs/core/modules/modExport.class.php +++ b/htdocs/core/modules/modExport.class.php @@ -17,11 +17,12 @@ */ /** - * \defgroup export Module export - * \brief Module generique pour realiser des exports de donnees en base - * \file htdocs/core/modules/modExport.class.php - * \ingroup export - * \brief Description and activation file for the module export + * \defgroup export Module Export + * \brief Module to manage data exports from Dolibarr database + * + * \file htdocs/core/modules/modExport.class.php + * \ingroup export + * \brief Description and activation file for the module export */ include_once DOL_DOCUMENT_ROOT.'/core/modules/DolibarrModules.class.php'; From 29f8ac91717c17e3e151dc67f3c53b390dcf421e Mon Sep 17 00:00:00 2001 From: UT from dolibit <45215329+dolibit-ut@users.noreply.github.com> Date: Tue, 25 Jul 2023 23:07:57 +0200 Subject: [PATCH 05/40] Update modComptabilite.class.php (#25485) defgroup brief --- htdocs/core/modules/modComptabilite.class.php | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/htdocs/core/modules/modComptabilite.class.php b/htdocs/core/modules/modComptabilite.class.php index be8f1954959..6c485f912f9 100644 --- a/htdocs/core/modules/modComptabilite.class.php +++ b/htdocs/core/modules/modComptabilite.class.php @@ -19,11 +19,12 @@ */ /** - * \defgroup comptabilite Module comptabilite - * \brief Module pour inclure des fonctions de comptabilite (gestion de comptes comptables et rapports) - * \file htdocs/core/modules/modComptabilite.class.php - * \ingroup comptabilite - * \brief Description and activation file for the module simple accountancy + * \defgroup comptabilite Module Comptabilite + * \brief Module to include accounting functions (account management and reporting) + * + * \file htdocs/core/modules/modComptabilite.class.php + * \ingroup comptabilite + * \brief Description and activation file for the module simple accountancy */ include_once DOL_DOCUMENT_ROOT.'/core/modules/DolibarrModules.class.php'; From 9c864759a28d9b473764dd2580a18cabf88f23ad Mon Sep 17 00:00:00 2001 From: UT from dolibit <45215329+dolibit-ut@users.noreply.github.com> Date: Tue, 25 Jul 2023 23:08:49 +0200 Subject: [PATCH 06/40] Update modSyslog.class.php (#25483) defgroup brief --- htdocs/core/modules/modSyslog.class.php | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/htdocs/core/modules/modSyslog.class.php b/htdocs/core/modules/modSyslog.class.php index 0fa0da9dcdb..8a2cbf68bab 100644 --- a/htdocs/core/modules/modSyslog.class.php +++ b/htdocs/core/modules/modSyslog.class.php @@ -17,11 +17,12 @@ */ /** - * \defgroup syslog Module syslog - * \brief Module pour gerer les messages d'erreur dans syslog - * \file htdocs/core/modules/modSyslog.class.php - * \ingroup syslog - * \brief Description and activation file for the module syslog + * \defgroup syslog Module Syslog + * \brief Module to manage error messages in syslog + * + * \file htdocs/core/modules/modSyslog.class.php + * \ingroup syslog + * \brief Description and activation file for the module syslog */ include_once DOL_DOCUMENT_ROOT.'/core/modules/DolibarrModules.class.php'; From 6c52d2d68f2098d3a6f35994fd99d7ddd96eeb62 Mon Sep 17 00:00:00 2001 From: UT from dolibit <45215329+dolibit-ut@users.noreply.github.com> Date: Tue, 25 Jul 2023 23:09:16 +0200 Subject: [PATCH 07/40] Update modHoliday.class.php (#25473) defgroup brief --- htdocs/core/modules/modHoliday.class.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/htdocs/core/modules/modHoliday.class.php b/htdocs/core/modules/modHoliday.class.php index 630320adaaf..ad4d135f491 100644 --- a/htdocs/core/modules/modHoliday.class.php +++ b/htdocs/core/modules/modHoliday.class.php @@ -23,7 +23,8 @@ /** * \defgroup holiday Module holiday - * \brief Module de gestion des congés + * \brief Module for leave/vacation management + * * \file htdocs/core/modules/modHoliday.class.php * \ingroup holiday * \brief Description and activation file for the module holiday From 2c8be187157a5c3cb0f30e3ad956184194248544 Mon Sep 17 00:00:00 2001 From: UT from dolibit <45215329+dolibit-ut@users.noreply.github.com> Date: Tue, 25 Jul 2023 23:09:52 +0200 Subject: [PATCH 08/40] Update box_clients.php (#25468) --- htdocs/core/boxes/box_clients.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/htdocs/core/boxes/box_clients.php b/htdocs/core/boxes/box_clients.php index cb934debef3..4e14b01079b 100644 --- a/htdocs/core/boxes/box_clients.php +++ b/htdocs/core/boxes/box_clients.php @@ -21,21 +21,21 @@ /** * \file htdocs/core/boxes/box_clients.php * \ingroup societes - * \brief Module de generation de l'affichage de la box clients + * \brief Module for generating box to show last customers */ include_once DOL_DOCUMENT_ROOT.'/core/boxes/modules_boxes.php'; /** - * Class to manage the box to show last thirdparties + * Class to manage the box to show last customers */ class box_clients extends ModeleBoxes { - public $boxcode = "lastcustomers"; - public $boximg = "object_company"; + public $boxcode = "lastcustomers"; + public $boximg = "object_company"; public $boxlabel = "BoxLastCustomers"; - public $depends = array("societe"); + public $depends = array("societe"); /** * @var DoliDB Database handler. From 2fee75b81a731c22f811b692e95078ae58bc76e5 Mon Sep 17 00:00:00 2001 From: UT from dolibit <45215329+dolibit-ut@users.noreply.github.com> Date: Tue, 25 Jul 2023 23:10:06 +0200 Subject: [PATCH 09/40] Update modECM.class.php (#25480) defgroup brief --- htdocs/core/modules/modECM.class.php | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/htdocs/core/modules/modECM.class.php b/htdocs/core/modules/modECM.class.php index 719468c076b..f9b0238a8c4 100644 --- a/htdocs/core/modules/modECM.class.php +++ b/htdocs/core/modules/modECM.class.php @@ -16,11 +16,13 @@ * along with this program. If not, see . */ -/** \defgroup ecm Module ecm - * \brief Module for ECM (Electronic Content Management) - * \file htdocs/core/modules/modECM.class.php - * \ingroup ecm - * \brief Description and activation file for the module ECM +/** + * \defgroup ecm Module ECM + * \brief Module ECM (Electronic Content Management) to manage Documents + * + * \file htdocs/core/modules/modECM.class.php + * \ingroup ecm + * \brief Description and activation file for the module ECM */ include_once DOL_DOCUMENT_ROOT.'/core/modules/DolibarrModules.class.php'; From 96b0b3f005862654df5b60127442ae498bff2a02 Mon Sep 17 00:00:00 2001 From: UT from dolibit <45215329+dolibit-ut@users.noreply.github.com> Date: Tue, 25 Jul 2023 23:10:32 +0200 Subject: [PATCH 10/40] Update modExpedition.class.php (#25484) defgroup brief --- htdocs/core/modules/modExpedition.class.php | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/htdocs/core/modules/modExpedition.class.php b/htdocs/core/modules/modExpedition.class.php index 3b6b4e10c82..b3125409a57 100644 --- a/htdocs/core/modules/modExpedition.class.php +++ b/htdocs/core/modules/modExpedition.class.php @@ -20,11 +20,12 @@ */ /** - * \defgroup expedition Module shipping - * \brief Module pour gerer les expeditions de produits - * \file htdocs/core/modules/modExpedition.class.php - * \ingroup expedition - * \brief Description and activation file for the module Expedition + * \defgroup expedition Module Shipping + * \brief Module to manage product shipments + * + * \file htdocs/core/modules/modExpedition.class.php + * \ingroup expedition + * \brief Description and activation file for the module Expedition */ include_once DOL_DOCUMENT_ROOT.'/core/modules/DolibarrModules.class.php'; From 3915bbaa14f025cf91ca1cce686720212b7fbbfc Mon Sep 17 00:00:00 2001 From: UT from dolibit <45215329+dolibit-ut@users.noreply.github.com> Date: Tue, 25 Jul 2023 23:10:46 +0200 Subject: [PATCH 11/40] Update modReception.class.php (#25479) defgroup brief --- htdocs/core/modules/modReception.class.php | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/htdocs/core/modules/modReception.class.php b/htdocs/core/modules/modReception.class.php index d6341e6279d..7a606b9c0a8 100644 --- a/htdocs/core/modules/modReception.class.php +++ b/htdocs/core/modules/modReception.class.php @@ -16,11 +16,12 @@ */ /** - * \defgroup reception Module reception - * \brief Module pour gerer les réceptions de produits - * \file htdocs/core/modules/modReception.class.php - * \ingroup reception - * \brief Description and activation file for the module Reception + * \defgroup reception Module Reception + * \brief Module to manage receptions of products + * + * \file htdocs/core/modules/modReception.class.php + * \ingroup reception + * \brief Description and activation file for the module Reception */ include_once DOL_DOCUMENT_ROOT.'/core/modules/DolibarrModules.class.php'; From 161684bc24d7803d4a924238f2efb2b1d7bfcb49 Mon Sep 17 00:00:00 2001 From: UT from dolibit <45215329+dolibit-ut@users.noreply.github.com> Date: Tue, 25 Jul 2023 23:11:09 +0200 Subject: [PATCH 12/40] Update modEmailCollector.class.php (#25481) defgroup brief --- htdocs/core/modules/modEmailCollector.class.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/core/modules/modEmailCollector.class.php b/htdocs/core/modules/modEmailCollector.class.php index 0a8f67016e1..a6e27a546b9 100644 --- a/htdocs/core/modules/modEmailCollector.class.php +++ b/htdocs/core/modules/modEmailCollector.class.php @@ -16,8 +16,8 @@ */ /** - * \defgroup emailcollector Module emailcollector - * \brief emailcollector module descriptor. + * \defgroup emailcollector Module Emailcollector + * \brief Module to collect emails * * \file htdocs/core/modules/modEmailCollector.class.php * \ingroup emailcollector From c96e1de4b0c6d71cac5fc5fe29a97e9ee2106e96 Mon Sep 17 00:00:00 2001 From: UT from dolibit <45215329+dolibit-ut@users.noreply.github.com> Date: Tue, 25 Jul 2023 23:11:21 +0200 Subject: [PATCH 13/40] Update modUser.class.php (#25482) defgroup brief --- htdocs/core/modules/modUser.class.php | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/htdocs/core/modules/modUser.class.php b/htdocs/core/modules/modUser.class.php index df5cfba961f..4fce2b8021f 100644 --- a/htdocs/core/modules/modUser.class.php +++ b/htdocs/core/modules/modUser.class.php @@ -18,11 +18,12 @@ */ /** - * \defgroup user Module user management - * \brief Module pour gerer les utilisateurs - * \file htdocs/core/modules/modUser.class.php - * \ingroup user - * \brief Description and activation file for the module users + * \defgroup user Module user management + * \brief Module to manage users and usergroups + * + * \file htdocs/core/modules/modUser.class.php + * \ingroup user + * \brief Description and activation file for the module users */ include_once DOL_DOCUMENT_ROOT.'/core/modules/DolibarrModules.class.php'; From 54c7e0af2e99032861b8ab804c6a6336b1c20cb8 Mon Sep 17 00:00:00 2001 From: UT from dolibit <45215329+dolibit-ut@users.noreply.github.com> Date: Tue, 25 Jul 2023 23:11:37 +0200 Subject: [PATCH 14/40] Update modMrp.class.php (#25475) defgroup brief --- htdocs/core/modules/modMrp.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/modules/modMrp.class.php b/htdocs/core/modules/modMrp.class.php index f315a4594c4..caf221bfd83 100644 --- a/htdocs/core/modules/modMrp.class.php +++ b/htdocs/core/modules/modMrp.class.php @@ -20,7 +20,7 @@ /** * \defgroup mrp Module Mrp - * \brief Mrp module descriptor. + * \brief Module to manage Manufacturing Orders (MO) * * \file htdocs/core/modules/modMrp.class.php * \ingroup mrp From 09d286c0dd134b4c2b987ea5fc125d107941484f Mon Sep 17 00:00:00 2001 From: UT from dolibit <45215329+dolibit-ut@users.noreply.github.com> Date: Tue, 25 Jul 2023 23:12:53 +0200 Subject: [PATCH 15/40] Update llx_10_c_regions.sql (#25469) --- .../install/mysql/data/llx_10_c_regions.sql | 69 ++++++++++--------- 1 file changed, 36 insertions(+), 33 deletions(-) diff --git a/htdocs/install/mysql/data/llx_10_c_regions.sql b/htdocs/install/mysql/data/llx_10_c_regions.sql index d319396e246..84fbf7e006c 100644 --- a/htdocs/install/mysql/data/llx_10_c_regions.sql +++ b/htdocs/install/mysql/data/llx_10_c_regions.sql @@ -10,7 +10,7 @@ -- Copyright (C) 2012 Ricardo Schluter -- Copyright (C) 2015 Ferran Marcet -- Copyright (C) 2019~ Lao Tian <281388879@qq.com> --- Copyright (C) 2020-2021 Udo Tamm +-- Copyright (C) 2020-2023 Udo Tamm -- Copyright (C) 2022 Miro Sertić -- -- This program is free software; you can redistribute it and/or modify @@ -42,51 +42,52 @@ -- CONTENT ------------------------------------------------------------------- -- --- Algeria -> for Departmements --- Andorra -> for Departmements --- Angola -> for Departmements +-- Algeria -> only for Departmements +-- Andorra -> only for Departmements +-- Angola -> only for Departmements -- Argentina --- Australia -> for Departmements --- Austria -> for Departmements --- Barbados -> for Departmements +-- Australia -> only for Departmements +-- Austria -> only for Departmements +-- Barbados -> only for Departmements -- Belgium -- Bolivia --- Brazil -> for Departmements +-- Brazil -> only for Departmements -- Burundi --- Canada -> for Departmements +-- Canada -> only for Departmements -- Chile -- China --- Colombie -> for Departmements +-- Colombie -> only for Departmements -- Croatia -- Denmark -- France --- Germany -> for Departmements +-- Germany -> only for Departmements -- Greece --- Honduras -> for Departmements +-- Honduras -> only for Departmements -- Hungary --- India -> for Departmements --- Indonesia -> for Departmements +-- India -> only for Departmements +-- Indonesia -> only for Departmements -- Italy --- Japan -> only for Departmements +-- Japan -> only for Departmements -- Luxembourg -- Mauritius --- Mexique -> for Departmements +-- Mexique -> only for Departmements -- Morocco --- Netherlands -> for Departmements --- Panama -> for Departmements +-- Netherlands -> only for Departmements +-- Panama -> only for Departmements -- Peru -- Portugal --- Romania -> for Departmements +-- Romania -> only for Departmements -- San Salvador -- Slovakia -- Slovenia -- Spain --- Switzerland/Suisse -> for Departmements/Cantons --- Taiwan -> for Departmements +-- Switzerland/Suisse -> only for Departmements/Cantons +-- Taiwan -> only for Departmements -- Tunesia --- United Arab Emirates -> for Departmements +-- Turkey +-- United Arab Emirates -> only for Departmements -- United Kingdom --- USA -> for Departmements +-- USA -> only for Departmements -- Venezuela @@ -400,7 +401,7 @@ INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( -- Netherlands Regions (id country=17) -INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 17, 1701, '', 0,'Provincies van Nederland '); +INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 17, 1701, '', 0, 'Provincies van Nederland '); -- Panama Regions (id country=178) @@ -437,7 +438,7 @@ INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 1 -- Portugal Regions (rowid country=25) -INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) VALUES ( 25, 15001, 'PT', NULL, 'Portugal'); +INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) VALUES ( 25, 15001, 'PT', NULL, 'Portugal'); INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) VALUES ( 25, 15002, 'PT9', NULL, 'Azores-Madeira'); @@ -521,6 +522,16 @@ insert into llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 1 insert into llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 10, 1024, '', 0, 'Zaghouan'); +-- Turkiye (Turkey) Regions (id country=221) +INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 221, 22101, '', 0, 'Marmara'); +INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 221, 22102, '', 0, 'İç Anadolu'); +INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 221, 22103, '', 0, 'Ege'); +INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 221, 22104, '', 0, 'Akdeniz'); +INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 221, 22105, '', 0, 'Güneydoğu'); +INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 221, 22106, '', 0, 'Karadeniz'); +INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 221, 22107, '', 0, 'Doğu Anadolu'); + + -- United Arab Emirates (UAE) Region (rowid country=227) INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 227, 22701, '', 0, 'United Arab Emirates'); @@ -547,11 +558,3 @@ INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 2 INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 232, 23208, '', 0, 'Nor-Oriental'); INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 232, 23209, '', 0, 'Zuliana'); --- Turkiye (Turkey) Regions (id country=221) -INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 221, 22101, '', 0, 'Marmara'); -INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 221, 22102, '', 0, 'İç Anadolu'); -INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 221, 22103, '', 0, 'Ege'); -INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 221, 22104, '', 0, 'Akdeniz'); -INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 221, 22105, '', 0, 'Güneydoğu'); -INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 221, 22106, '', 0, 'Karadeniz'); -INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 221, 22107, '', 0, 'Doğu Anadolu'); From 73a82b7d8a20361a337d85567ee64c3f669a6663 Mon Sep 17 00:00:00 2001 From: UT from dolibit <45215329+dolibit-ut@users.noreply.github.com> Date: Tue, 25 Jul 2023 23:13:42 +0200 Subject: [PATCH 16/40] Update modNotification.class.php (#25477) defgroup brief --- htdocs/core/modules/modNotification.class.php | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/htdocs/core/modules/modNotification.class.php b/htdocs/core/modules/modNotification.class.php index 63086fd9112..0e59169bda3 100644 --- a/htdocs/core/modules/modNotification.class.php +++ b/htdocs/core/modules/modNotification.class.php @@ -17,11 +17,12 @@ */ /** - * \defgroup notification Module email notification - * \brief Module pour gerer les notifications (par mail ou autre) - * \file htdocs/core/modules/modNotification.class.php - * \ingroup notification - * \brief Description and activation file for the module Notification + * \defgroup notification Module notification + * \brief Module for managing notifications (by e-mail or other means) + * + * \file htdocs/core/modules/modNotification.class.php + * \ingroup notification + * \brief Description and activation file for the module Notification */ include_once DOL_DOCUMENT_ROOT.'/core/modules/DolibarrModules.class.php'; From 3d44cb7cb5411a76c46ab242612244c4e3f58dfa Mon Sep 17 00:00:00 2001 From: UT from dolibit <45215329+dolibit-ut@users.noreply.github.com> Date: Tue, 25 Jul 2023 23:13:50 +0200 Subject: [PATCH 17/40] Update modFournisseur.class.php (#25476) defgroup brief --- htdocs/core/modules/modFournisseur.class.php | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/htdocs/core/modules/modFournisseur.class.php b/htdocs/core/modules/modFournisseur.class.php index 81a8e6224cf..3127a0d76bb 100644 --- a/htdocs/core/modules/modFournisseur.class.php +++ b/htdocs/core/modules/modFournisseur.class.php @@ -21,10 +21,12 @@ */ /** - * \defgroup fournisseur Module suppliers - * \file htdocs/core/modules/modFournisseur.class.php - * \ingroup fournisseur - * \brief Description and activation file for the module Supplier + * \defgroup fournisseur Module suppliers + * \brief Module to manage suppliers relations and activities + * + * \file htdocs/core/modules/modFournisseur.class.php + * \ingroup fournisseur + * \brief Description and activation file for the module Supplier */ include_once DOL_DOCUMENT_ROOT.'/core/modules/DolibarrModules.class.php'; From 0d0395fce35604efef69cecb9bb59c5e8226e9a9 Mon Sep 17 00:00:00 2001 From: UT from dolibit <45215329+dolibit-ut@users.noreply.github.com> Date: Tue, 25 Jul 2023 23:14:17 +0200 Subject: [PATCH 18/40] Update modApi.class.php (#25478) --- htdocs/core/modules/modApi.class.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/htdocs/core/modules/modApi.class.php b/htdocs/core/modules/modApi.class.php index 4ac93f87c9a..acceaa822d1 100644 --- a/htdocs/core/modules/modApi.class.php +++ b/htdocs/core/modules/modApi.class.php @@ -20,7 +20,8 @@ /** * \defgroup api Module Api - * \brief Descriptor file for Api modulee + * \brief Module for API (REST) management + * * \file htdocs/core/modules/modApi.class.php * \ingroup api * \brief Description and activation file for the module Api From 25c4e51076b691a86b8ee2c3294c1baf3c0bc2ff Mon Sep 17 00:00:00 2001 From: UT from dolibit <45215329+dolibit-ut@users.noreply.github.com> Date: Tue, 25 Jul 2023 23:15:43 +0200 Subject: [PATCH 19/40] Update llx_20_c_departements.sql (#25470) --- .../mysql/data/llx_20_c_departements.sql | 192 +++++++++--------- 1 file changed, 97 insertions(+), 95 deletions(-) diff --git a/htdocs/install/mysql/data/llx_20_c_departements.sql b/htdocs/install/mysql/data/llx_20_c_departements.sql index 81f4b473f60..59127065612 100644 --- a/htdocs/install/mysql/data/llx_20_c_departements.sql +++ b/htdocs/install/mysql/data/llx_20_c_departements.sql @@ -12,7 +12,7 @@ -- Copyright (C) 2012 Sebastian Neuwert -- Copyright (C) 2012 Ricardo Schluter -- Copyright (C) 2015 Ferran Marcet --- Copyright (C) 2020-2021 Udo Tamm +-- Copyright (C) 2020-2023 Udo Tamm -- Copyright (C) 2022 Miro Sertić -- Copyright (C) 2022 ButterflyOfFire -- @@ -63,15 +63,16 @@ -- Honduras -- Hungary -- Italy +-- Japan -- Luxembourg --- Netherlands -- Morocco +-- Netherlands -- Panama -- Peru -- Portugal -- Romania -- San Salvador -> El Salvador --- Slovenia (need to check code SI-Id) +-- Slovenia (need to check code SI-Id) -- Switzerland / Suisse -- Taiwan -- Tunisia @@ -424,11 +425,11 @@ INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc -- France Departements (id country=1) -insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) values ( 1, '971','97105',3,'GUADELOUPE','Guadeloupe'); -insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) values ( 2, '972','97209',3,'MARTINIQUE','Martinique'); -insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) values ( 3, '973','97302',3,'GUYANE','Guyane'); -insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) values ( 4, '974','97411',3,'REUNION','Réunion'); -insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) values ( 6, '976','97601',3,'MAYOTTE','Mayotte'); +insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) values ( 1, '971','97105',3, 'GUADELOUPE','Guadeloupe'); +insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) values ( 2, '972','97209',3, 'MARTINIQUE','Martinique'); +insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) values ( 3, '973','97302',3, 'GUYANE','Guyane'); +insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) values ( 4, '974','97411',3, 'REUNION','Réunion'); +insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) values ( 6, '976','97601',3, 'MAYOTTE','Mayotte'); insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) values (84, '01', '01053',5, 'AIN', 'Ain'); insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) values (32, '02', '02408',5, 'AISNE', 'Aisne'); @@ -775,6 +776,56 @@ insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) values (307, 'VT', NULL, NULL, NULL, 'VITERBO'); +-- Japan 都道府県 (id country=123) +insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom, active) values (12301, '01', '', 0, '北海', '北海道', 1); +insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom, active) values (12301, '02', '', 0, '青森', '青森県', 1); +insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom, active) values (12301, '03', '', 0, '岩手', '岩手県', 1); +insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom, active) values (12301, '04', '', 0, '宮城', '宮城県', 1); +insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom, active) values (12301, '05', '', 0, '秋田', '秋田県', 1); +insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom, active) values (12301, '06', '', 0, '山形', '山形県', 1); +insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom, active) values (12301, '07', '', 0, '福島', '福島県', 1); +insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom, active) values (12301, '08', '', 0, '茨城', '茨城県', 1); +insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom, active) values (12301, '09', '', 0, '栃木', '栃木県', 1); +insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom, active) values (12301, '10', '', 0, '群馬', '群馬県', 1); +insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom, active) values (12301, '11', '', 0, '埼玉', '埼玉県', 1); +insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom, active) values (12301, '12', '', 0, '千葉', '千葉県', 1); +insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom, active) values (12301, '13', '', 0, '東京', '東京都', 1); +insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom, active) values (12301, '14', '', 0, '神奈川', '神奈川県', 1); +insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom, active) values (12301, '15', '', 0, '新潟', '新潟県', 1); +insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom, active) values (12301, '16', '', 0, '富山', '富山県', 1); +insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom, active) values (12301, '17', '', 0, '石川', '石川県', 1); +insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom, active) values (12301, '18', '', 0, '福井', '福井県', 1); +insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom, active) values (12301, '19', '', 0, '山梨', '山梨県', 1); +insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom, active) values (12301, '20', '', 0, '長野', '長野県', 1); +insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom, active) values (12301, '21', '', 0, '岐阜', '岐阜県', 1); +insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom, active) values (12301, '22', '', 0, '静岡', '静岡県', 1); +insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom, active) values (12301, '23', '', 0, '愛知', '愛知県', 1); +insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom, active) values (12301, '24', '', 0, '三重', '三重県', 1); +insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom, active) values (12301, '25', '', 0, '滋賀', '滋賀県', 1); +insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom, active) values (12301, '26', '', 0, '京都', '京都府', 1); +insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom, active) values (12301, '27', '', 0, '大阪', '大阪府', 1); +insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom, active) values (12301, '28', '', 0, '兵庫', '兵庫県', 1); +insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom, active) values (12301, '29', '', 0, '奈良', '奈良県', 1); +insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom, active) values (12301, '30', '', 0, '和歌山', '和歌山県', 1); +insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom, active) values (12301, '31', '', 0, '鳥取', '鳥取県', 1); +insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom, active) values (12301, '32', '', 0, '島根', '島根県', 1); +insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom, active) values (12301, '33', '', 0, '岡山', '岡山県', 1); +insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom, active) values (12301, '34', '', 0, '広島', '広島県', 1); +insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom, active) values (12301, '35', '', 0, '山口', '山口県', 1); +insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom, active) values (12301, '36', '', 0, '徳島', '徳島県', 1); +insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom, active) values (12301, '37', '', 0, '香川', '香川県', 1); +insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom, active) values (12301, '38', '', 0, '愛媛', '愛媛県', 1); +insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom, active) values (12301, '39', '', 0, '高知', '高知県', 1); +insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom, active) values (12301, '40', '', 0, '福岡', '福岡県', 1); +insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom, active) values (12301, '41', '', 0, '佐賀', '佐賀県', 1); +insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom, active) values (12301, '42', '', 0, '長崎', '長崎県', 1); +insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom, active) values (12301, '43', '', 0, '熊本', '熊本県', 1); +insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom, active) values (12301, '44', '', 0, '大分', '大分県', 1); +insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom, active) values (12301, '45', '', 0, '宮崎', '宮崎県', 1); +insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom, active) values (12301, '46', '', 0, '鹿児島', '鹿児島県', 1); +insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom, active) values (12301, '47', '', 0, '沖縄', '沖縄県', 1); + + -- Luxembourg Cantons (id country=140) INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (14001, 'LU0001', '', 0, '', 'Clervaux'); INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (14001, 'LU0002', '', 0, '', 'Diekirch'); @@ -1640,42 +1691,42 @@ INSERT INTO llx_c_departements (code_departement, fk_region, cheflieu, tncc, ncc -- Provinces India (id country=117) -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('AN', 11701, NULL, 0, 'AN', 'Andaman & Nicobar', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('AP', 11701, NULL, 0, 'AP', 'Andhra Pradesh', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('AR', 11701, NULL, 0, 'AR', 'Arunachal Pradesh', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('AS', 11701, NULL, 0, 'AS', 'Assam', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('BR', 11701, NULL, 0, 'BR', 'Bihar', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('CG', 11701, NULL, 0, 'CG', 'Chattisgarh', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('CH', 11701, NULL, 0, 'CH', 'Chandigarh', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('DD', 11701, NULL, 0, 'DD', 'Daman & Diu', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('DL', 11701, NULL, 0, 'DL', 'Delhi', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('DN', 11701, NULL, 0, 'DN', 'Dadra and Nagar Haveli', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('GA', 11701, NULL, 0, 'GA', 'Goa', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('GJ', 11701, NULL, 0, 'GJ', 'Gujarat', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('HP', 11701, NULL, 0, 'HP', 'Himachal Pradesh', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('HR', 11701, NULL, 0, 'HR', 'Haryana', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('JH', 11701, NULL, 0, 'JH', 'Jharkhand', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('JK', 11701, NULL, 0, 'JK', 'Jammu & Kashmir', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('KA', 11701, NULL, 0, 'KA', 'Karnataka', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('KL', 11701, NULL, 0, 'KL', 'Kerala', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('LD', 11701, NULL, 0, 'LD', 'Lakshadweep', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('MH', 11701, NULL, 0, 'MH', 'Maharashtra', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('ML', 11701, NULL, 0, 'ML', 'Meghalaya', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('MN', 11701, NULL, 0, 'MN', 'Manipur', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('MP', 11701, NULL, 0, 'MP', 'Madhya Pradesh', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('MZ', 11701, NULL, 0, 'MZ', 'Mizoram', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('NL', 11701, NULL, 0, 'NL', 'Nagaland', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('OR', 11701, NULL, 0, 'OR', 'Orissa', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('PB', 11701, NULL, 0, 'PB', 'Punjab', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('PY', 11701, NULL, 0, 'PY', 'Puducherry', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('RJ', 11701, NULL, 0, 'RJ', 'Rajasthan', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('SK', 11701, NULL, 0, 'SK', 'Sikkim', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('TE', 11701, NULL, 0, 'TE', 'Telangana', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('TN', 11701, NULL, 0, 'TN', 'Tamil Nadu', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('TR', 11701, NULL, 0, 'TR', 'Tripura', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('UL', 11701, NULL, 0, 'UL', 'Uttarakhand', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('UP', 11701, NULL, 0, 'UP', 'Uttar Pradesh', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('WB', 11701, NULL, 0, 'WB', 'West Bengal', 1); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom) VALUES ('AN', 11701, NULL, 0, 'AN', 'Andaman & Nicobar'); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom) VALUES ('AP', 11701, NULL, 0, 'AP', 'Andhra Pradesh'); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom) VALUES ('AR', 11701, NULL, 0, 'AR', 'Arunachal Pradesh'); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom) VALUES ('AS', 11701, NULL, 0, 'AS', 'Assam'); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom) VALUES ('BR', 11701, NULL, 0, 'BR', 'Bihar'); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom) VALUES ('CG', 11701, NULL, 0, 'CG', 'Chattisgarh'); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom) VALUES ('CH', 11701, NULL, 0, 'CH', 'Chandigarh'); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom) VALUES ('DD', 11701, NULL, 0, 'DD', 'Daman & Diu'); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom) VALUES ('DL', 11701, NULL, 0, 'DL', 'Delhi'); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom) VALUES ('DN', 11701, NULL, 0, 'DN', 'Dadra and Nagar Haveli'); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom) VALUES ('GA', 11701, NULL, 0, 'GA', 'Goa'); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom) VALUES ('GJ', 11701, NULL, 0, 'GJ', 'Gujarat'); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom) VALUES ('HP', 11701, NULL, 0, 'HP', 'Himachal Pradesh'); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom) VALUES ('HR', 11701, NULL, 0, 'HR', 'Haryana'); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom) VALUES ('JH', 11701, NULL, 0, 'JH', 'Jharkhand'); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom) VALUES ('JK', 11701, NULL, 0, 'JK', 'Jammu & Kashmir'); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom) VALUES ('KA', 11701, NULL, 0, 'KA', 'Karnataka'); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom) VALUES ('KL', 11701, NULL, 0, 'KL', 'Kerala'); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom) VALUES ('LD', 11701, NULL, 0, 'LD', 'Lakshadweep'); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom) VALUES ('MH', 11701, NULL, 0, 'MH', 'Maharashtra'); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom) VALUES ('ML', 11701, NULL, 0, 'ML', 'Meghalaya'); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom) VALUES ('MN', 11701, NULL, 0, 'MN', 'Manipur'); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom) VALUES ('MP', 11701, NULL, 0, 'MP', 'Madhya Pradesh'); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom) VALUES ('MZ', 11701, NULL, 0, 'MZ', 'Mizoram'); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom) VALUES ('NL', 11701, NULL, 0, 'NL', 'Nagaland'); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom) VALUES ('OR', 11701, NULL, 0, 'OR', 'Orissa'); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom) VALUES ('PB', 11701, NULL, 0, 'PB', 'Punjab'); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom) VALUES ('PY', 11701, NULL, 0, 'PY', 'Puducherry'); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom) VALUES ('RJ', 11701, NULL, 0, 'RJ', 'Rajasthan'); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom) VALUES ('SK', 11701, NULL, 0, 'SK', 'Sikkim'); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom) VALUES ('TE', 11701, NULL, 0, 'TE', 'Telangana'); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom) VALUES ('TN', 11701, NULL, 0, 'TN', 'Tamil Nadu'); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom) VALUES ('TR', 11701, NULL, 0, 'TR', 'Tripura'); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom) VALUES ('UL', 11701, NULL, 0, 'UL', 'Uttarakhand'); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom) VALUES ('UP', 11701, NULL, 0, 'UP', 'Uttar Pradesh'); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom) VALUES ('WB', 11701, NULL, 0, 'WB', 'West Bengal'); -- Provinces Indonesia (id country=118) INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('BA', 11801, NULL, 0, 'BA', 'Bali', 1); @@ -1748,7 +1799,7 @@ INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, nc INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('ZAC', 15401, '', 0, 'ZAC', 'Zacatecas', 1); --- Provinces Venezuela (id country=232) +-- Venezuela Provinces (id country=232) INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('VE-L', 23201, '', 0, 'VE-L', 'Mérida', 1); INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('VE-T', 23201, '', 0, 'VE-T', 'Trujillo', 1); INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('VE-E', 23201, '', 0, 'VE-E', 'Barinas', 1); @@ -1897,6 +1948,7 @@ INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (6118, 'BI0118', '', 0, '', 'Nyabitsinda'); INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (6118, 'BI0119', '', 0, '', 'Ruyigi'); + -- Provinces United Arab Emirates (id country=227) INSERT INTO llx_c_departements (code_departement, fk_region, cheflieu, tncc, ncc, nom) VALUES ('AE-1', 22701, '', 0, '', 'Abu Dhabi'); INSERT INTO llx_c_departements (code_departement, fk_region, cheflieu, tncc, ncc, nom) VALUES ('AE-2', 22701, '', 0, '', 'Dubai'); @@ -1906,58 +1958,8 @@ INSERT INTO llx_c_departements (code_departement, fk_region, cheflieu, tncc, ncc INSERT INTO llx_c_departements (code_departement, fk_region, cheflieu, tncc, ncc, nom) VALUES ('AE-6', 22701, '', 0, '', 'Sharjah'); INSERT INTO llx_c_departements (code_departement, fk_region, cheflieu, tncc, ncc, nom) VALUES ('AE-7', 22701, '', 0, '', 'Umm al-Quwain'); --- Japan 都道府県 (id country=123) -insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom, active) values (12301, '01', '', 0, '北海', '北海道', 1); -insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom, active) values (12301, '02', '', 0, '青森', '青森県', 1); -insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom, active) values (12301, '03', '', 0, '岩手', '岩手県', 1); -insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom, active) values (12301, '04', '', 0, '宮城', '宮城県', 1); -insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom, active) values (12301, '05', '', 0, '秋田', '秋田県', 1); -insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom, active) values (12301, '06', '', 0, '山形', '山形県', 1); -insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom, active) values (12301, '07', '', 0, '福島', '福島県', 1); -insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom, active) values (12301, '08', '', 0, '茨城', '茨城県', 1); -insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom, active) values (12301, '09', '', 0, '栃木', '栃木県', 1); -insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom, active) values (12301, '10', '', 0, '群馬', '群馬県', 1); -insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom, active) values (12301, '11', '', 0, '埼玉', '埼玉県', 1); -insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom, active) values (12301, '12', '', 0, '千葉', '千葉県', 1); -insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom, active) values (12301, '13', '', 0, '東京', '東京都', 1); -insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom, active) values (12301, '14', '', 0, '神奈川', '神奈川県', 1); -insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom, active) values (12301, '15', '', 0, '新潟', '新潟県', 1); -insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom, active) values (12301, '16', '', 0, '富山', '富山県', 1); -insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom, active) values (12301, '17', '', 0, '石川', '石川県', 1); -insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom, active) values (12301, '18', '', 0, '福井', '福井県', 1); -insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom, active) values (12301, '19', '', 0, '山梨', '山梨県', 1); -insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom, active) values (12301, '20', '', 0, '長野', '長野県', 1); -insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom, active) values (12301, '21', '', 0, '岐阜', '岐阜県', 1); -insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom, active) values (12301, '22', '', 0, '静岡', '静岡県', 1); -insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom, active) values (12301, '23', '', 0, '愛知', '愛知県', 1); -insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom, active) values (12301, '24', '', 0, '三重', '三重県', 1); -insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom, active) values (12301, '25', '', 0, '滋賀', '滋賀県', 1); -insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom, active) values (12301, '26', '', 0, '京都', '京都府', 1); -insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom, active) values (12301, '27', '', 0, '大阪', '大阪府', 1); -insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom, active) values (12301, '28', '', 0, '兵庫', '兵庫県', 1); -insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom, active) values (12301, '29', '', 0, '奈良', '奈良県', 1); -insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom, active) values (12301, '30', '', 0, '和歌山', '和歌山県', 1); -insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom, active) values (12301, '31', '', 0, '鳥取', '鳥取県', 1); -insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom, active) values (12301, '32', '', 0, '島根', '島根県', 1); -insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom, active) values (12301, '33', '', 0, '岡山', '岡山県', 1); -insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom, active) values (12301, '34', '', 0, '広島', '広島県', 1); -insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom, active) values (12301, '35', '', 0, '山口', '山口県', 1); -insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom, active) values (12301, '36', '', 0, '徳島', '徳島県', 1); -insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom, active) values (12301, '37', '', 0, '香川', '香川県', 1); -insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom, active) values (12301, '38', '', 0, '愛媛', '愛媛県', 1); -insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom, active) values (12301, '39', '', 0, '高知', '高知県', 1); -insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom, active) values (12301, '40', '', 0, '福岡', '福岡県', 1); -insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom, active) values (12301, '41', '', 0, '佐賀', '佐賀県', 1); -insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom, active) values (12301, '42', '', 0, '長崎', '長崎県', 1); -insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom, active) values (12301, '43', '', 0, '熊本', '熊本県', 1); -insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom, active) values (12301, '44', '', 0, '大分', '大分県', 1); -insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom, active) values (12301, '45', '', 0, '宮崎', '宮崎県', 1); -insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom, active) values (12301, '46', '', 0, '鹿児島', '鹿児島県', 1); -insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom, active) values (12301, '47', '', 0, '沖縄', '沖縄県', 1); - -- Turkiye (Turkey) (id country=221) - INSERT INTO llx_c_departements (code_departement, fk_region, nom) VALUES ('TR-01',22104,'Adana'); INSERT INTO llx_c_departements (code_departement, fk_region, nom) VALUES ('TR-02',22107,'Adıyaman'); INSERT INTO llx_c_departements (code_departement, fk_region, nom) VALUES ('TR-03',22103,'Afyon'); From 37937f2a46187a8339e76c2ad4a65696b3c28b22 Mon Sep 17 00:00:00 2001 From: UT from dolibit <45215329+dolibit-ut@users.noreply.github.com> Date: Tue, 25 Jul 2023 23:15:53 +0200 Subject: [PATCH 20/40] Update modHRM.class.php (#25474) defgroup brief --- htdocs/core/modules/modHRM.class.php | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/htdocs/core/modules/modHRM.class.php b/htdocs/core/modules/modHRM.class.php index f4295f53193..cd625811860 100644 --- a/htdocs/core/modules/modHRM.class.php +++ b/htdocs/core/modules/modHRM.class.php @@ -17,10 +17,12 @@ */ /** - * \defgroup HRM Module hrm - * \file htdocs/core/modules/modHRM.class.php - * \ingroup HRM - * \brief Description and activation file for the module HRM + * \defgroup HRM Module hrm + * \brief Module for Human Resource Management (HRM) + * + * \file htdocs/core/modules/modHRM.class.php + * \ingroup HRM + * \brief Description and activation file for the module HRM */ include_once DOL_DOCUMENT_ROOT."/core/modules/DolibarrModules.class.php"; From c86b608a413a0339747b9e1dda0a13f25993cc13 Mon Sep 17 00:00:00 2001 From: Alban Durrheimer Date: Tue, 25 Jul 2023 23:17:09 +0200 Subject: [PATCH 21/40] NEW Add more information to holiday mailings (#25461) * Add more information to holiday mailings * Fix leave type in mailings --- htdocs/holiday/card.php | 20 +++++++++++++++++++- htdocs/holiday/card_group.php | 20 +++++++++++++++++++- 2 files changed, 38 insertions(+), 2 deletions(-) diff --git a/htdocs/holiday/card.php b/htdocs/holiday/card.php index f9fe67d07dc..9d4e8a5c2d1 100644 --- a/htdocs/holiday/card.php +++ b/htdocs/holiday/card.php @@ -522,11 +522,29 @@ if (empty($reshook)) { } } + $typeleaves = $object->getTypes(1, -1); + $labeltoshow = (($typeleaves[$object->fk_type]['code'] && $langs->trans($typeleaves[$object->fk_type]['code']) != $typeleaves[$object->fk_type]['code']) ? $langs->trans($typeleaves[$object->fk_type]['code']) : $typeleaves[$object->fk_type]['label']); + + if ($object->halfday == 2) { + $starthalfdaykey = "Afternoon"; + $endhalfdaykey = "Morning"; + } elseif ($object->halfday == -1) { + $starthalfdaykey = "Afternoon"; + $endhalfdaykey = "Afternoon"; + } elseif ($object->halfday == 1) { + $starthalfdaykey = "Morning"; + $endhalfdaykey = "Morning"; + } elseif ($object->halfday == 2) { + $starthalfdaykey = "Morning"; + $endhalfdaykey = "Afternoon"; + } + $link = dol_buildpath("/holiday/card.php", 3) . '?id='.$object->id; $message .= "
    "; $message .= "
  • ".$langs->transnoentitiesnoconv("Name")." : ".dolGetFirstLastname($expediteur->firstname, $expediteur->lastname)."
  • \n"; - $message .= "
  • ".$langs->transnoentitiesnoconv("Period")." : ".dol_print_date($object->date_debut, 'day')." ".$langs->transnoentitiesnoconv("To")." ".dol_print_date($object->date_fin, 'day')."
  • \n"; + $message .= "
  • ".$langs->transnoentitiesnoconv("Type")." : ".(empty($labeltoshow) ? $langs->trans("TypeWasDisabledOrRemoved", $object->fk_type) : $labeltoshow)."
  • \n"; + $message .= "
  • ".$langs->transnoentitiesnoconv("Period")." : ".dol_print_date($object->date_debut, 'day')." ".$langs->transnoentitiesnoconv($starthalfdaykey)." ".$langs->transnoentitiesnoconv("To")." ".dol_print_date($object->date_fin, 'day')." ".$langs->transnoentitiesnoconv($endhalfdaykey)."
  • \n"; $message .= "
  • ".$langs->transnoentitiesnoconv("Link").' : '.$link."
  • \n"; $message .= "
\n"; diff --git a/htdocs/holiday/card_group.php b/htdocs/holiday/card_group.php index 5ef93d686c9..27c0e14b4d2 100644 --- a/htdocs/holiday/card_group.php +++ b/htdocs/holiday/card_group.php @@ -747,11 +747,29 @@ function sendMail($id, $cancreate, $now, $autoValidation) } } + $typeleaves = $object->getTypes(1, -1); + $labeltoshow = (($typeleaves[$object->fk_type]['code'] && $langs->trans($typeleaves[$object->fk_type]['code']) != $typeleaves[$object->fk_type]['code']) ? $langs->trans($typeleaves[$object->fk_type]['code']) : $typeleaves[$object->fk_type]['label']); + + if ($object->halfday == 2) { + $starthalfdaykey = "Afternoon"; + $endhalfdaykey = "Morning"; + } elseif ($object->halfday == -1) { + $starthalfdaykey = "Afternoon"; + $endhalfdaykey = "Afternoon"; + } elseif ($object->halfday == 1) { + $starthalfdaykey = "Morning"; + $endhalfdaykey = "Morning"; + } elseif ($object->halfday == 2) { + $starthalfdaykey = "Morning"; + $endhalfdaykey = "Afternoon"; + } + $link = dol_buildpath("/holiday/card.php", 3) . '?id='.$object->id; $message .= "
    "; $message .= "
  • ".$langs->transnoentitiesnoconv("Name")." : ".dolGetFirstLastname($expediteur->firstname, $expediteur->lastname)."
  • \n"; - $message .= "
  • ".$langs->transnoentitiesnoconv("Period")." : ".dol_print_date($object->date_debut, 'day')." ".$langs->transnoentitiesnoconv("To")." ".dol_print_date($object->date_fin, 'day')."
  • \n"; + $message .= "
  • ".$langs->transnoentitiesnoconv("Type")." : ".(empty($labeltoshow) ? $langs->trans("TypeWasDisabledOrRemoved", $object->fk_type) : $labeltoshow)."
  • \n"; + $message .= "
  • ".$langs->transnoentitiesnoconv("Period")." : ".dol_print_date($object->date_debut, 'day')." ".$langs->transnoentitiesnoconv($starthalfdaykey)." ".$langs->transnoentitiesnoconv("To")." ".dol_print_date($object->date_fin, 'day')." ".$langs->transnoentitiesnoconv($endhalfdaykey)."
  • \n"; $message .= "
  • ".$langs->transnoentitiesnoconv("Link").' : '.$link."
  • \n"; $message .= "
\n"; From cc3468abe3b11b6b17c7848d9c0e4a20f06d3168 Mon Sep 17 00:00:00 2001 From: UT from dolibit <45215329+dolibit-ut@users.noreply.github.com> Date: Tue, 25 Jul 2023 23:17:38 +0200 Subject: [PATCH 22/40] Update box_graph_invoices_permonth.php (#25467) --- htdocs/core/boxes/box_graph_invoices_permonth.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/htdocs/core/boxes/box_graph_invoices_permonth.php b/htdocs/core/boxes/box_graph_invoices_permonth.php index 556b3a7fe42..49be094ecb0 100644 --- a/htdocs/core/boxes/box_graph_invoices_permonth.php +++ b/htdocs/core/boxes/box_graph_invoices_permonth.php @@ -24,14 +24,14 @@ include_once DOL_DOCUMENT_ROOT.'/core/boxes/modules_boxes.php'; /** - * Class to manage the box to show last invoices + * Class to manage the box to show invoices per month graph */ class box_graph_invoices_permonth extends ModeleBoxes { - public $boxcode = "invoicespermonth"; - public $boximg = "object_bill"; + public $boxcode = "invoicespermonth"; + public $boximg = "object_bill"; public $boxlabel = "BoxCustomersInvoicesPerMonth"; - public $depends = array("facture"); + public $depends = array("facture"); /** * @var DoliDB Database handler. From d2f9d7634bb58cb0b8cd27a11ba35a137ce20554 Mon Sep 17 00:00:00 2001 From: Boris Hermans Date: Tue, 25 Jul 2023 23:24:11 +0200 Subject: [PATCH 23/40] Handle projects for the api documents listing route (#25465) --- htdocs/api/class/api_documents.class.php | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/htdocs/api/class/api_documents.class.php b/htdocs/api/class/api_documents.class.php index 6d89c8a01d0..cab81b80124 100644 --- a/htdocs/api/class/api_documents.class.php +++ b/htdocs/api/class/api_documents.class.php @@ -502,6 +502,17 @@ class Documents extends DolibarrApi // $upload_dir = $conf->ecm->dir_output; // $type = 'all'; // $recursive = 0; + } elseif ($modulepart == 'projet' || $modulepart == 'project') { + $modulepart = 'project'; + require_once DOL_DOCUMENT_ROOT . '/projet/class/project.class.php'; + + $object = new Project($this->db); + $result = $object->fetch($id, $ref); + if (!$result) { + throw new RestException(404, 'Project not found'); + } + + $upload_dir = $conf->projet->dir_output . "/" . get_exdir(0, 0, 0, 1, $object, 'project'); } else { throw new RestException(500, 'Modulepart '.$modulepart.' not implemented yet.'); } @@ -628,7 +639,7 @@ class Documents extends DolibarrApi require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.commande.class.php'; $object = new CommandeFournisseur($this->db); - } elseif ($modulepart == 'project') { + } elseif ($modulepart == 'projet' || $modulepart == 'project') { require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php'; $object = new Project($this->db); } elseif ($modulepart == 'task' || $modulepart == 'project_task') { From 500a7e4451d89daade846f752b8d12ebcea8101e Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 25 Jul 2023 23:29:20 +0200 Subject: [PATCH 24/40] Fix error must stop --- .travis.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 410b35d4124..5d4e026f10a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -464,8 +464,8 @@ script: - | echo "Unit testing" - # Ensure we catch errors. Set this to +e instead of -e if you want to go to the end to see dolibarr.log file. - set +e + # Ensure we catch errors with -e. Set this to +e instead of -e if you want to go to the end to see dolibarr.log file. + set -e phpunit -d memory_limit=-1 -c test/phpunit/phpunittest.xml test/phpunit/AllTests.php phpunitresult=$? echo "Phpunit return code = $phpunitresult" From b920dfdbda1a4bfc428883d3eb7fb1a9f49d6e1a Mon Sep 17 00:00:00 2001 From: onhairech <47675588+oussamanhairech@users.noreply.github.com> Date: Tue, 25 Jul 2023 23:29:34 +0200 Subject: [PATCH 25/40] qodana fix 4: missing returns (#25334) * qodana fix 4: missing returns * Delete settings.json * correcting the return info function * unreachable code fix * return fix --- htdocs/asset/class/assetaccountancycodes.class.php | 1 + htdocs/compta/facture/class/facture-rec.class.php | 1 + htdocs/compta/prelevement/class/ligneprelevement.class.php | 3 +-- htdocs/compta/sociales/class/cchargesociales.class.php | 1 + htdocs/compta/sociales/class/chargesociales.class.php | 2 ++ htdocs/core/lib/functionsnumtoword.lib.php | 2 +- htdocs/core/modules/action/rapport.class.php | 1 + htdocs/core/modules/bank/doc/pdf_ban.modules.php | 2 +- htdocs/core/modules/expensereport/doc/pdf_standard.modules.php | 1 + htdocs/core/modules/facture/mod_facture_mars.php | 3 ++- htdocs/core/modules/mailings/advthirdparties.modules.php | 1 + .../core/modules/supplier_invoice/doc/pdf_canelle.modules.php | 1 + .../core/modules/supplier_payment/doc/pdf_standard.modules.php | 1 + htdocs/core/modules/takepos/mod_takepos_ref_simple.php | 3 ++- htdocs/fourn/class/fournisseur.commande.class.php | 1 + htdocs/fourn/class/fournisseur.commande.dispatch.class.php | 1 + 16 files changed, 19 insertions(+), 6 deletions(-) diff --git a/htdocs/asset/class/assetaccountancycodes.class.php b/htdocs/asset/class/assetaccountancycodes.class.php index 6c33e3af901..f52dc20a5f5 100644 --- a/htdocs/asset/class/assetaccountancycodes.class.php +++ b/htdocs/asset/class/assetaccountancycodes.class.php @@ -94,6 +94,7 @@ class AssetAccountancyCodes extends CommonObject $this->accountancy_codes[$mode_key][$field_key] = $accountancy_code; } } + return $this->accountancy_codes; } /** diff --git a/htdocs/compta/facture/class/facture-rec.class.php b/htdocs/compta/facture/class/facture-rec.class.php index 09b2c1e6185..dc2181e8e46 100644 --- a/htdocs/compta/facture/class/facture-rec.class.php +++ b/htdocs/compta/facture/class/facture-rec.class.php @@ -1214,6 +1214,7 @@ class FactureRec extends CommonInvoice return -1; } } + return -1; } diff --git a/htdocs/compta/prelevement/class/ligneprelevement.class.php b/htdocs/compta/prelevement/class/ligneprelevement.class.php index 6ed518f7f2f..9faafb99d84 100644 --- a/htdocs/compta/prelevement/class/ligneprelevement.class.php +++ b/htdocs/compta/prelevement/class/ligneprelevement.class.php @@ -126,7 +126,7 @@ class LignePrelevement * * @param int $status Id status * @param int $mode 0=Label, 1=Picto + label, 2=Picto, 3=Label + Picto - * @return string Label + * @return null|string Label */ public function LibStatut($status, $mode = 0) { @@ -160,7 +160,6 @@ class LignePrelevement return $langs->trans($this->statuts[$status]).' '.img_picto($langs->transnoentitiesnoconv($this->statuts[$status]), 'statut8', 'class="valignmiddle"'); } } - //return dolGetStatus($this->labelStatus[$status], $this->labelStatusShort[$status], '', $statusType, $mode); } diff --git a/htdocs/compta/sociales/class/cchargesociales.class.php b/htdocs/compta/sociales/class/cchargesociales.class.php index 741179d067e..b9b28f823b6 100644 --- a/htdocs/compta/sociales/class/cchargesociales.class.php +++ b/htdocs/compta/sociales/class/cchargesociales.class.php @@ -501,6 +501,7 @@ class Cchargesociales return $langs->trans('Disabled').' '.img_picto($langs->trans('Disabled'), 'statut5'); } } + return ""; } diff --git a/htdocs/compta/sociales/class/chargesociales.class.php b/htdocs/compta/sociales/class/chargesociales.class.php index 66bd680739d..7a65b75cf58 100644 --- a/htdocs/compta/sociales/class/chargesociales.class.php +++ b/htdocs/compta/sociales/class/chargesociales.class.php @@ -730,8 +730,10 @@ class ChargeSociales extends CommonObject } $this->db->free($result); + return 1; } else { dol_print_error($this->db); + return -1; } } diff --git a/htdocs/core/lib/functionsnumtoword.lib.php b/htdocs/core/lib/functionsnumtoword.lib.php index f14295ab068..cdc288abd17 100644 --- a/htdocs/core/lib/functionsnumtoword.lib.php +++ b/htdocs/core/lib/functionsnumtoword.lib.php @@ -163,7 +163,7 @@ function dol_convertToWord($num, $langs, $currency = '', $centimes = false) * @param float $numero Number to convert * @param Translate $langs Language * @param string $numorcurrency 'number' or 'amount' - * @return string Text of the number or -1 in case TOO LONG (more than 1000000000000.99) + * @return string|int Text of the number or -1 in case TOO LONG (more than 1000000000000.99) */ function dolNumberToWord($numero, $langs, $numorcurrency = 'number') { diff --git a/htdocs/core/modules/action/rapport.class.php b/htdocs/core/modules/action/rapport.class.php index a880b894b73..d43ebc17d01 100644 --- a/htdocs/core/modules/action/rapport.class.php +++ b/htdocs/core/modules/action/rapport.class.php @@ -215,6 +215,7 @@ class CommActionRapport return 1; } + return 0; } /** diff --git a/htdocs/core/modules/bank/doc/pdf_ban.modules.php b/htdocs/core/modules/bank/doc/pdf_ban.modules.php index 2af920da42e..5996b3d50c0 100644 --- a/htdocs/core/modules/bank/doc/pdf_ban.modules.php +++ b/htdocs/core/modules/bank/doc/pdf_ban.modules.php @@ -388,6 +388,6 @@ class pdf_ban extends ModeleBankAccountDoc global $conf; $showdetails = empty($conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS) ? 0 : $conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS; - //return pdf_pagefoot($pdf,$outputlangs,'BANK_FREE_TEXT',$this->emetteur,$this->marge_basse,$this->marge_gauche,$this->page_hauteur,$object,$showdetails,$hidefreetext); + return 1; } } diff --git a/htdocs/core/modules/expensereport/doc/pdf_standard.modules.php b/htdocs/core/modules/expensereport/doc/pdf_standard.modules.php index b8a58d3b517..ec409109d2d 100644 --- a/htdocs/core/modules/expensereport/doc/pdf_standard.modules.php +++ b/htdocs/core/modules/expensereport/doc/pdf_standard.modules.php @@ -1109,6 +1109,7 @@ class pdf_standard extends ModeleExpenseReport $this->error = $this->db->lasterror(); return -1; } + return -1; } // phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore diff --git a/htdocs/core/modules/facture/mod_facture_mars.php b/htdocs/core/modules/facture/mod_facture_mars.php index fb4ba06b9ce..91f60af5ad0 100644 --- a/htdocs/core/modules/facture/mod_facture_mars.php +++ b/htdocs/core/modules/facture/mod_facture_mars.php @@ -158,7 +158,7 @@ class mod_facture_mars extends ModeleNumRefFactures * @param Societe $objsoc Object third party * @param Facture $invoice Object invoice * @param string $mode 'next' for next value or 'last' for last value - * @return string Value if OK, 0 if KO + * @return string|int Value if OK, 0 if KO */ public function getNextValue($objsoc, $invoice, $mode = 'next') { @@ -233,6 +233,7 @@ class mod_facture_mars extends ModeleNumRefFactures return $prefix.$yymm."-".$num; } else { dol_print_error('', 'Bad parameter for getNextValue'); + return -1; } } diff --git a/htdocs/core/modules/mailings/advthirdparties.modules.php b/htdocs/core/modules/mailings/advthirdparties.modules.php index ced14b802a0..111943e99e0 100644 --- a/htdocs/core/modules/mailings/advthirdparties.modules.php +++ b/htdocs/core/modules/mailings/advthirdparties.modules.php @@ -308,5 +308,6 @@ class mailing_advthirdparties extends MailingTargets $contactstatic->fetch($id); return $contactstatic->getNomUrl(0, '', 0, '', -1, 1); } + return ""; } } diff --git a/htdocs/core/modules/supplier_invoice/doc/pdf_canelle.modules.php b/htdocs/core/modules/supplier_invoice/doc/pdf_canelle.modules.php index 982d7a4ba85..3dfb6bfd4d2 100644 --- a/htdocs/core/modules/supplier_invoice/doc/pdf_canelle.modules.php +++ b/htdocs/core/modules/supplier_invoice/doc/pdf_canelle.modules.php @@ -1057,6 +1057,7 @@ class pdf_canelle extends ModelePDFSuppliersInvoices $this->error = $this->db->lasterror(); return -1; } + return -1; } // phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore diff --git a/htdocs/core/modules/supplier_payment/doc/pdf_standard.modules.php b/htdocs/core/modules/supplier_payment/doc/pdf_standard.modules.php index d3b9681a63f..8646ecac0c9 100644 --- a/htdocs/core/modules/supplier_payment/doc/pdf_standard.modules.php +++ b/htdocs/core/modules/supplier_payment/doc/pdf_standard.modules.php @@ -546,6 +546,7 @@ class pdf_standard extends ModelePDFSuppliersPayments // Date $pdf->SetXY($this->page_largeur - $this->marge_droite - 30, $posy); $pdf->MultiCell(150, 4, date("d").' '.$outputlangs->transnoentitiesnoconv(date("F")).' '.date("Y"), 0, 'L', 1); + return $posy; } // phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore diff --git a/htdocs/core/modules/takepos/mod_takepos_ref_simple.php b/htdocs/core/modules/takepos/mod_takepos_ref_simple.php index 31eb9345110..2295209bb82 100644 --- a/htdocs/core/modules/takepos/mod_takepos_ref_simple.php +++ b/htdocs/core/modules/takepos/mod_takepos_ref_simple.php @@ -130,7 +130,7 @@ class mod_takepos_ref_simple extends ModeleNumRefTakepos * @param Societe $objsoc Object third party * @param Facture $invoice Object invoice * @param string $mode 'next' for next value or 'last' for last value - * @return string Next ref value or last ref if $mode is 'last' + * @return string|int Next ref value or last ref if $mode is 'last' */ public function getNextValue($objsoc = null, $invoice = null, $mode = 'next') { @@ -198,6 +198,7 @@ class mod_takepos_ref_simple extends ModeleNumRefTakepos return $this->prefix.$pos_source.'-'.$yymm.'-'.$num; } else { dol_print_error('', 'Bad parameter for getNextValue'); + return -1; } } diff --git a/htdocs/fourn/class/fournisseur.commande.class.php b/htdocs/fourn/class/fournisseur.commande.class.php index 5dc92c9d057..ff1964fbe9f 100644 --- a/htdocs/fourn/class/fournisseur.commande.class.php +++ b/htdocs/fourn/class/fournisseur.commande.class.php @@ -2100,6 +2100,7 @@ class CommandeFournisseur extends CommonOrder return -1; } } + return -1; } diff --git a/htdocs/fourn/class/fournisseur.commande.dispatch.class.php b/htdocs/fourn/class/fournisseur.commande.dispatch.class.php index e4bccaa0980..0b8e70ee6c3 100644 --- a/htdocs/fourn/class/fournisseur.commande.dispatch.class.php +++ b/htdocs/fourn/class/fournisseur.commande.dispatch.class.php @@ -609,6 +609,7 @@ class CommandeFournisseurDispatch extends CommonObjectLine return ''.$langs->trans($this->statuts_short[$status]).' '.img_picto($langs->trans($this->statuts[$status]), 'statut8'); } } + return ""; } From af8f6e32780ceb836e9d144640da4a268d30641d Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 25 Jul 2023 23:31:46 +0200 Subject: [PATCH 26/40] Fix travis --- .travis.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index ce5cba6c8be..a122627d094 100644 --- a/.travis.yml +++ b/.travis.yml @@ -374,8 +374,8 @@ script: - | echo "Upgrading Dolibarr" - # Ensure we catch errors. Set this to +e if you want to go to the end to see log files. - set +e + # Ensure we catch errors with -e. Set this to +e if you want to go to the end to see log files. + set -e cd htdocs/install php upgrade.php 3.5.0 3.6.0 ignoredbversion > $TRAVIS_BUILD_DIR/upgrade350360.log php upgrade2.php 3.5.0 3.6.0 > $TRAVIS_BUILD_DIR/upgrade350360-2.log @@ -460,8 +460,8 @@ script: - | echo "Unit testing" - # Ensure we catch errors. Set this to +e instead of -e if you want to go to the end to see dolibarr.log file. - set +e + # Ensure we catch errors with -e. Set this to +e instead of -e if you want to go to the end to see dolibarr.log file. + set -e phpunit -d memory_limit=-1 -c test/phpunit/phpunittest.xml test/phpunit/AllTests.php phpunitresult=$? echo "Phpunit return code = $phpunitresult" From dbed6e1221acd891f4e3be5fae2f265e6bbc8f1f Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 25 Jul 2023 23:42:32 +0200 Subject: [PATCH 27/40] Fix fontforpdf --- htdocs/langs/es_CU/main.lang | 2 +- htdocs/langs/zh_HK/main.lang | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/langs/es_CU/main.lang b/htdocs/langs/es_CU/main.lang index 7c4f5a84497..b52bef7a2ec 100644 --- a/htdocs/langs/es_CU/main.lang +++ b/htdocs/langs/es_CU/main.lang @@ -1,6 +1,6 @@ # Dolibarr language file - Source file is en_US - main DIRECTION=litros -FONTFORPDF=helvética +FONTFORPDF=helvetica FONTSIZEFORPDF=10 SeparatorDecimal=. SeparatorThousand=, diff --git a/htdocs/langs/zh_HK/main.lang b/htdocs/langs/zh_HK/main.lang index bbb4ed227c4..b72b47c566c 100644 --- a/htdocs/langs/zh_HK/main.lang +++ b/htdocs/langs/zh_HK/main.lang @@ -10,7 +10,7 @@ DIRECTION=ltr # DejaVuSans is for some Eastern languages, some Asian languages and some Arabic languages # freemono is for ru_RU or uk_UA, uz_UZ # freeserif is for Tamil -FONTFORPDF=helvetica +FONTFORPDF=msungstdlight FONTSIZEFORPDF=10 SeparatorDecimal=. SeparatorThousand=, From 3ef192903ba83400df5ef84f965d4202592f0159 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 25 Jul 2023 23:51:24 +0200 Subject: [PATCH 28/40] Trans --- htdocs/langs/en_US/languages.lang | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/langs/en_US/languages.lang b/htdocs/langs/en_US/languages.lang index 1e924d96448..2241b9f18d8 100644 --- a/htdocs/langs/en_US/languages.lang +++ b/htdocs/langs/en_US/languages.lang @@ -123,6 +123,6 @@ Language_ur_PK=Urdu Language_uz_UZ=Uzbek Language_vi_VN=Vietnamese Language_zh_CN=Chinese -Language_zh_TW=Chinese (Traditional) +Language_zh_TW=Chinese (Taiwan) Language_zh_HK=Chinese (Hong Kong) Language_bh_MY=Malay From 8e94ea05048086618989c999410e169e9056a5c0 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 26 Jul 2023 00:01:45 +0200 Subject: [PATCH 29/40] Fix warning --- htdocs/core/db/mysqli.class.php | 2 +- htdocs/core/db/pgsql.class.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/core/db/mysqli.class.php b/htdocs/core/db/mysqli.class.php index a05dbf46e4b..1eef38591b1 100644 --- a/htdocs/core/db/mysqli.class.php +++ b/htdocs/core/db/mysqli.class.php @@ -336,7 +336,7 @@ class DoliDBMysqli extends DoliDB $this->lasterror = $this->error(); $this->lasterrno = $this->errno(); - if ($conf->global->SYSLOG_LEVEL < LOG_DEBUG) { + if (empty($conf->global->SYSLOG_LEVEL) || $conf->global->SYSLOG_LEVEL < LOG_DEBUG) { dol_syslog(get_class($this)."::query SQL Error query: ".$query, LOG_ERR); // Log of request was not yet done previously } dol_syslog(get_class($this)."::query SQL Error message: ".$this->lasterrno." ".$this->lasterror, LOG_ERR); diff --git a/htdocs/core/db/pgsql.class.php b/htdocs/core/db/pgsql.class.php index f4df72ceb26..e672cc833a3 100644 --- a/htdocs/core/db/pgsql.class.php +++ b/htdocs/core/db/pgsql.class.php @@ -559,7 +559,7 @@ class DoliDBPgsql extends DoliDB $this->lasterror = $this->error(); $this->lasterrno = $this->errno(); - if ($conf->global->SYSLOG_LEVEL < LOG_DEBUG) { + if (empty($conf->global->SYSLOG_LEVEL) || $conf->global->SYSLOG_LEVEL < LOG_DEBUG) { dol_syslog(get_class($this)."::query SQL Error query: ".$query, LOG_ERR); // Log of request was not yet done previously } dol_syslog(get_class($this)."::query SQL Error message: ".$this->lasterror." (".$this->lasterrno.")", LOG_ERR); From a536fbbc04b42f34bfac4ca3227e4ad21f4615ea Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 26 Jul 2023 00:15:59 +0200 Subject: [PATCH 30/40] Fix travis --- .travis.yml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index a122627d094..33403c11df2 100644 --- a/.travis.yml +++ b/.travis.yml @@ -129,7 +129,15 @@ install: - | echo "Update Composer version and Install tools - PHP Unit, Parallel Lint, PHP CodeSniffer, PHP Vardump check - for $TRAVIS_PHP_VERSION" echo "(composer version 2.5 is bugged and generate phpunit error Exception: Serialization of 'Closure' is not allowed)" - if [ "$TRAVIS_PHP_VERSION" = '7.0' ] || [ "$TRAVIS_PHP_VERSION" = '7.2' ]; then + if [ "$TRAVIS_PHP_VERSION" = '7.0' ]; then + sudo composer self-update 2.2.18 + composer -n require phpunit/phpunit ^6.0 \ + php-parallel-lint/php-parallel-lint ^1 \ + php-parallel-lint/php-console-highlighter ^0 \ + php-parallel-lint/php-var-dump-check ~0.4 \ + squizlabs/php_codesniffer ^3 + fi + if [ "$TRAVIS_PHP_VERSION" = '7.1' ] || [ "$TRAVIS_PHP_VERSION" = '7.2' ]; then sudo composer self-update 2.2.18 composer -n require phpunit/phpunit ^7.5 \ php-parallel-lint/php-parallel-lint ^1 \ From fd49ee919772011644e92325d8d8efd5941340d3 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 26 Jul 2023 00:56:08 +0200 Subject: [PATCH 31/40] Test travis --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 33403c11df2..d51887f5457 100644 --- a/.travis.yml +++ b/.travis.yml @@ -21,7 +21,7 @@ services: addons: - mariadb: '10.4' + mariadb: '10.5' env: From 5b298ebf4a13c6834ff5db23565409f78304a773 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 26 Jul 2023 01:12:57 +0200 Subject: [PATCH 32/40] Test travis --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index d51887f5457..6a2358dbfd4 100644 --- a/.travis.yml +++ b/.travis.yml @@ -383,7 +383,7 @@ script: - | echo "Upgrading Dolibarr" # Ensure we catch errors with -e. Set this to +e if you want to go to the end to see log files. - set -e + set +e cd htdocs/install php upgrade.php 3.5.0 3.6.0 ignoredbversion > $TRAVIS_BUILD_DIR/upgrade350360.log php upgrade2.php 3.5.0 3.6.0 > $TRAVIS_BUILD_DIR/upgrade350360-2.log From 6d91f0a063829fecf5cea12cf6f25ded1c740797 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 26 Jul 2023 01:13:31 +0200 Subject: [PATCH 33/40] Test travis --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 5d4e026f10a..f5bd5f010f9 100644 --- a/.travis.yml +++ b/.travis.yml @@ -21,7 +21,7 @@ services: addons: - mariadb: '10.4' + mariadb: '10.5' env: From 981f803ad01f0d6e3d97571f4cf964db0c07eacf Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 26 Jul 2023 01:26:02 +0200 Subject: [PATCH 34/40] Doc --- .travis.yml | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index 6a2358dbfd4..eac04b41ab4 100644 --- a/.travis.yml +++ b/.travis.yml @@ -383,6 +383,8 @@ script: - | echo "Upgrading Dolibarr" # Ensure we catch errors with -e. Set this to +e if you want to go to the end to see log files. + # Note: We keep +e because with pgsql, one of upgrade process fails even if migration seems ok, so + # I disable stop on error to be able to continue. set +e cd htdocs/install php upgrade.php 3.5.0 3.6.0 ignoredbversion > $TRAVIS_BUILD_DIR/upgrade350360.log @@ -470,11 +472,13 @@ script: echo "Unit testing" # Ensure we catch errors with -e. Set this to +e instead of -e if you want to go to the end to see dolibarr.log file. set -e - phpunit -d memory_limit=-1 -c test/phpunit/phpunittest.xml test/phpunit/AllTests.php - phpunitresult=$? - echo "Phpunit return code = $phpunitresult" + if [ "$TRAVIS_PHP_VERSION" != '7.0' ]; then + phpunit -d memory_limit=-1 -c test/phpunit/phpunittest.xml test/phpunit/AllTests.php + phpunitresult=$? + echo "Phpunit return code = $phpunitresult" + fi set +e - + after_script: - | echo "After script - Output last lines of dolibarr.log" From ff3e871baed7f68c7e72f72eeeb785d8de0622f7 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 26 Jul 2023 01:34:48 +0200 Subject: [PATCH 35/40] Fix trans --- htdocs/langs/es_CU/main.lang | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/langs/es_CU/main.lang b/htdocs/langs/es_CU/main.lang index b52bef7a2ec..3b7cab70e90 100644 --- a/htdocs/langs/es_CU/main.lang +++ b/htdocs/langs/es_CU/main.lang @@ -1,5 +1,5 @@ # Dolibarr language file - Source file is en_US - main -DIRECTION=litros +DIRECTION=ltr FONTFORPDF=helvetica FONTSIZEFORPDF=10 SeparatorDecimal=. From d8fba18a9a4ff532cfd6631f77b50def713bac6f Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 26 Jul 2023 01:49:05 +0200 Subject: [PATCH 36/40] Doc --- htdocs/install/check.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/htdocs/install/check.php b/htdocs/install/check.php index ec78b5d38cd..d743defe9bd 100644 --- a/htdocs/install/check.php +++ b/htdocs/install/check.php @@ -154,7 +154,6 @@ if (!function_exists("imagecreate")) { print 'Ok '.$langs->trans("PHPSupport", "GD")."
\n"; } - // Check if Curl is supported if (!function_exists("curl_init")) { $langs->load("errors"); @@ -189,7 +188,7 @@ if (!function_exists("utf8_encode")) { print 'Ok '.$langs->trans("PHPSupport", "UTF8")."
\n"; } -// Check if intl methods are supported +// Check if intl methods are supported if install is not from DoliWamp. TODO Why ? if (empty($_SERVER["SERVER_ADMIN"]) || $_SERVER["SERVER_ADMIN"] != 'doliwamp@localhost') { if (!function_exists("locale_get_primary_language") || !function_exists("locale_get_region")) { $langs->load("errors"); From bc4ef4e1b6b984a4163ba8ad049d5d1174911480 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 26 Jul 2023 01:54:16 +0200 Subject: [PATCH 37/40] Fix phpunit --- htdocs/website/websiteaccount_card.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/website/websiteaccount_card.php b/htdocs/website/websiteaccount_card.php index 9c48a3051fc..e03e38815b8 100644 --- a/htdocs/website/websiteaccount_card.php +++ b/htdocs/website/websiteaccount_card.php @@ -66,11 +66,11 @@ if (empty($action) && empty($id) && empty($ref)) { // Load object include DOL_DOCUMENT_ROOT.'/core/actions_fetchobject.inc.php'; // Must be include, not include_once. -// Security check - Protection if external user +// Security check //if ($user->socid > 0) accessforbidden(); //if ($user->socid > 0) $socid = $user->socid; //$result = restrictedArea($user, 'website', $id); -if (empty($user->hasRight('website', 'read'))) { +if (!$user->hasRight('website', 'read')) { accessforbidden('NotAllowed'); } From 74acbcf72ddd9e5c6af5b2de931ff77fcc83c588 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 26 Jul 2023 02:46:43 +0200 Subject: [PATCH 38/40] Fix phpcs --- htdocs/mrp/mo_production.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/mrp/mo_production.php b/htdocs/mrp/mo_production.php index bcf05b0c02d..8bb358c0729 100644 --- a/htdocs/mrp/mo_production.php +++ b/htdocs/mrp/mo_production.php @@ -544,11 +544,11 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea $morehtmlref = '
'; - /* + /* // Ref bis $morehtmlref.=$form->editfieldkey("RefBis", 'ref_client', $object->ref_client, $object, $user->rights->mrp->creer, 'string', '', 0, 1); $morehtmlref.=$form->editfieldval("RefBis", 'ref_client', $object->ref_client, $object, $user->rights->mrp->creer, 'string', '', null, null, '', 1); - */ + */ // Thirdparty if (is_object($object->thirdparty)) { From 57adce857c0c39be7678f4a3e3b186a6a9dfb37f Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 26 Jul 2023 02:47:49 +0200 Subject: [PATCH 39/40] Fix phpcs --- htdocs/core/modules/modECM.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/modules/modECM.class.php b/htdocs/core/modules/modECM.class.php index f9b0238a8c4..b99e2c5b00b 100644 --- a/htdocs/core/modules/modECM.class.php +++ b/htdocs/core/modules/modECM.class.php @@ -16,7 +16,7 @@ * along with this program. If not, see . */ -/** +/** * \defgroup ecm Module ECM * \brief Module ECM (Electronic Content Management) to manage Documents * From 4f14f52410cc5979b528fb591b281a3f6223fe2c Mon Sep 17 00:00:00 2001 From: Pascal Hubrecht Date: Wed, 26 Jul 2023 03:22:33 +0200 Subject: [PATCH 40/40] FIX unexistant POST variables (#25309) The $_POST['price_ht_devise'] and $_POST['price_ttc_devise'] don't exist. The correct variables are multicurrency_price_ht and multicurrency_price_ttc --- htdocs/fourn/facture/card.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/htdocs/fourn/facture/card.php b/htdocs/fourn/facture/card.php index 3e65cd55e99..32bb4e752fd 100644 --- a/htdocs/fourn/facture/card.php +++ b/htdocs/fourn/facture/card.php @@ -1618,11 +1618,11 @@ if (empty($reshook)) { $localtax2_tx = get_localtax($tva_tx, 2, $mysoc, $object->thirdparty, $tva_npr); $type = $productsupplier->type; - if (GETPOST('price_ht') != '' || GETPOST('price_ht_devise') != '') { + if (GETPOST('price_ht') != '' || GETPOST('multicurrency_price_ht') != '') { $price_base_type = 'HT'; $pu = price2num($price_ht, 'MU'); $pu_devise = price2num($price_ht_devise, 'CU'); - } elseif (GETPOST('price_ttc') != '' || GETPOST('price_ttc_devise') != '') { + } elseif (GETPOST('price_ttc') != '' || GETPOST('multicurrency_price_ttc') != '') { $price_base_type = 'TTC'; $pu = price2num($price_ttc, 'MU'); $pu_devise = price2num($price_ttc_devise, 'CU'); @@ -1706,7 +1706,7 @@ if (empty($reshook)) { $localtax1_tx = get_localtax($tva_tx, 1, $mysoc, $object->thirdparty); $localtax2_tx = get_localtax($tva_tx, 2, $mysoc, $object->thirdparty); - if (GETPOST('price_ht') != '' || GETPOST('price_ht_devise') != '') { + if (GETPOST('price_ht') != '' || GETPOST('multicurrency_price_ht') != '') { $pu_ht = price2num($price_ht, 'MU'); // $pu_ht must be rounded according to settings } else { $pu_ttc = price2num(GETPOST('price_ttc'), 'MU');