From 06e550cb19be9f358151425716463a7b4f00dd3f Mon Sep 17 00:00:00 2001 From: lmarcouiller Date: Fri, 30 Apr 2021 12:32:53 +0200 Subject: [PATCH 1/2] Fix : Error on knowledgemanagement_list error $sql extrafields --- htdocs/knowledgemanagement/knowledgerecord_list.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/knowledgemanagement/knowledgerecord_list.php b/htdocs/knowledgemanagement/knowledgerecord_list.php index fdc05ac5137..931d94d18bf 100644 --- a/htdocs/knowledgemanagement/knowledgerecord_list.php +++ b/htdocs/knowledgemanagement/knowledgerecord_list.php @@ -262,7 +262,7 @@ $sql .= $object->getFieldList('t'); // Add fields from extrafields if (!empty($extrafields->attributes[$object->table_element]['label'])) { foreach ($extrafields->attributes[$object->table_element]['label'] as $key => $val) { - $sql .= ($extrafields->attributes[$object->table_element]['type'][$key] != 'separate' ? "ef.".$key.' as options_'.$key.', ' : ''); + $sql .= ($extrafields->attributes[$object->table_element]['type'][$key] != 'separate' ? ",ef.".$key.' as options_'.$key.', ' : ''); } } // Add fields from hooks From ab89fe73c25f9c2e785660ef12c350dc43972794 Mon Sep 17 00:00:00 2001 From: lvessiller Date: Fri, 30 Apr 2021 16:08:46 +0200 Subject: [PATCH 2/2] NEW rise code tries in digeteria customer and supplier accountant code --- htdocs/core/modules/societe/mod_codecompta_digitaria.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/htdocs/core/modules/societe/mod_codecompta_digitaria.php b/htdocs/core/modules/societe/mod_codecompta_digitaria.php index 363d3984516..56c5b8e8885 100644 --- a/htdocs/core/modules/societe/mod_codecompta_digitaria.php +++ b/htdocs/core/modules/societe/mod_codecompta_digitaria.php @@ -207,7 +207,7 @@ class mod_codecompta_digitaria extends ModeleAccountancyCode if (!isset($conf->global->COMPANY_DIGITARIA_UNIQUE_CODE) || !empty($conf->global->COMPANY_DIGITARIA_UNIQUE_CODE)) { $disponibility = $this->checkIfAccountancyCodeIsAlreadyUsed($db, $this->code, $type); - while ($disponibility <> 0 && $i < 100) { + while ($disponibility <> 0 && $i < 1000) { $widthsupplier = $this->supplieraccountancycodecharacternumber; $widthcustomer = $this->customeraccountancycodecharacternumber; @@ -217,6 +217,9 @@ class mod_codecompta_digitaria extends ModeleAccountancyCode if ($i >= 10 && $i <= 99) { $a = 2; } + if ($i >= 100 && $i <= 999) { + $a = 3; + } if ($type == 'supplier') { $this->code = $prefix.strtoupper(substr($codetouse, 0, $widthsupplier - $a)).$i;