From 910daa24aa0c19d085ccd87888c17c033c71f720 Mon Sep 17 00:00:00 2001 From: Regis Houssin Date: Mon, 9 Sep 2024 04:26:22 +0200 Subject: [PATCH 1/4] FIX wrong subprice if price base type is TTC (#30887) --- htdocs/commande/class/commande.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/commande/class/commande.class.php b/htdocs/commande/class/commande.class.php index e6894450453..b0e04ba6af2 100644 --- a/htdocs/commande/class/commande.class.php +++ b/htdocs/commande/class/commande.class.php @@ -3241,7 +3241,7 @@ class Commande extends CommonOrder $this->line->localtax1_type = empty($localtaxes_type[0]) ? '' : $localtaxes_type[0]; $this->line->localtax2_type = empty($localtaxes_type[2]) ? '' : $localtaxes_type[2]; $this->line->remise_percent = $remise_percent; - $this->line->subprice = $subprice; + $this->line->subprice = $pu_ht; $this->line->info_bits = $info_bits; $this->line->special_code = $special_code; $this->line->total_ht = $total_ht; From b8ea77094043401978fa7e3cae5e87ac97fd011d Mon Sep 17 00:00:00 2001 From: Mathieu Moulin Date: Mon, 9 Sep 2024 04:29:23 +0200 Subject: [PATCH 2/4] Fix : update line order with TTC price leads to bad unit price (#30885) * Fix : update line order with TTC price leads to bad unit price * Fix compilation error From d29ebee2ac0cb0b77ecaae4fb1fd3576f14edc4f Mon Sep 17 00:00:00 2001 From: kkhelifa-opendsi Date: Mon, 9 Sep 2024 04:35:13 +0200 Subject: [PATCH 3/4] FIX avoid from re-initializing array result on nested hook getEntity (#30626) --- htdocs/core/class/hookmanager.class.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/htdocs/core/class/hookmanager.class.php b/htdocs/core/class/hookmanager.class.php index cb89f123a9f..1cb35d40b85 100644 --- a/htdocs/core/class/hookmanager.class.php +++ b/htdocs/core/class/hookmanager.class.php @@ -208,6 +208,7 @@ class HookManager // Init return properties $localResPrint = ''; + $localResArray = array(); $this->resArray = array(); $this->resNbOfHooks = 0; @@ -263,9 +264,9 @@ class HookManager if (isset($actionclassinstance->results) && is_array($actionclassinstance->results)) { if ($resactiontmp > 0) { - $this->resArray = $actionclassinstance->results; + $localResArray = $actionclassinstance->results; } else { - $this->resArray = array_merge($this->resArray, $actionclassinstance->results); + $localResArray = array_merge($localResArray, $actionclassinstance->results); } } if (!empty($actionclassinstance->resprints)) { @@ -291,7 +292,7 @@ class HookManager $resaction += $resactiontmp; if (!empty($actionclassinstance->results) && is_array($actionclassinstance->results)) { - $this->resArray = array_merge($this->resArray, $actionclassinstance->results); + $localResArray = array_merge($localResArray, $actionclassinstance->results); } if (!empty($actionclassinstance->resprints)) { $localResPrint .= $actionclassinstance->resprints; @@ -321,6 +322,7 @@ class HookManager } $this->resPrint = $localResPrint; + $this->resArray = $localResArray; return ($error ? -1 : $resaction); } From 8efa4239b575a25e552dc4c7a1eb2beacf997c7e Mon Sep 17 00:00:00 2001 From: atm-thomasb Date: Tue, 10 Sep 2024 00:59:08 +0200 Subject: [PATCH 4/4] FIX: fixed search filter for projects resetting when set to empty (#30902) --- htdocs/projet/list.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/projet/list.php b/htdocs/projet/list.php index 80de8873b6f..fb487f8c8d0 100644 --- a/htdocs/projet/list.php +++ b/htdocs/projet/list.php @@ -183,7 +183,7 @@ if (isModEnabled('categorie')) { $search_category_array = GETPOST("search_category_".Categorie::TYPE_PROJECT."_list", "array"); } -if (GETPOSTISARRAY('search_status')) { +if (GETPOSTISARRAY('search_status') || GETPOST('search_status_multiselect')) { $search_status = join(',', GETPOST('search_status', 'array:intcomma')); } else { $search_status = (GETPOST('search_status', 'intcomma') != '' ? GETPOST('search_status', 'intcomma') : '0,1');