From bbbba45fc1d87c3c438226e2c22e814c8d280b7b Mon Sep 17 00:00:00 2001 From: VESSILLER Date: Wed, 5 Feb 2025 11:19:36 +0100 Subject: [PATCH 01/10] FIX wrong message on update shipment --- htdocs/expedition/dispatch.php | 2 +- htdocs/langs/en_US/sendings.lang | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/htdocs/expedition/dispatch.php b/htdocs/expedition/dispatch.php index bf7b23b21d3..fd9f2f7f1b9 100644 --- a/htdocs/expedition/dispatch.php +++ b/htdocs/expedition/dispatch.php @@ -342,7 +342,7 @@ if ($action == 'updatelines' && $usercancreate) { setEventMessages($error, $errors, 'errors'); } else { $db->commit(); - setEventMessages($langs->trans("ReceptionUpdated"), null); + setEventMessages($langs->trans("ShipmentUpdated"), null); header("Location: ".DOL_URL_ROOT.'/expedition/dispatch.php?id='.$object->id); exit; diff --git a/htdocs/langs/en_US/sendings.lang b/htdocs/langs/en_US/sendings.lang index b3fc779dd2f..87975084a50 100644 --- a/htdocs/langs/en_US/sendings.lang +++ b/htdocs/langs/en_US/sendings.lang @@ -63,6 +63,7 @@ NoProductToShipFoundIntoStock=No product to ship found in warehouse %s. C WeightVolShort=Weight/Vol. ValidateOrderFirstBeforeShipment=You must first validate the order before being able to make shipments. NoLineGoOnTabToAddSome=No line, go on tab "%s" to add +ShipmentUpdated=Shipment successfully updated # Sending methods # ModelDocument From 8cbdc82dc0676ba30978123d3171becff019ec46 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Wed, 5 Feb 2025 12:07:54 +0100 Subject: [PATCH 02/10] fix CI --- htdocs/core/actions_massactions.inc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/actions_massactions.inc.php b/htdocs/core/actions_massactions.inc.php index a2fd416be65..94e39d68610 100644 --- a/htdocs/core/actions_massactions.inc.php +++ b/htdocs/core/actions_massactions.inc.php @@ -1295,7 +1295,7 @@ if (!$error && ($action == 'updateprice' && $confirm == 'yes') && $permissiontoa } } elseif (getDolGlobalString('PRODUIT_MULTIPRICES')) { $maxlevel = getDolGlobalInt('PRODUIT_MULTIPRICES_LIMIT'); - for ($level = 1; $level <= $malevel; $level++) { + for ($level = 1; $level <= $maxlevel; $level++) { if ($object->price_base_type == 'TTC') { $newprice = $object->multiprices_ttc[$level] * (100 + $pricepercentage) / 100; $minprice = $object->multiprices_min_ttc[$level]; From 38820af10f6b8b4a2540a1a7ff1de9a22ccddc7a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Wed, 5 Feb 2025 12:29:19 +0100 Subject: [PATCH 03/10] Update html.formticket.class.php --- htdocs/core/class/html.formticket.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/class/html.formticket.class.php b/htdocs/core/class/html.formticket.class.php index 76c1ed3dda0..94517d5e4b1 100644 --- a/htdocs/core/class/html.formticket.class.php +++ b/htdocs/core/class/html.formticket.class.php @@ -1277,7 +1277,7 @@ class FormTicket print ' selected="selected"'; } elseif ($arrayseverities['use_default'] == "1" && empty($selected) && (!$empty || $empty == 'ifone')) { print ' selected="selected"'; - } elseif (count($ticketstat->cache_severity_tickets) == 1 && (!$empty || $empty == 'ifone')) { // If only 1 choice, we autoselect it + } elseif (count($conf->cache['severity_tickets']) == 1 && (!$empty || $empty == 'ifone')) { // If only 1 choice, we autoselect it print ' selected="selected"'; } From f885d1e05b1ca69ae7732c6290132efa1661045b Mon Sep 17 00:00:00 2001 From: "Laurent Destailleur (aka Eldy)" Date: Wed, 5 Feb 2025 13:26:16 +0100 Subject: [PATCH 04/10] Fix use of cache --- htdocs/core/class/html.formticket.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/class/html.formticket.class.php b/htdocs/core/class/html.formticket.class.php index 76c1ed3dda0..94517d5e4b1 100644 --- a/htdocs/core/class/html.formticket.class.php +++ b/htdocs/core/class/html.formticket.class.php @@ -1277,7 +1277,7 @@ class FormTicket print ' selected="selected"'; } elseif ($arrayseverities['use_default'] == "1" && empty($selected) && (!$empty || $empty == 'ifone')) { print ' selected="selected"'; - } elseif (count($ticketstat->cache_severity_tickets) == 1 && (!$empty || $empty == 'ifone')) { // If only 1 choice, we autoselect it + } elseif (count($conf->cache['severity_tickets']) == 1 && (!$empty || $empty == 'ifone')) { // If only 1 choice, we autoselect it print ' selected="selected"'; } From 3e45bf00eb0ba476c2ef27f79f77a8337cef6670 Mon Sep 17 00:00:00 2001 From: Regis Houssin Date: Wed, 5 Feb 2025 13:54:36 +0100 Subject: [PATCH 05/10] FIX missing company name if dontaion is linked to third party --- htdocs/compta/index.php | 16 ++++++++++++---- htdocs/don/card.php | 4 ++-- htdocs/don/index.php | 16 ++++++++++++---- 3 files changed, 26 insertions(+), 10 deletions(-) diff --git a/htdocs/compta/index.php b/htdocs/compta/index.php index a238b4f6a2b..5fc3880c600 100644 --- a/htdocs/compta/index.php +++ b/htdocs/compta/index.php @@ -422,7 +422,7 @@ if (isModEnabled('don') && $user->hasRight('don', 'lire')) { $langs->load("boxes"); $donationstatic = new Don($db); - $sql = "SELECT d.rowid, d.lastname, d.firstname, d.societe, d.datedon as date, d.tms as dm, d.amount, d.fk_statut as status"; + $sql = "SELECT d.rowid, d.lastname, d.firstname, d.societe, d.datedon as date, d.tms as dm, d.amount, d.fk_statut as status, d.fk_soc as socid"; $sql .= " FROM ".MAIN_DB_PREFIX."don as d"; $sql .= " WHERE d.entity IN (".getEntity('donation').")"; // Add where from hooks @@ -473,9 +473,17 @@ if (isModEnabled('don') && $user->hasRight('don', 'lire')) { $donationstatic->statut = $obj->status; $donationstatic->status = $obj->status; - $label = $donationstatic->getFullName($langs); - if ($obj->societe) { - $label .= ($label ? ' - ' : '').$obj->societe; + if (!empty($obj->socid)) { + $companystatic = new Societe($db); + $ret = $companystatic->fetch($obj->socid); + if ($ret > 0) { + $label = $companystatic->getNomUrl(1); + } + } else { + $label = $donationstatic->getFullName($langs); + if ($obj->societe) { + $label .= ($label ? ' - ' : '').$obj->societe; + } } print ''; diff --git a/htdocs/don/card.php b/htdocs/don/card.php index abb8560727f..675a8655c30 100644 --- a/htdocs/don/card.php +++ b/htdocs/don/card.php @@ -398,7 +398,7 @@ if ($action == 'create') { // Company if (isModEnabled("societe") && getDolGlobalString('DONATION_USE_THIRDPARTIES')) { // Thirdparty - if ($soc->id > 0) { + if (!empty($soc) && $soc->id > 0) { print ''.$langs->trans('ThirdParty').''; print ''; print $soc->getNomUrl(1); @@ -420,7 +420,7 @@ if ($action == 'create') { print ''.$langs->trans('ThirdParty').''; print ''; $filter = '((s.client:IN:1,2,3) AND (status:=:1))'; - print $form->select_company($soc->id, 'socid', $filter, 'SelectThirdParty', 0, 0, null, 0, 'minwidth300'); + print $form->select_company($socid, 'socid', $filter, 'SelectThirdParty', 0, 0, null, 0, 'minwidth300'); // Option to reload page to retrieve customer information. Note, this clear other input if (getDolGlobalString('RELOAD_PAGE_ON_CUSTOMER_CHANGE_DISABLED')) { print '