From e71631abe0b64037fa3e749186aa326c53319f4e Mon Sep 17 00:00:00 2001 From: thomas-Ngr Date: Thu, 3 Oct 2024 19:33:33 +0200 Subject: [PATCH 1/3] fix : missing update for extrafields on holidays (#31256) --- htdocs/holiday/class/holiday.class.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/htdocs/holiday/class/holiday.class.php b/htdocs/holiday/class/holiday.class.php index 6271f1d43e8a5..ab1efaa7f9047 100644 --- a/htdocs/holiday/class/holiday.class.php +++ b/htdocs/holiday/class/holiday.class.php @@ -987,6 +987,13 @@ public function update($user = null, $notrigger = 0) $error++; $this->errors[] = "Error ".$this->db->lasterror(); } + if (!$error) { + $result = $this->insertExtraFields(); + if ($result < 0) { + $error++; + } + } + if (!$error) { if (!$notrigger) { // Call trigger From 336d3ad8e584bdbbf35f7f60c8f452783de2e692 Mon Sep 17 00:00:00 2001 From: thomas-Ngr Date: Thu, 3 Oct 2024 21:03:13 +0200 Subject: [PATCH 2/3] finish fix (#31203) --- htdocs/product/stock/replenish.php | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/htdocs/product/stock/replenish.php b/htdocs/product/stock/replenish.php index a1a99523d919c..29b02cb0796ea 100644 --- a/htdocs/product/stock/replenish.php +++ b/htdocs/product/stock/replenish.php @@ -194,17 +194,20 @@ // TODO Get desc in language of thirdparty } + $line->tva_tx = $productsupplier->vatrate_supplier; + $tva = $line->tva_tx / 100; + // If we use multicurrency if (isModEnabled('multicurrency') && !empty($productsupplier->fourn_multicurrency_code) && $productsupplier->fourn_multicurrency_code != $conf->currency) { - $line->multicurrency_code = $productsupplier->fourn_multicurrency_code; - $line->fk_multicurrency = $productsupplier->fourn_multicurrency_id; - $line->multicurrency_subprice = $productsupplier->fourn_multicurrency_unitprice; + $line->multicurrency_code = $productsupplier->fourn_multicurrency_code; + $line->fk_multicurrency = $productsupplier->fourn_multicurrency_id; + $line->multicurrency_subprice = $productsupplier->fourn_multicurrency_unitprice; + $line->multicurrency_total_ht = $line->multicurrency_subprice * $qty; + $line->multicurrency_total_tva = $line->multicurrency_total_ht * $tva; + $line->multicurrency_total_ttc = $line->multicurrency_total_ht + $line->multicurrency_total_tva; } - - $line->tva_tx = $productsupplier->vatrate_supplier; $line->subprice = $productsupplier->fourn_pu; $line->total_ht = $productsupplier->fourn_pu * $qty; - $tva = $line->tva_tx / 100; $line->total_tva = $line->total_ht * $tva; $line->total_ttc = $line->total_ht + $line->total_tva; $line->remise_percent = $productsupplier->remise_percent; From 70a453a5c2a2ae7dfae7e11b6780947f086bf2d2 Mon Sep 17 00:00:00 2001 From: thomas-Ngr Date: Mon, 14 Oct 2024 11:57:55 +0200 Subject: [PATCH 3/3] FIX: substitutions THIRDPARTY_XXX are not available for actioncomm reminders (#31385) --- htdocs/comm/action/class/actioncomm.class.php | 1 + 1 file changed, 1 insertion(+) diff --git a/htdocs/comm/action/class/actioncomm.class.php b/htdocs/comm/action/class/actioncomm.class.php index f5e1fe40b1fdc..9b006c83ab66d 100644 --- a/htdocs/comm/action/class/actioncomm.class.php +++ b/htdocs/comm/action/class/actioncomm.class.php @@ -2341,6 +2341,7 @@ public function sendEmailsReminder() // Load event $res = $this->fetch($actionCommReminder->fk_actioncomm); + if ($res > 0) $res = $this->fetch_thirdparty(); if ($res > 0) { // PREPARE EMAIL $errormesg = '';