From 377c73036381d27b3197a0c5615724fe37d59397 Mon Sep 17 00:00:00 2001 From: Pierre Payet Date: Wed, 14 Apr 2021 21:27:53 +0200 Subject: [PATCH 1/5] add missing group by hook in fichinter list --- htdocs/fichinter/list.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/htdocs/fichinter/list.php b/htdocs/fichinter/list.php index d054f5e5bcc..b142613f051 100644 --- a/htdocs/fichinter/list.php +++ b/htdocs/fichinter/list.php @@ -259,6 +259,10 @@ include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_sql.tpl.php'; $parameters = array(); $reshook = $hookmanager->executeHooks('printFieldListWhere', $parameters); // Note that $action and $object may have been modified by hook $sql .= $hookmanager->resPrint; +// Add GroupBy from hooks +$parameters = array('all' => $all, 'fieldstosearchall' => $fieldstosearchall); +$reshook = $hookmanager->executeHooks('printFieldListGroupBy', $parameters, $object); // Note that $action and $object may have been modified by hook +$sql .= $hookmanager->resPrint; $sql .= $db->order($sortfield, $sortorder); // Count total nb of records From 38f54d058267d9b69f31c8ec2fd814388c3930c9 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 16 Apr 2021 10:26:35 +0200 Subject: [PATCH 2/5] FIX Missing extrafields into export of agenda record --- htdocs/core/extrafieldsinexport.inc.php | 4 ++++ htdocs/core/modules/modAgenda.class.php | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/htdocs/core/extrafieldsinexport.inc.php b/htdocs/core/extrafieldsinexport.inc.php index cef5f74d172..8b7cf3c81cc 100644 --- a/htdocs/core/extrafieldsinexport.inc.php +++ b/htdocs/core/extrafieldsinexport.inc.php @@ -1,5 +1,9 @@ 'project', ); + $keyforselect = 'actioncomm'; $keyforelement = 'action'; $keyforaliasextra = 'extra'; + include DOL_DOCUMENT_ROOT.'/core/extrafieldsinexport.inc.php'; + $this->export_sql_start[$r] = 'SELECT DISTINCT '; $this->export_sql_end[$r] = ' FROM '.MAIN_DB_PREFIX.'actioncomm as ac'; + $this->export_sql_end[$r] .= ' LEFT JOIN '.MAIN_DB_PREFIX.'actioncomm_extrafields as extra ON ac.id = extra.fk_object'; $this->export_sql_end[$r] .= ' LEFT JOIN '.MAIN_DB_PREFIX.'c_actioncomm as cac on ac.fk_action = cac.id'; if (!empty($user) && empty($user->rights->agenda->allactions->read)) $this->export_sql_end[$r] .= ' LEFT JOIN '.MAIN_DB_PREFIX.'actioncomm_resources acr on ac.id = acr.fk_actioncomm'; $this->export_sql_end[$r] .= ' LEFT JOIN '.MAIN_DB_PREFIX.'socpeople as sp on ac.fk_contact = sp.rowid'; From 0cd567f256cf5bb98610457fd014556e29522d02 Mon Sep 17 00:00:00 2001 From: Florian HENRY Date: Fri, 16 Apr 2021 10:37:42 +0200 Subject: [PATCH 3/5] fix double test --- htdocs/core/modules/modAgenda.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/modules/modAgenda.class.php b/htdocs/core/modules/modAgenda.class.php index 559260a77c2..d3a78d01d90 100644 --- a/htdocs/core/modules/modAgenda.class.php +++ b/htdocs/core/modules/modAgenda.class.php @@ -413,7 +413,7 @@ class modAgenda extends DolibarrModules 'langs' => 'agenda', 'position' => 170, 'perms' => '$user->rights->agenda->allactions->read', - 'enabled' => '$conf->categorie->enabled&&$conf->categorie->enabled', + 'enabled' => '$conf->categorie->enabled', 'target' => '', 'user' => 2 ); From af9c2384ef3832e837fefffcbedad8833df6e254 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 16 Apr 2021 19:14:01 +0200 Subject: [PATCH 4/5] Add warning --- htdocs/comm/mailing/cibles.php | 1 + 1 file changed, 1 insertion(+) diff --git a/htdocs/comm/mailing/cibles.php b/htdocs/comm/mailing/cibles.php index bcf1e9c1e3b..fe3f4a76d96 100644 --- a/htdocs/comm/mailing/cibles.php +++ b/htdocs/comm/mailing/cibles.php @@ -689,6 +689,7 @@ if ($object->fetch($id) >= 0) // Search Icon print ''; + print ''; if ($obj->statut == 0) // Not sent yet { if ($user->rights->mailing->creer && $allowaddtarget) { From 74345c4f2156175434a2447e3966c86ac8b553fe Mon Sep 17 00:00:00 2001 From: atm-greg Date: Mon, 19 Apr 2021 16:03:22 +0200 Subject: [PATCH 5/5] fix warehouse label field edition --- htdocs/product/stock/card.php | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/htdocs/product/stock/card.php b/htdocs/product/stock/card.php index 6279b17d21a..1f53d3491fa 100644 --- a/htdocs/product/stock/card.php +++ b/htdocs/product/stock/card.php @@ -98,6 +98,7 @@ if (empty($reshook)) $object->ref = GETPOST("ref"); $object->fk_parent = GETPOST("fk_parent"); $object->libelle = GETPOST("libelle"); + $object->label = GETPOST("libelle"); $object->description = GETPOST("desc"); $object->statut = GETPOST("statut"); $object->lieu = GETPOST("lieu"); @@ -105,8 +106,8 @@ if (empty($reshook)) $object->zip = GETPOST("zipcode"); $object->town = GETPOST("town"); $object->country_id = GETPOST("country_id"); - $object->phone = GETPOST("phone"); - $object->fax = GETPOST("fax"); + $object->phone = GETPOST("phone"); + $object->fax = GETPOST("fax"); if (!empty($object->libelle)) { @@ -168,6 +169,7 @@ if (empty($reshook)) if ($object->fetch($id)) { $object->libelle = GETPOST("libelle"); + $object->label = GETPOST("libelle"); $object->fk_parent = GETPOST("fk_parent"); $object->description = GETPOST("desc"); $object->statut = GETPOST("statut"); @@ -176,8 +178,8 @@ if (empty($reshook)) $object->zip = GETPOST("zipcode"); $object->town = GETPOST("town"); $object->country_id = GETPOST("country_id"); - $object->phone = GETPOST("phone"); - $object->fax = GETPOST("fax"); + $object->phone = GETPOST("phone"); + $object->fax = GETPOST("fax"); // Fill array 'array_options' with data from add form $ret = $extrafields->setOptionalsFromPost(null, $object);