From 797b9c90548f27755cb5c68c9acb7cd9f780eeb8 Mon Sep 17 00:00:00 2001 From: Florian HENRY Date: Tue, 3 Jan 2023 11:42:39 +0100 Subject: [PATCH 1/3] dfelete cem data on product deletion --- htdocs/product/class/product.class.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/htdocs/product/class/product.class.php b/htdocs/product/class/product.class.php index 0900f11ed29..e133e1a42f4 100644 --- a/htdocs/product/class/product.class.php +++ b/htdocs/product/class/product.class.php @@ -1408,6 +1408,14 @@ class Product extends CommonObject } } + // Delete record into ECM index and physically + if (!$error) { + $res = $this->deleteEcmFiles(0); // Deleting files physically is done later with the dol_delete_dir_recursive + if (!$res) { + $error++; + } + } + if (!$error) { // We remove directory $ref = dol_sanitizeFileName($this->ref); From 70f9e7881bb4b26e09c84edc0ce359ba6551e6c9 Mon Sep 17 00:00:00 2001 From: ptibogxiv Date: Tue, 3 Jan 2023 19:46:05 +0100 Subject: [PATCH 2/3] Fix error when no category selected empty pages when searching with no category of producted selected --- htdocs/compta/stats/cabyprodserv.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/compta/stats/cabyprodserv.php b/htdocs/compta/stats/cabyprodserv.php index b8f6327ccd5..ca8b35e739d 100644 --- a/htdocs/compta/stats/cabyprodserv.php +++ b/htdocs/compta/stats/cabyprodserv.php @@ -323,7 +323,7 @@ if ($modecompta == 'CREANCES-DETTES') { } if ($selected_cat === -2) { // Without any category $sql .= " AND cp.fk_product is null"; - } elseif ($selected_cat) { // Into a specific category + } elseif ($selected_cat > 0) { // Into a specific category if ($subcat) { $TListOfCats = $categorie->get_full_arbo('product', $selected_cat, 1); From 71970851262bad9bb8f4f09cbdc2f3874d2b71d1 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 4 Jan 2023 15:16:40 +0100 Subject: [PATCH 3/3] FIX saving of numbering module for jobs --- htdocs/core/modules/hrm/mod_evaluation_advanced.php | 2 +- htdocs/recruitment/admin/setup.php | 8 ++++---- .../recruitment/mod_recruitmentjobposition_advanced.php | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/htdocs/core/modules/hrm/mod_evaluation_advanced.php b/htdocs/core/modules/hrm/mod_evaluation_advanced.php index 0468c9ebb30..5a74d34e236 100644 --- a/htdocs/core/modules/hrm/mod_evaluation_advanced.php +++ b/htdocs/core/modules/hrm/mod_evaluation_advanced.php @@ -68,7 +68,7 @@ class mod_evaluation_advanced extends ModeleNumRefEvaluation $texte .= '
'; $texte .= ''; $texte .= ''; - $texte .= ''; + $texte .= ''; $texte .= ''; $tooltip = $langs->trans("GenericMaskCodes", $langs->transnoentities("Evaluation"), $langs->transnoentities("Evaluation")); diff --git a/htdocs/recruitment/admin/setup.php b/htdocs/recruitment/admin/setup.php index 30434b207fc..ada2be5448c 100644 --- a/htdocs/recruitment/admin/setup.php +++ b/htdocs/recruitment/admin/setup.php @@ -93,11 +93,11 @@ if ((float) DOL_VERSION >= 6) { } if ($action == 'updateMask') { - $maskconstorder = GETPOST('maskconstorder', 'alpha'); - $maskorder = GETPOST('maskorder', 'alpha'); + $maskconst = GETPOST('maskconst', 'alpha'); + $maskvalue = GETPOST('maskRecruitmentJobPosition', 'alpha'); - if ($maskconstorder) { - $res = dolibarr_set_const($db, $maskconstorder, $maskorder, 'chaine', 0, '', $conf->entity); + if ($maskconst) { + $res = dolibarr_set_const($db, $maskconst, $maskvalue, 'chaine', 0, '', $conf->entity); } if (!($res > 0)) { diff --git a/htdocs/recruitment/core/modules/recruitment/mod_recruitmentjobposition_advanced.php b/htdocs/recruitment/core/modules/recruitment/mod_recruitmentjobposition_advanced.php index fcc476abacf..af418f927fd 100644 --- a/htdocs/recruitment/core/modules/recruitment/mod_recruitmentjobposition_advanced.php +++ b/htdocs/recruitment/core/modules/recruitment/mod_recruitmentjobposition_advanced.php @@ -68,8 +68,8 @@ class mod_recruitmentjobposition_advanced extends ModeleNumRefRecruitmentJobPosi $texte .= ''; $texte .= ''; $texte .= ''; - $texte .= ''; - $texte .= '
'; + $texte .= ''; + $texte .= '
'; $tooltip = $langs->trans("GenericMaskCodes", $langs->transnoentities("RecruitmentJobPosition"), $langs->transnoentities("RecruitmentJobPosition")); $tooltip .= $langs->trans("GenericMaskCodes2");