From b2829e4309ec249df87284c8a91ccc18a736d9d4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Wed, 10 Jun 2026 19:22:30 +0200 Subject: [PATCH 01/38] fix missing include in admin bom (#38486) fix was added in v23 --- htdocs/admin/bom.php | 1 + 1 file changed, 1 insertion(+) diff --git a/htdocs/admin/bom.php b/htdocs/admin/bom.php index b87b2954e41..1d289ca99c7 100644 --- a/htdocs/admin/bom.php +++ b/htdocs/admin/bom.php @@ -29,6 +29,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/pdf.lib.php'; require_once DOL_DOCUMENT_ROOT.'/bom/class/bom.class.php'; require_once DOL_DOCUMENT_ROOT.'/bom/lib/bom.lib.php'; +require_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php'; /** * @var Conf $conf From 58d4699379105f26562f8ea67177e28c2af3034f Mon Sep 17 00:00:00 2001 From: ddinside Date: Wed, 10 Jun 2026 19:30:36 +0200 Subject: [PATCH 02/38] fix(auth): bypass LDAP empty-password check when OIDC flow active (#38498) The OIDC login flow does not set $passwordtotest (the password is irrelevant once the IdP has authenticated). However, when both 'ldap' and 'openid_connect' are listed in $dolibarr_main_authentication, the LDAP empty-password guard at main.inc.php:780 triggers and redirects back to the login page, breaking the OIDC handshake. This is a backport of the same one-line fix already merged on develop (see main.inc.php:808 there): add '&& !in_array("openid_connect", $authmode)' to the guard so the LDAP empty-password check is skipped when an OIDC flow is currently being processed. Tested on Dolibarr 22.0.x with Authentik OIDC provider: - before: post-OIDC-callback loops back to login page (regression vs 21.x) - after : post-OIDC-callback lands on dashboard as expected - no impact on pure LDAP auth (when openid_connect is NOT in $authmode) - no impact on pure Dolibarr local auth --- htdocs/main.inc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/main.inc.php b/htdocs/main.inc.php index 0a57fbd434e..acd81477421 100644 --- a/htdocs/main.inc.php +++ b/htdocs/main.inc.php @@ -777,7 +777,7 @@ if (!defined('NOLOGIN')) { } // End test login / passwords - if (!$login || (in_array('ldap', $authmode) && empty($passwordtotest))) { // With LDAP we refused empty password because some LDAP are "opened" for anonymous access so connection is a success. + if (!$login || (in_array('ldap', $authmode) && !in_array('openid_connect', $authmode) && empty($passwordtotest))) { // With LDAP we refused empty password because some LDAP are "opened" for anonymous access so connection is a success. // No data to test login, so we show the login page. dol_syslog("--- Access to ".(empty($_SERVER["REQUEST_METHOD"]) ? '' : $_SERVER["REQUEST_METHOD"].' ').$_SERVER["PHP_SELF"]." - action=".GETPOST('action', 'aZ09')." - actionlogin=".GETPOST('actionlogin', 'aZ09')." - showing the login form and exit", LOG_NOTICE); if (defined('NOREDIRECTBYMAINTOLOGIN')) { From 9718d669a75efeb9c67f75cb18d00aae38d56148 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 10 Jun 2026 15:28:24 +0200 Subject: [PATCH 03/38] Fix phan --- htdocs/projet/tasks/time.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/projet/tasks/time.php b/htdocs/projet/tasks/time.php index fd7afbfb325..1a69a080a33 100644 --- a/htdocs/projet/tasks/time.php +++ b/htdocs/projet/tasks/time.php @@ -573,7 +573,7 @@ if ($action == 'confirm_generateinvoice' && $user->hasRight('facture', 'creer')) // as a service even when no product is bound to the time entry. Otherwise // the default $type=0 leaks through and the PDF labels the operation as // "Delivery of goods" instead of "Provision of services" (issue #34571). - $lineid = $tmpinvoice->addline($langs->trans("TimeSpentForInvoice", $username) . ' : ' . $qtyhourtext, $pu_htline, round($qtyhour / $prodDurationHours, 2), $txtvaline, $localtax1line, $localtax2line, ($idprodline > 0 ? $idprodline : 0), (float) $remiseproject, '', '', 0, 0, '', 'HT', 0, Product::TYPE_SERVICE); + $lineid = $tmpinvoice->addline($langs->trans("TimeSpentForInvoice").' - '.$username . ' : ' . $qtyhourtext, $pu_htline, round($qtyhour / $prodDurationHours, 2), $txtvaline, $localtax1line, $localtax2line, ($idprodline > 0 ? $idprodline : 0), (float) $remiseproject, '', '', 0, 0, 0, 'HT', 0, Product::TYPE_SERVICE); if ($lineid < 0) { $error++; setEventMessages(null, $tmpinvoice->errors, 'errors'); @@ -676,7 +676,7 @@ if ($action == 'confirm_generateinvoice' && $user->hasRight('facture', 'creer')) // even when no product is bound to the time entry. Otherwise the default // $type=0 leaks through and the PDF labels the operation as // "Delivery of goods" instead of "Provision of services" (issue #34571). - $lineid = $tmpinvoice->addline($value['note'], $pu_htline, round($qtyhour / $prodDurationHours, 2), $txtvaline, $localtax1line, $localtax2line, ($idprodline > 0 ? $idprodline : 0), (float) $remiseproject, '', '', 0, 0, '', 'HT', 0, Product::TYPE_SERVICE); + $lineid = $tmpinvoice->addline($value['note'], $pu_htline, round($qtyhour / $prodDurationHours, 2), $txtvaline, $localtax1line, $localtax2line, ($idprodline > 0 ? $idprodline : 0), (float) $remiseproject, '', '', 0, 0, 0, 'HT', 0, Product::TYPE_SERVICE); if ($lineid < 0) { $error++; setEventMessages(null, $tmpinvoice->errors, 'errors'); From 532cea725df464735c22bcbe8bd642cc9ccc9ba6 Mon Sep 17 00:00:00 2001 From: John BOTELLA <68917336+thersane-john@users.noreply.github.com> Date: Wed, 10 Jun 2026 19:54:58 +0200 Subject: [PATCH 04/38] Fix: Backport fix from V23 (#38466) * Fix: Backport fix from V23 * Fix value --- htdocs/product/class/html.formproduct.class.php | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/htdocs/product/class/html.formproduct.class.php b/htdocs/product/class/html.formproduct.class.php index 203cfcb772e..31eeaf65b98 100644 --- a/htdocs/product/class/html.formproduct.class.php +++ b/htdocs/product/class/html.formproduct.class.php @@ -576,6 +576,8 @@ class FormProduct $langs->load("other"); + $selected = (string) $selected; + $return = ''; $placeholderID = ($mode == 2 ? '99999999' : '-1'); // we don't want ajaxcombobox replace clearing option in mode 2 @@ -610,23 +612,23 @@ class FormProduct if ($mode == 1) { $return .= $lines->short_label; } elseif ($mode == 2) { - $return .= $lines->scale; + $return .= (int) $lines->scale; } else { $return .= $lines->id; } $return .= '"'; if ($mode == 1 && $lines->short_label == $selected) { $return .= ' selected'; - } elseif ($mode == 2 && $lines->scale == $selected) { + } elseif ($mode == 2 && (int) $lines->scale === (int) $selected) { // Careful null !== 0 !== '0' and when 0 is saved bdd store null $return .= ' selected'; } elseif ($mode == 0 && $lines->id == $selected) { $return .= ' selected'; } $return .= '>'; if ($measuring_style == 'time') { - $return .= $langs->trans(ucfirst($lines->label)); + $return .= $langs->trans(ucfirst((string) $lines->label)); } else { - $return .= $langs->trans($lines->label); + $return .= $langs->trans((string) $lines->label); } $return .= ''; } From 2bebf94b9983eaf782d233b8ac8e6899f08bbef0 Mon Sep 17 00:00:00 2001 From: ThomasNgr-OpenDSI Date: Wed, 10 Jun 2026 20:03:47 +0200 Subject: [PATCH 05/38] FIX #38458 : don't let user chose line unit on predefined products (#38460) --- htdocs/core/tpl/objectline_create.tpl.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/tpl/objectline_create.tpl.php b/htdocs/core/tpl/objectline_create.tpl.php index 6dd4f26b305..fa26a09a122 100644 --- a/htdocs/core/tpl/objectline_create.tpl.php +++ b/htdocs/core/tpl/objectline_create.tpl.php @@ -1388,7 +1388,7 @@ if (!empty($usemargins) && $user->hasRight('margins', 'creer')) { jQuery("#np_markRate, .np_markRate").hide(); - jQuery("#units, #title_units").hide(); + jQuery("#units, #title_units, .linecoluseunit .selection").hide(); jQuery("#buying_price").show(); jQuery('#trlinefordates, .divlinefordates').show(); } From d0a560bfcfc8c6310b943304c636c651ed8ed3ef Mon Sep 17 00:00:00 2001 From: Ricardo Date: Wed, 10 Jun 2026 20:39:17 +0200 Subject: [PATCH 06/38] FIX generate_random_id() collisions (Duplicate entry on uk_ticket_track_id) (#38673) generate_random_id() reseeded the PRNG on every call with mt_srand((int) ((float) microtime() * 1000000)). PHP masks the mt_srand seed to uint32, so the effective seed is (microtime*1e6) mod 2^32: it repeats about every 71 minutes, and two calls in the same microsecond get the same seed and therefore the same id. The usable id space is effectively ~2^32 and time-correlated instead of 35^16. Under concurrency/bursts (REST API, public ticket interface) this makes ticket creation fail with: DB_ERROR_RECORD_ALREADY_EXISTS Duplicate entry '' for key 'uk_ticket_track_id' A freshly created ticket was observed colliding with the track_id of a ticket created two months earlier. Use random_int() (CSPRNG, unbiased - also removes the mt_rand() % strlen modulo bias) and stop reseeding mt_srand per call. Same charset and length, so the generated id format is unchanged. random_int() is available since PHP 7.0. Co-authored-by: MENDES Ricardo Co-authored-by: Claude Opus 4.8 Co-authored-by: Laurent Destailleur --- htdocs/core/lib/ticket.lib.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/core/lib/ticket.lib.php b/htdocs/core/lib/ticket.lib.php index 7ce001c34fd..65a4a4c7891 100644 --- a/htdocs/core/lib/ticket.lib.php +++ b/htdocs/core/lib/ticket.lib.php @@ -209,9 +209,9 @@ function generate_random_id($car = 16) { $string = ""; $chaine = "abcdefghijklmnopqrstuvwxyz123456789"; - mt_srand((int) ((float) microtime() * 1000000)); + $max = strlen($chaine) - 1; for ($i = 0; $i < $car; $i++) { - $string .= $chaine[mt_rand() % strlen($chaine)]; + $string .= $chaine[random_int(0, $max)]; } return $string; } From 48cb717cd3f87f7c221d796d2adab3f90e239517 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Wed, 10 Jun 2026 21:19:06 +0200 Subject: [PATCH 07/38] fix new MO (#38483) --- htdocs/mrp/class/mo.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/mrp/class/mo.class.php b/htdocs/mrp/class/mo.class.php index 24a3056c330..ad1f3d6651b 100644 --- a/htdocs/mrp/class/mo.class.php +++ b/htdocs/mrp/class/mo.class.php @@ -1815,7 +1815,7 @@ class Mo extends CommonObject $this->tpl['label'] = ''; if (!empty($line->fk_product) && $line->fk_product > 0) { $productstatic->fetch($line->fk_product); - $productstatic->load_virtual_stock(); + $productstatic->load_stock(); // load_virtual_stock() is done in load_stock() $this->tpl['label'] .= $productstatic->getNomUrl(1); //$this->tpl['label'].= ' - '.$productstatic->label; } else { From f7fdcb3c82fb9566985a76a311d47382b7b372bd Mon Sep 17 00:00:00 2001 From: w3houde Date: Fri, 12 Jun 2026 13:56:15 +0200 Subject: [PATCH 08/38] Fix #36905 guard project card thirdparty client check against null (#38732) When editing a project that has no thirdparty attached, the WON/customer conversion block dereferenced $object->thirdparty->client without first checking that the thirdparty was loaded. $object->fetch_thirdparty() leaves the property null in that case so PHP 8 raised a fatal error. Add !is_null($object->thirdparty) on both opportunity blocks (create and update paths). This is the same guard already shipped on 23.0 through 6ce7ba17f4d, backported to keep 22.0 stable for the N-1 window. Signed-off-by: Dolicraft Co-authored-by: Dolicraft --- htdocs/projet/card.php | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/htdocs/projet/card.php b/htdocs/projet/card.php index db00efbc520..d8e5873ed9b 100644 --- a/htdocs/projet/card.php +++ b/htdocs/projet/card.php @@ -365,16 +365,14 @@ if (empty($reshook)) { setEventMessages($langs->trans("ErrorOppStatusRequiredIfAmount"), null, 'errors'); } - if (!$error) { - if ((int) $object->thirdparty->client == 0 || (int) $object->thirdparty->client == 2) { // If not yet customer - // Get ID of the special opportunity status code 'WON' - $idoppstatuswon = (int) dol_getIdFromCode($db, 'WON', 'c_lead_status', 'code', 'rowid'); + if (!$error && !is_null($object->thirdparty) && ((int) $object->thirdparty->client == 0 || (int) $object->thirdparty->client == 2)) { // If not yet customer + // Get ID of the special opportunity status code 'WON' + $idoppstatuswon = (int) dol_getIdFromCode($db, 'WON', 'c_lead_status', 'code', 'rowid'); - if ($object->opp_status == $idoppstatuswon) { - // Switch the thirdparty into a customer (only if thirdparty exists) - if (!empty($object->thirdparty) && !empty($object->thirdparty->id)) { - $object->thirdparty->setAsCustomer(); - } + if ($object->opp_status == $idoppstatuswon) { + // Switch the thirdparty into a customer (only if thirdparty exists) + if (!empty($object->thirdparty) && !empty($object->thirdparty->id)) { + $object->thirdparty->setAsCustomer(); } } } @@ -465,7 +463,7 @@ if (empty($reshook)) { // If opportunities are used and the customer is not yet a customer if (getDolGlobalString('PROJECT_USE_OPPORTUNITIES') && $object->usage_opportunity) { - if ((int) $object->thirdparty->client == 0 || (int) $object->thirdparty->client == 2) { // If not yet customer + if (!is_null($object->thirdparty) && ((int) $object->thirdparty->client == 0 || (int) $object->thirdparty->client == 2)) { // If not yet customer // Get ID of the special opportunity status code 'WON' $idoppstatuswon = (int) dol_getIdFromCode($db, 'WON', 'c_lead_status', 'code', 'rowid'); From c278f65591f8564e6519c8e9e95503ff639c1ea5 Mon Sep 17 00:00:00 2001 From: lvessiller-opendsi Date: Fri, 12 Jun 2026 23:48:03 +0200 Subject: [PATCH 09/38] FIX set SOCIETE_FISCAL_MONTH_START default to 1 (#37662) (#38162) --- htdocs/core/modules/modSociete.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/modules/modSociete.class.php b/htdocs/core/modules/modSociete.class.php index ee1f36810b8..eb7b9952ba3 100644 --- a/htdocs/core/modules/modSociete.class.php +++ b/htdocs/core/modules/modSociete.class.php @@ -94,7 +94,7 @@ class modSociete extends DolibarrModules $this->const[$r][0] = "SOCIETE_FISCAL_MONTH_START"; $this->const[$r][1] = "chaine"; - $this->const[$r][2] = "0"; + $this->const[$r][2] = "1"; $this->const[$r][3] = "Enter the month number of the first month of the fiscal year, e. g. 9 for September"; $this->const[$r][4] = 0; $r++; From db6314ce9b5b4e7a50ecbecb54dcc0a93fe26e2a Mon Sep 17 00:00:00 2001 From: Eric - CAP-REL <1468823+rycks@users.noreply.github.com> Date: Fri, 12 Jun 2026 23:57:34 +0200 Subject: [PATCH 10/38] =?UTF-8?q?remove=20suppliers=20from=20list=20as=20f?= =?UTF-8?q?ichinter=20is=20displayed=20only=20on=20customer=E2=80=A6=20(#3?= =?UTF-8?q?8657)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * remove suppliers from list as fichinter is displayed only on customer/prospect card * add client = 2 as accepted values * QUAL: switch to constants --- htdocs/fichinter/card.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/htdocs/fichinter/card.php b/htdocs/fichinter/card.php index 261b5e4ffaa..da5b55860b1 100644 --- a/htdocs/fichinter/card.php +++ b/htdocs/fichinter/card.php @@ -1063,7 +1063,9 @@ if ($action == 'create') { } print ''; print ''; print '
'.$langs->trans("ThirdParty").''; - print $form->select_company('', 'socid', '', 'SelectThirdParty', 1, 0, null, 0, 'minwidth300'); + $filter = '((s.client:IN:'.Societe::CUSTOMER.', '.Societe::PROSPECT.', '.Societe::CUSTOMER_AND_PROSPECT.') AND (s.status:=:1))'; + + print $form->select_company('', 'socid', $filter, 'SelectThirdParty', 1, 0, null, 0, 'minwidth300'); print ' '; print '
'; From 46e2d491c97e713abd747b51c6438d084140ed9e Mon Sep 17 00:00:00 2001 From: w3houde Date: Sat, 13 Jun 2026 01:29:19 +0200 Subject: [PATCH 11/38] Fix #37317 22.0 backport: include actions_printing.inc.php in ticket card (#38764) The Ticket card never handled action=print_file because it never included htdocs/core/actions_printing.inc.php. Clicking the printer icon hit the URL, the action handler that dispatches to Direct Printing / PrintIPP was never loaded, and the page rendered as a blank response with no print job sent. Develop and 23.0 already include the file (commit dc85a6756b7, shipped in 23.0.0+). Backport the include to 22.0 so the printer icon works on the supported branch. Signed-off-by: Dolicraft Co-authored-by: Dolicraft --- htdocs/ticket/card.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/htdocs/ticket/card.php b/htdocs/ticket/card.php index 1a81f3125eb..9c4c0ca75af 100644 --- a/htdocs/ticket/card.php +++ b/htdocs/ticket/card.php @@ -680,6 +680,9 @@ if (empty($reshook)) { $permissiondellink = $user->hasRight('ticket', 'write'); include DOL_DOCUMENT_ROOT . '/core/actions_dellink.inc.php'; // Must be 'include', not 'include_once' + // Actions when printing a doc from card + include DOL_DOCUMENT_ROOT . '/core/actions_printing.inc.php'; + // Actions to build doc include DOL_DOCUMENT_ROOT . '/core/actions_builddoc.inc.php'; From b302dfea2ebbdc15d98bbf7654f5fd7920bad6dc Mon Sep 17 00:00:00 2001 From: Eric Seigne Date: Mon, 15 Jun 2026 11:25:24 +0200 Subject: [PATCH 12/38] fix very old llx_adherent migration bug from 3.6-3.7 --- htdocs/install/mysql/migration/17.0.0-18.0.0.sql | 3 +++ 1 file changed, 3 insertions(+) diff --git a/htdocs/install/mysql/migration/17.0.0-18.0.0.sql b/htdocs/install/mysql/migration/17.0.0-18.0.0.sql index d17370ce0cc..e7522f6352b 100644 --- a/htdocs/install/mysql/migration/17.0.0-18.0.0.sql +++ b/htdocs/install/mysql/migration/17.0.0-18.0.0.sql @@ -721,3 +721,6 @@ ALTER TABLE llx_user CHANGE COLUMN tms tms timestamp DEFAULT CURRENT_TIMESTAMP O ALTER TABLE llx_salary_extrafields CHANGE COLUMN tms tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP; -- 15.0 -> 16.0 rename llx_advtargetemailing to llx_mailing_advtarget ALTER TABLE llx_mailing_advtarget CHANGE COLUMN tms tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP; + +-- 3.6 -> 3.7 typo on llx_adherents ('end with s') and varchar is 128 +ALTER TABLE llx_adherent MODIFY COLUMN societe VARCHAR(128); From a2623d8fc5037e44ca6367933782a499751f2c15 Mon Sep 17 00:00:00 2001 From: Eric Seigne Date: Mon, 15 Jun 2026 11:38:22 +0200 Subject: [PATCH 13/38] name llx_product_stock_entrepot is now llx_product_warehouse_properties --- htdocs/install/mysql/migration/17.0.0-18.0.0.sql | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/install/mysql/migration/17.0.0-18.0.0.sql b/htdocs/install/mysql/migration/17.0.0-18.0.0.sql index d17370ce0cc..ae11f0f0d49 100644 --- a/htdocs/install/mysql/migration/17.0.0-18.0.0.sql +++ b/htdocs/install/mysql/migration/17.0.0-18.0.0.sql @@ -489,7 +489,7 @@ ALTER TABLE llx_partnership ADD COLUMN email_partnership varchar(64) after fk_me ALTER TABLE llx_contratdet ADD INDEX idx_contratdet_statut (statut); -ALTER TABLE fk_product_price_product DROP FOREIGN KEY fk_product_price_product; +ALTER TABLE product_price_product DROP FOREIGN KEY fk_product_price_product; ALTER TABLE llx_societe_rib ADD COLUMN ext_payment_site varchar(128); @@ -679,7 +679,7 @@ ALTER TABLE llx_product_lot_extrafields CHANGE COLUMN tms tms timestamp DEFAULT ALTER TABLE llx_product_lot CHANGE COLUMN tms tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP; ALTER TABLE llx_product_price_by_qty CHANGE COLUMN tms tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP; ALTER TABLE llx_product_price CHANGE COLUMN tms tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP; -ALTER TABLE llx_product_stock_entrepot CHANGE COLUMN tms tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP; +ALTER TABLE llx_product_warehouse_properties CHANGE COLUMN tms tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP; ALTER TABLE llx_product_stock CHANGE COLUMN tms tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP; ALTER TABLE llx_projet_extrafields CHANGE COLUMN tms tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP; ALTER TABLE llx_projet CHANGE COLUMN tms tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP; From d1df0825fed5f0d0622145830dd65d9359190713 Mon Sep 17 00:00:00 2001 From: w3houde Date: Mon, 15 Jun 2026 14:42:25 +0200 Subject: [PATCH 14/38] Fix #38219 takepos: keep empty draft invoice when a non-default customer is selected (#38812) htdocs/takepos/invoice.php:997 used to delete the invoice and redirect whenever the last line was removed. When the cashier had already picked a customer different from the configured default cashdesk thirdparty, the redirect reloaded the page on a fresh PROV invoice owned by the default customer, so the selection was silently lost. Only auto-drop the invoice when it still points to the default thirdparty (or none). With a real customer attached, the empty draft stays so the next line lands on the same invoice and customer. Signed-off-by: Dolicraft Co-authored-by: Dolicraft --- htdocs/takepos/invoice.php | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/htdocs/takepos/invoice.php b/htdocs/takepos/invoice.php index 9d7ea9a5c03..87a0d4cdb64 100644 --- a/htdocs/takepos/invoice.php +++ b/htdocs/takepos/invoice.php @@ -995,14 +995,22 @@ if (empty($reshook)) { } if (count($invoice->lines) == 0) { - $invoice->delete($user); + // Keep an empty draft invoice alive when a non-default customer was + // already attached so deleting the last line does not silently lose + // the customer that was just selected (#38219). Only drop the invoice + // when it is still on the default cashdesk thirdparty (or none). + $defaultsocid = (int) getDolGlobalString('CASHDESK_ID_THIRDPARTY'.$_SESSION["takeposterminal"]); + $invoicesocid = (int) $invoice->socid; + if ($invoicesocid === 0 || $invoicesocid === $defaultsocid) { + $invoice->delete($user); - if (defined('INCLUDE_PHONEPAGE_FROM_PUBLIC_PAGE')) { - header("Location: ".DOL_URL_ROOT."/takepos/public/auto_order.php"); - } else { - header("Location: ".DOL_URL_ROOT."/takepos/invoice.php"); + if (defined('INCLUDE_PHONEPAGE_FROM_PUBLIC_PAGE')) { + header("Location: ".DOL_URL_ROOT."/takepos/public/auto_order.php"); + } else { + header("Location: ".DOL_URL_ROOT."/takepos/invoice.php"); + } + exit; } - exit; } } From b7d66d679dc74b8b92ab4a37f5cd150c61d85e08 Mon Sep 17 00:00:00 2001 From: Maxime Kohlhaas Date: Mon, 15 Jun 2026 14:43:25 +0200 Subject: [PATCH 15/38] Fix linkback in takepos admin files (#38816) --- htdocs/takepos/admin/appearance.php | 2 +- htdocs/takepos/admin/bar.php | 2 +- htdocs/takepos/admin/receipt.php | 2 +- htdocs/takepos/admin/setup.php | 2 +- htdocs/takepos/admin/terminal.php | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/htdocs/takepos/admin/appearance.php b/htdocs/takepos/admin/appearance.php index 7369a45ad49..89ea838c80f 100644 --- a/htdocs/takepos/admin/appearance.php +++ b/htdocs/takepos/admin/appearance.php @@ -85,7 +85,7 @@ $formproduct = new FormProduct($db); llxHeader('', $langs->trans("CashDeskSetup"), '', '', 0, 0, '', '', '', 'mod-takepos page-admin_appearance'); -$linkback = ''.img_picto($langs->trans("GoBack"), 'back', 'class="pictofixedwidth"').''.$langs->trans("GoBack").''; +$linkback = ''.img_picto($langs->trans("BackToModuleList"), 'back', 'class="pictofixedwidth"').''.$langs->trans("BackToModuleList").''; print load_fiche_titre($langs->trans("CashDeskSetup").' (TakePOS)', $linkback, 'title_setup'); $head = takepos_admin_prepare_head(); diff --git a/htdocs/takepos/admin/bar.php b/htdocs/takepos/admin/bar.php index c317d3d2c33..4a9a607b2b0 100644 --- a/htdocs/takepos/admin/bar.php +++ b/htdocs/takepos/admin/bar.php @@ -96,7 +96,7 @@ $arrayofcss = array("/takepos/css/colorbox.css"); llxHeader('', $langs->trans("CashDeskSetup"), '', '', 0, 0, $arrayofjs, $arrayofcss, '', 'mod-takepos page-admin_bar'); -$linkback = ''.img_picto($langs->trans("GoBack"), 'back', 'class="pictofixedwidth"').''.$langs->trans("GoBack").''; +$linkback = ''.img_picto($langs->trans("BackToModuleList"), 'back', 'class="pictofixedwidth"').''.$langs->trans("BackToModuleList").''; print load_fiche_titre($langs->trans("CashDeskSetup").' (TakePOS)', $linkback, 'title_setup'); $head = takepos_admin_prepare_head(); diff --git a/htdocs/takepos/admin/receipt.php b/htdocs/takepos/admin/receipt.php index d37eef57626..609dd1a0717 100644 --- a/htdocs/takepos/admin/receipt.php +++ b/htdocs/takepos/admin/receipt.php @@ -93,7 +93,7 @@ $form = new Form($db); llxHeader('', $langs->trans("CashDeskSetup"), '', '', 0, 0, '', '', '', 'mod-takepos page-admin_receipt'); -$linkback = ''.img_picto($langs->trans("GoBack"), 'back', 'class="pictofixedwidth"').''.$langs->trans("GoBack").''; +$linkback = ''.img_picto($langs->trans("BackToModuleList"), 'back', 'class="pictofixedwidth"').''.$langs->trans("BackToModuleList").''; print load_fiche_titre($langs->trans("CashDeskSetup").' (TakePOS)', $linkback, 'title_setup'); diff --git a/htdocs/takepos/admin/setup.php b/htdocs/takepos/admin/setup.php index 63e8dc83610..17b5776217b 100644 --- a/htdocs/takepos/admin/setup.php +++ b/htdocs/takepos/admin/setup.php @@ -141,7 +141,7 @@ $help_url = 'EN:Module_Point_of_sale_(TakePOS)'; llxHeader('', $langs->trans("CashDeskSetup"), $help_url, '', 0, 0, '', '', '', 'mod-takepos page-admin_setup'); -$linkback = ''.img_picto($langs->trans("GoBack"), 'back', 'class="pictofixedwidth"').''.$langs->trans("GoBack").''; +$linkback = ''.img_picto($langs->trans("BackToModuleList"), 'back', 'class="pictofixedwidth"').''.$langs->trans("BackToModuleList").''; print load_fiche_titre($langs->trans("CashDeskSetup").' (TakePOS)', $linkback, 'title_setup'); diff --git a/htdocs/takepos/admin/terminal.php b/htdocs/takepos/admin/terminal.php index cc6b4f15027..2cf92a0de59 100644 --- a/htdocs/takepos/admin/terminal.php +++ b/htdocs/takepos/admin/terminal.php @@ -180,7 +180,7 @@ $formproduct = new FormProduct($db); llxHeader('', $langs->trans("CashDeskSetup"), '', '', 0, 0, '', '', '', 'mod-takepos page-admin_terminal'); -$linkback = ''.img_picto($langs->trans("GoBack"), 'back', 'class="pictofixedwidth"').''.$langs->trans("GoBack").''; +$linkback = ''.img_picto($langs->trans("BackToModuleList"), 'back', 'class="pictofixedwidth"').''.$langs->trans("BackToModuleList").''; print load_fiche_titre($langs->trans("CashDeskSetup").' (TakePOS)', $linkback, 'title_setup'); $head = takepos_admin_prepare_head(); From 5a51763d536082462a6b41e390ca5138bc8de51d Mon Sep 17 00:00:00 2001 From: w3houde Date: Mon, 15 Jun 2026 14:59:05 +0200 Subject: [PATCH 16/38] Fix #31464 align ref filter on onlineSign with the producer ('alpha') (#38821) htdocs/public/onlinesign/newonlinesign.php:97 reads the ref with GETPOST('ref','alpha') and embeds it in the secure key sent in the client form. htdocs/core/ajax/onlineSign.php:69 was reading it with the stricter GETPOST('ref','aZ09'), which drops dashes such as the one in PR2601-0003. After stripping the dash, dol_verifyHash compared the client-side secure key (built from the full ref) against a server-side hash built from a truncated ref, so the receiver answered 403 even on valid submissions and the signature page reported 'Bad value for securitykey ... for ref='. Signed-off-by: Dolicraft Co-authored-by: Dolicraft --- htdocs/core/ajax/onlineSign.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/htdocs/core/ajax/onlineSign.php b/htdocs/core/ajax/onlineSign.php index 92789b2d766..2e976f01e9c 100644 --- a/htdocs/core/ajax/onlineSign.php +++ b/htdocs/core/ajax/onlineSign.php @@ -66,7 +66,11 @@ require_once DOL_DOCUMENT_ROOT . '/core/lib/files.lib.php'; $action = GETPOST('action', 'aZ09'); $signature = GETPOST('signaturebase64'); -$ref = GETPOST('ref', 'aZ09'); +// Match the filter the producer uses in newonlinesign.php:97 ('alpha'). +// Refs such as PR2601-0003 contain a dash, which aZ09 strips. After stripping +// the dash, dol_verifyHash fails because the security key was built from the +// full reference, so onlineSign answered 403 even on valid submissions (#31464). +$ref = GETPOST('ref', 'alpha'); $mode = GETPOST('mode', 'aZ09'); // 'proposal', ... $SECUREKEY = GETPOST("securekey"); // Secure key $online_sign_name = GETPOST("onlinesignname"); From 28103ac4f8e24b0dbffc1e3442a5449d4c0e6a26 Mon Sep 17 00:00:00 2001 From: w3houde Date: Mon, 15 Jun 2026 15:05:00 +0200 Subject: [PATCH 17/38] Fix #38597 stop TakePOS popup from firing again after cash control close (#38752) The auto-open popup in TakePOS used SELECT ... WHERE date_creation > first_hour_today AND status = 0. The 'status = 0' filter excluded the just-closed fence, so a browser refresh on the same calendar day after closing a cash control sequence found no row and the popup was triggered again. Drop the status filter so any fence created today on the terminal (open or closed) counts as 'already had a cash control today' and suppresses the popup. The first open of a new calendar day still triggers it because no row from today exists yet. Signed-off-by: Dolicraft Co-authored-by: Dolicraft --- htdocs/takepos/index.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/htdocs/takepos/index.php b/htdocs/takepos/index.php index 8e42acc4a68..13894b8f0b5 100644 --- a/htdocs/takepos/index.php +++ b/htdocs/takepos/index.php @@ -1101,11 +1101,14 @@ $( document ).ready(function() { } if (getDolGlobalString('TAKEPOS_CONTROL_CASH_OPENING')) { + // Look for any cash control fence created today on this terminal, regardless of its status, + // so the auto-open popup only fires on the first cash control of a calendar day. Without this, + // refreshing the browser the same day after closing a fence used to immediately re-fire the + // popup because the closed fences were filtered out by the status check (#38597). $sql = "SELECT rowid, status FROM ".MAIN_DB_PREFIX."pos_cash_fence WHERE"; $sql .= " entity = ".((int) $conf->entity)." AND "; $sql .= " posnumber = ".((int) $_SESSION["takeposterminal"])." AND "; $sql .= " date_creation > '".$db->idate(dol_get_first_hour(dol_now()))."'"; - $sql .= " AND status = 0 "; $resql = $db->query($sql); if ($resql) { $obj = $db->fetch_object($resql); From ae99530e252d3ec1914a3ebe966fc3e18ec0d00e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Tue, 16 Jun 2026 02:07:14 +0200 Subject: [PATCH 18/38] create oldcopy before massdelete (#38844) --- htdocs/core/actions_massactions.inc.php | 1 + 1 file changed, 1 insertion(+) diff --git a/htdocs/core/actions_massactions.inc.php b/htdocs/core/actions_massactions.inc.php index 1dcb4774ba7..0f15cd1ab69 100644 --- a/htdocs/core/actions_massactions.inc.php +++ b/htdocs/core/actions_massactions.inc.php @@ -1217,6 +1217,7 @@ if (!$error && ($massaction == 'delete' || ($action == 'delete' && $confirm == ' // TODO Change signature of delete for Societe $result = $objecttmp->delete($objecttmp->id, $user, 1); } else { + $objecttmp->oldcopy = dol_clone($objecttmp); $result = $objecttmp->delete($user); } From 35db492be1f8e4cf6eefeb19df0cce4d3ef09592 Mon Sep 17 00:00:00 2001 From: w3houde Date: Tue, 16 Jun 2026 02:07:48 +0200 Subject: [PATCH 19/38] Fix #38320 treat null/empty rang as auto in addline (Propal, Commande, Facture) (#38843) API callers like api_proposals.php postLine forward $request_data->rang unset, so null reaches addline. The '== -1' check does not match null and $ranktouse stays null, persisted as 0 - all lines then share rang=0 and the order propagates through createFromProposal / createFromOrder. Accept null and 0 alongside -1 so the auto-rank branch fires. Signed-off-by: Dolicraft Co-authored-by: Dolicraft --- htdocs/comm/propal/class/propal.class.php | 2 +- htdocs/commande/class/commande.class.php | 2 +- htdocs/compta/facture/class/facture.class.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/htdocs/comm/propal/class/propal.class.php b/htdocs/comm/propal/class/propal.class.php index f36f261cc19..22dac7fa2a9 100644 --- a/htdocs/comm/propal/class/propal.class.php +++ b/htdocs/comm/propal/class/propal.class.php @@ -783,7 +783,7 @@ class Propal extends CommonObject // Rang to use $ranktouse = $rang; - if ($ranktouse == -1) { + if (empty($ranktouse) || $ranktouse == -1) { $rangmax = $this->line_max($fk_parent_line); $ranktouse = $rangmax + 1; } diff --git a/htdocs/commande/class/commande.class.php b/htdocs/commande/class/commande.class.php index 960ea46ed30..1640c361d0b 100644 --- a/htdocs/commande/class/commande.class.php +++ b/htdocs/commande/class/commande.class.php @@ -1763,7 +1763,7 @@ class Commande extends CommonOrder // Rang to use $ranktouse = $rang; - if ($ranktouse == -1) { + if (empty($ranktouse) || $ranktouse == -1) { $rangmax = $this->line_max($fk_parent_line); $ranktouse = $rangmax + 1; } diff --git a/htdocs/compta/facture/class/facture.class.php b/htdocs/compta/facture/class/facture.class.php index 54ec34e1fd0..7898437bb39 100644 --- a/htdocs/compta/facture/class/facture.class.php +++ b/htdocs/compta/facture/class/facture.class.php @@ -4397,7 +4397,7 @@ class Facture extends CommonInvoice // Rank to use $ranktouse = $rang; - if ($ranktouse == -1) { + if (empty($ranktouse) || $ranktouse == -1) { $rangmax = $this->line_max($fk_parent_line); $ranktouse = $rangmax + 1; } From 5556626a92add0694247e2e406417bfb26ff49c3 Mon Sep 17 00:00:00 2001 From: ThomasNgr-OpenDSI Date: Tue, 16 Jun 2026 02:08:22 +0200 Subject: [PATCH 20/38] Fix #38781 allow editing dictionary entries with rowid = 0 (ST_NEVER) (#38842) --- htdocs/admin/dict.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/admin/dict.php b/htdocs/admin/dict.php index 4f65c79b90f..6c3421cca2b 100644 --- a/htdocs/admin/dict.php +++ b/htdocs/admin/dict.php @@ -1792,7 +1792,7 @@ if ($id) { $obj = $db->fetch_object($resql); //print_r($obj); print ''; - if ($action == 'edit' && ($rowid == (!empty($obj->rowid) ? $obj->rowid : $obj->code))) { + if ($action == 'edit' && ($rowid == (isset($obj->rowid) ? $obj->rowid : $obj->code))) { $tmpaction = 'edit'; $parameters = array('fieldlist'=>$fieldlist, 'tabname'=>$tabname[$id]); $reshook = $hookmanager->executeHooks('editDictionaryFieldlist', $parameters, $obj, $tmpaction); // Note that $action and $object may have been modified by some hooks @@ -1804,7 +1804,7 @@ if ($id) { } print ''; - print '
'; + print '
'; print ''; print ''; if (!is_null($withentity)) { From 6c670f997d84a68ca3a5fb9e81ec06ad7fcde725 Mon Sep 17 00:00:00 2001 From: ThomasNgr-OpenDSI Date: Tue, 16 Jun 2026 02:08:54 +0200 Subject: [PATCH 21/38] Fix #38781 allow editing dictionary entries with rowid = 0 (ST_NEVER) (#38840) --- htdocs/admin/dict.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/admin/dict.php b/htdocs/admin/dict.php index fa68a87391a..7679181263c 100644 --- a/htdocs/admin/dict.php +++ b/htdocs/admin/dict.php @@ -2387,7 +2387,7 @@ if ($id > 0) { print ''; } - if ($action == 'edit' && ($rowid == (!empty($obj->rowid) ? $obj->rowid : $obj->code))) { + if ($action == 'edit' && ($rowid == (isset($obj->rowid) ? $obj->rowid : $obj->code))) { $tmpaction = 'edit'; $parameters = array('fieldlist' => $fieldlist, 'tabname' => $tabname[$id]); $reshook = $hookmanager->executeHooks('editDictionaryFieldlist', $parameters, $obj, $tmpaction); // Note that $action and $object may have been modified by some hooks @@ -2400,7 +2400,7 @@ if ($id > 0) { } print ''; - print '
'; + print '
'; print ''; print ''; if (!is_null($withentity)) { From a2545cc601917dbfd95f85ffb0d99ff9f0243fd3 Mon Sep 17 00:00:00 2001 From: Christian Humpel <78662388+Humml87@users.noreply.github.com> Date: Tue, 16 Jun 2026 02:09:18 +0200 Subject: [PATCH 22/38] Fix #38836 Up/Down on Intervention rows (#38838) --- htdocs/fichinter/class/fichinter.class.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/htdocs/fichinter/class/fichinter.class.php b/htdocs/fichinter/class/fichinter.class.php index d99dff39ce5..e373a55ec4c 100644 --- a/htdocs/fichinter/class/fichinter.class.php +++ b/htdocs/fichinter/class/fichinter.class.php @@ -86,6 +86,11 @@ class Fichinter extends CommonObject */ public $element = 'fichinter'; + /** + * @var string Name of field in database that is used as reference when object is linked to another one. + */ + public $fk_element = 'fk_fichinter'; + /** * @var string Name of table without prefix where object is stored */ From e6a0e021a08e7bc1331607ccb016d50255d617c6 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 16 Jun 2026 04:11:08 +0200 Subject: [PATCH 23/38] CI --- htdocs/conf/.gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/htdocs/conf/.gitignore b/htdocs/conf/.gitignore index c8dcde9c3fc..6c5c64a5cee 100644 --- a/htdocs/conf/.gitignore +++ b/htdocs/conf/.gitignore @@ -7,3 +7,4 @@ /conf.php.utf8 /conf.php.nov* /.conf.php.swp +/conf.sav From 5901402ac1edce493ed1249f710d53800ceb5fcc Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 16 Jun 2026 04:12:10 +0200 Subject: [PATCH 24/38] CI --- htdocs/conf/.gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/htdocs/conf/.gitignore b/htdocs/conf/.gitignore index c8dcde9c3fc..6c5c64a5cee 100644 --- a/htdocs/conf/.gitignore +++ b/htdocs/conf/.gitignore @@ -7,3 +7,4 @@ /conf.php.utf8 /conf.php.nov* /.conf.php.swp +/conf.sav From 07644d7f49d00b3e098805e474a55dcdef282be8 Mon Sep 17 00:00:00 2001 From: w3houde Date: Wed, 17 Jun 2026 03:09:21 +0200 Subject: [PATCH 25/38] Fix #34852 keep events without thirdparty visible to non-extended users (#38832) When a user lacks 'societe / client / voir', the agenda list / index / pertype / peruser / API endpoints and ActionComm::load_board_userid_v2 SQL add an EXISTS sub-query to filter on societe_commerciaux. The clause was written without a guard on a.fk_soc IS NULL, so any event not attached to a thirdparty (the common case for personal reminders or internal-only events) was silently excluded - even when the event was assigned to the user himself. Wrap the EXISTS / NOT EXISTS branches with 'a.fk_soc IS NULL OR ...' so events without a thirdparty stay visible regardless of the sale-rep filter. Matches eldy's stated semantics on the issue: event permission depends on the assignee, not on the linked thirdparty. Touches the five list paths plus the API agendaevents endpoint. Signed-off-by: Dolicraft Co-authored-by: Dolicraft --- htdocs/comm/action/class/actioncomm.class.php | 2 +- htdocs/comm/action/class/api_agendaevents.class.php | 2 +- htdocs/comm/action/index.php | 2 +- htdocs/comm/action/list.php | 2 +- htdocs/comm/action/pertype.php | 2 +- htdocs/comm/action/peruser.php | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/htdocs/comm/action/class/actioncomm.class.php b/htdocs/comm/action/class/actioncomm.class.php index b014516de32..6654be2c60b 100644 --- a/htdocs/comm/action/class/actioncomm.class.php +++ b/htdocs/comm/action/class/actioncomm.class.php @@ -1530,7 +1530,7 @@ class ActionComm extends CommonObject if ($search_sale == -2) { $sql .= " AND NOT EXISTS (SELECT sc.fk_soc FROM ".MAIN_DB_PREFIX."societe_commerciaux as sc WHERE sc.fk_soc = a.fk_soc)"; } elseif ($search_sale > 0) { - $sql .= " AND EXISTS (SELECT sc.fk_soc FROM ".MAIN_DB_PREFIX."societe_commerciaux as sc WHERE sc.fk_soc = a.fk_soc AND sc.fk_user = ".((int) $search_sale).")"; + $sql .= " AND (a.fk_soc IS NULL OR EXISTS (SELECT sc.fk_soc FROM ".MAIN_DB_PREFIX."societe_commerciaux as sc WHERE sc.fk_soc = a.fk_soc AND sc.fk_user = ".((int) $search_sale)."))"; } } diff --git a/htdocs/comm/action/class/api_agendaevents.class.php b/htdocs/comm/action/class/api_agendaevents.class.php index 371082df46f..1a539367c26 100644 --- a/htdocs/comm/action/class/api_agendaevents.class.php +++ b/htdocs/comm/action/class/api_agendaevents.class.php @@ -157,7 +157,7 @@ class AgendaEvents extends DolibarrApi if ($search_sale == -2) { $sql .= " AND NOT EXISTS (SELECT sc.fk_soc FROM ".MAIN_DB_PREFIX."societe_commerciaux as sc WHERE sc.fk_soc = t.fk_soc)"; } elseif ($search_sale > 0) { - $sql .= " AND EXISTS (SELECT sc.fk_soc FROM ".MAIN_DB_PREFIX."societe_commerciaux as sc WHERE sc.fk_soc = t.fk_soc AND sc.fk_user = ".((int) $search_sale).")"; + $sql .= " AND (t.fk_soc IS NULL OR EXISTS (SELECT sc.fk_soc FROM ".MAIN_DB_PREFIX."societe_commerciaux as sc WHERE sc.fk_soc = t.fk_soc AND sc.fk_user = ".((int) $search_sale)."))"; } } // Add sql filters diff --git a/htdocs/comm/action/index.php b/htdocs/comm/action/index.php index d8a6ba31545..00c72caf900 100644 --- a/htdocs/comm/action/index.php +++ b/htdocs/comm/action/index.php @@ -861,7 +861,7 @@ if ($search_sale && $search_sale != '-1') { if ($search_sale == -2) { $sql .= " AND NOT EXISTS (SELECT sc.fk_soc FROM ".MAIN_DB_PREFIX."societe_commerciaux as sc WHERE sc.fk_soc = a.fk_soc)"; } elseif ($search_sale > 0) { - $sql .= " AND EXISTS (SELECT sc.fk_soc FROM ".MAIN_DB_PREFIX."societe_commerciaux as sc WHERE sc.fk_soc = a.fk_soc AND sc.fk_user = ".((int) $search_sale).")"; + $sql .= " AND (a.fk_soc IS NULL OR EXISTS (SELECT sc.fk_soc FROM ".MAIN_DB_PREFIX."societe_commerciaux as sc WHERE sc.fk_soc = a.fk_soc AND sc.fk_user = ".((int) $search_sale)."))"; } } // Search on socid diff --git a/htdocs/comm/action/list.php b/htdocs/comm/action/list.php index f2efd3b4bec..49afa0959aa 100644 --- a/htdocs/comm/action/list.php +++ b/htdocs/comm/action/list.php @@ -549,7 +549,7 @@ if ($search_sale && $search_sale != '-1') { if ($search_sale == -2) { $sql .= " AND NOT EXISTS (SELECT sc.fk_soc FROM ".MAIN_DB_PREFIX."societe_commerciaux as sc WHERE sc.fk_soc = a.fk_soc)"; } elseif ($search_sale > 0) { - $sql .= " AND EXISTS (SELECT sc.fk_soc FROM ".MAIN_DB_PREFIX."societe_commerciaux as sc WHERE sc.fk_soc = a.fk_soc AND sc.fk_user = ".((int) $search_sale).")"; + $sql .= " AND (a.fk_soc IS NULL OR EXISTS (SELECT sc.fk_soc FROM ".MAIN_DB_PREFIX."societe_commerciaux as sc WHERE sc.fk_soc = a.fk_soc AND sc.fk_user = ".((int) $search_sale)."))"; } } // Search on socid diff --git a/htdocs/comm/action/pertype.php b/htdocs/comm/action/pertype.php index e44815eba88..e0f65101fdb 100644 --- a/htdocs/comm/action/pertype.php +++ b/htdocs/comm/action/pertype.php @@ -617,7 +617,7 @@ if ($search_sale && $search_sale != '-1') { if ($search_sale == -2) { $sql .= " AND NOT EXISTS (SELECT sc.fk_soc FROM ".MAIN_DB_PREFIX."societe_commerciaux as sc WHERE sc.fk_soc = a.fk_soc)"; } elseif ($search_sale > 0) { - $sql .= " AND EXISTS (SELECT sc.fk_soc FROM ".MAIN_DB_PREFIX."societe_commerciaux as sc WHERE sc.fk_soc = a.fk_soc AND sc.fk_user = ".((int) $search_sale).")"; + $sql .= " AND (a.fk_soc IS NULL OR EXISTS (SELECT sc.fk_soc FROM ".MAIN_DB_PREFIX."societe_commerciaux as sc WHERE sc.fk_soc = a.fk_soc AND sc.fk_user = ".((int) $search_sale)."))"; } } // Search on socid diff --git a/htdocs/comm/action/peruser.php b/htdocs/comm/action/peruser.php index e3a9b13e963..60a5a9822fe 100644 --- a/htdocs/comm/action/peruser.php +++ b/htdocs/comm/action/peruser.php @@ -762,7 +762,7 @@ if ($search_sale && $search_sale != '-1') { if ($search_sale == -2) { $sql .= " AND NOT EXISTS (SELECT sc.fk_soc FROM ".MAIN_DB_PREFIX."societe_commerciaux as sc WHERE sc.fk_soc = a.fk_soc)"; } elseif ($search_sale > 0) { - $sql .= " AND EXISTS (SELECT sc.fk_soc FROM ".MAIN_DB_PREFIX."societe_commerciaux as sc WHERE sc.fk_soc = a.fk_soc AND sc.fk_user = ".((int) $search_sale).")"; + $sql .= " AND (a.fk_soc IS NULL OR EXISTS (SELECT sc.fk_soc FROM ".MAIN_DB_PREFIX."societe_commerciaux as sc WHERE sc.fk_soc = a.fk_soc AND sc.fk_user = ".((int) $search_sale)."))"; } } // Search on socid From 4978cccc3bc60c71fc64716cfecb3fc89e870342 Mon Sep 17 00:00:00 2001 From: ThomasNgr-OpenDSI Date: Thu, 18 Jun 2026 09:19:59 +0200 Subject: [PATCH 26/38] Fix #38781 allow editing dictionary entries with rowid = 0 (ST_NEVER) (#38841) --- htdocs/admin/dict.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/admin/dict.php b/htdocs/admin/dict.php index 859ef271a85..9eab23d2835 100644 --- a/htdocs/admin/dict.php +++ b/htdocs/admin/dict.php @@ -2046,7 +2046,7 @@ if ($id > 0) { print ''; } - if ($action == 'edit' && ($rowid == (!empty($obj->rowid) ? $obj->rowid : $obj->code))) { + if ($action == 'edit' && ($rowid == (isset($obj->rowid) ? $obj->rowid : $obj->code))) { $tmpaction = 'edit'; $parameters = array('fieldlist'=>$fieldlist, 'tabname'=>$tabname[$id]); $reshook = $hookmanager->executeHooks('editDictionaryFieldlist', $parameters, $obj, $tmpaction); // Note that $action and $object may have been modified by some hooks @@ -2058,7 +2058,7 @@ if ($id > 0) { } print ''; - print '
'; + print '
'; print ''; print ''; if (!is_null($withentity)) { From 7338f2916ba0bd46054f1264d191f66475537577 Mon Sep 17 00:00:00 2001 From: Eric Seigne Date: Thu, 18 Jun 2026 09:22:21 +0200 Subject: [PATCH 27/38] missing llx prefix --- htdocs/install/mysql/migration/17.0.0-18.0.0.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/install/mysql/migration/17.0.0-18.0.0.sql b/htdocs/install/mysql/migration/17.0.0-18.0.0.sql index ae11f0f0d49..df3a09f3858 100644 --- a/htdocs/install/mysql/migration/17.0.0-18.0.0.sql +++ b/htdocs/install/mysql/migration/17.0.0-18.0.0.sql @@ -489,7 +489,7 @@ ALTER TABLE llx_partnership ADD COLUMN email_partnership varchar(64) after fk_me ALTER TABLE llx_contratdet ADD INDEX idx_contratdet_statut (statut); -ALTER TABLE product_price_product DROP FOREIGN KEY fk_product_price_product; +ALTER TABLE llx_product_price_product DROP FOREIGN KEY fk_product_price_product; ALTER TABLE llx_societe_rib ADD COLUMN ext_payment_site varchar(128); From 1145c38080ed311d9ef752d3b9d0b64b5f2c0ca7 Mon Sep 17 00:00:00 2001 From: Eric Seigne Date: Thu, 18 Jun 2026 09:29:12 +0200 Subject: [PATCH 28/38] fix table name thanks to lionel review --- htdocs/install/mysql/migration/17.0.0-18.0.0.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/install/mysql/migration/17.0.0-18.0.0.sql b/htdocs/install/mysql/migration/17.0.0-18.0.0.sql index df3a09f3858..1d4571f9b6b 100644 --- a/htdocs/install/mysql/migration/17.0.0-18.0.0.sql +++ b/htdocs/install/mysql/migration/17.0.0-18.0.0.sql @@ -489,7 +489,7 @@ ALTER TABLE llx_partnership ADD COLUMN email_partnership varchar(64) after fk_me ALTER TABLE llx_contratdet ADD INDEX idx_contratdet_statut (statut); -ALTER TABLE llx_product_price_product DROP FOREIGN KEY fk_product_price_product; +ALTER TABLE llx_product_price DROP FOREIGN KEY fk_product_price_product; ALTER TABLE llx_societe_rib ADD COLUMN ext_payment_site varchar(128); From 13f21daf3612048d4d70d91444041935673aba91 Mon Sep 17 00:00:00 2001 From: Eric Seigne Date: Thu, 18 Jun 2026 09:49:50 +0200 Subject: [PATCH 29/38] fix adherent table name --- htdocs/install/mysql/migration/22.0.0-23.0.0.sql | 2 ++ 1 file changed, 2 insertions(+) diff --git a/htdocs/install/mysql/migration/22.0.0-23.0.0.sql b/htdocs/install/mysql/migration/22.0.0-23.0.0.sql index 15b8ac1b687..45ef0555e41 100644 --- a/htdocs/install/mysql/migration/22.0.0-23.0.0.sql +++ b/htdocs/install/mysql/migration/22.0.0-23.0.0.sql @@ -451,4 +451,6 @@ CREATE TABLE llx_workstation_workstation_extrafields ALTER TABLE llx_workstation_workstation_extrafields ADD INDEX idx_workstation_workstation_extrafields (fk_object); +ALTER TABLE llx_adherent MODIFY COLUMN societe VARCHAR(128); + -- end of migration From 2653b1707afe43ba53413e5b823afa84ea2fcc07 Mon Sep 17 00:00:00 2001 From: Pichinov-Jose Date: Thu, 18 Jun 2026 09:55:17 +0200 Subject: [PATCH 30/38] FIX Multicurrency amount columns were hidden on discount screens (wrong module test) (#38825) On the third party discount tabs (htdocs/comm/remx.php), the multicurrency amount columns (MulticurrencyAmountHT / MulticurrencyAmountTTC) and their colspan adjustments were guarded by isModEnabled('multicompany') instead of isModEnabled('multicurrency'). As a result the foreign currency amounts of available and consumed discounts/down payments were never shown when the Multicurrency module is enabled (and the Multi-company module disabled). The wrong test was introduced in commit 3bb1a2387b8 (2022, 'FIX php8 compatibility') which converted !empty($conf->multicurrency->enabled) into isModEnabled('multicompany'). Restore the correct module test. Present from v17 to develop; fixed here on the oldest maintained LTS branch (18.0). --- htdocs/comm/remx.php | 40 ++++++++++++++++++++-------------------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/htdocs/comm/remx.php b/htdocs/comm/remx.php index 48755203f1a..3c9c48722d2 100644 --- a/htdocs/comm/remx.php +++ b/htdocs/comm/remx.php @@ -458,12 +458,12 @@ if ($socid > 0) { print ''.$langs->trans("ReasonDiscount").''; print ''.$langs->trans("ConsumedBy").''; print ''.$langs->trans("AmountHT").''; - if (isModEnabled('multicompany')) { + if (isModEnabled('multicurrency')) { print ''.$langs->trans("MulticurrencyAmountHT").''; } print ''.$langs->trans("VATRate").''; print ''.$langs->trans("AmountTTC").''; - if (isModEnabled('multicompany')) { + if (isModEnabled('multicurrency')) { print ''.$langs->trans("MulticurrencyAmountTTC").''; } print ''.$langs->trans("DiscountOfferedBy").''; @@ -513,12 +513,12 @@ if ($socid > 0) { print ''.price($obj->amount_ht).''; - if (isModEnabled('multicompany')) { + if (isModEnabled('multicurrency')) { print ''.price($obj->multicurrency_amount_ht).''; } print ''.vatrate($obj->tva_tx.($obj->vat_src_code ? ' ('.$obj->vat_src_code.')' : ''), true).''; print ''.price($obj->amount_ttc).''; - if (isModEnabled('multicompany')) { + if (isModEnabled('multicurrency')) { print ''.price($obj->multicurrency_amount_ttc).''; } print ''; @@ -542,7 +542,7 @@ if ($socid > 0) { } } else { $colspan = 8; - if (isModEnabled('multicompany')) { + if (isModEnabled('multicurrency')) { $colspan += 2; } print ''.$langs->trans("None").''; @@ -602,12 +602,12 @@ if ($socid > 0) { print ''.$langs->trans("ReasonDiscount").''; print ''.$langs->trans("ConsumedBy").''; print ''.$langs->trans("AmountHT").''; - if (isModEnabled('multicompany')) { + if (isModEnabled('multicurrency')) { print ''.$langs->trans("MulticurrencyAmountHT").''; } print ''.$langs->trans("VATRate").''; print ''.$langs->trans("AmountTTC").''; - if (isModEnabled('multicompany')) { + if (isModEnabled('multicurrency')) { print ''.$langs->trans("MulticurrencyAmountTTC").''; } print ''.$langs->trans("DiscountOfferedBy").''; @@ -652,12 +652,12 @@ if ($socid > 0) { } print ''.$langs->trans("NotConsumed").''; print ''.price($obj->amount_ht).''; - if (isModEnabled('multicompany')) { + if (isModEnabled('multicurrency')) { print ''.price($obj->multicurrency_amount_ht).''; } print ''.vatrate($obj->tva_tx.($obj->vat_src_code ? ' ('.$obj->vat_src_code.')' : ''), true).''; print ''.price($obj->amount_ttc).''; - if (isModEnabled('multicompany')) { + if (isModEnabled('multicurrency')) { print ''.price($obj->multicurrency_amount_ttc).''; } print ''; @@ -681,7 +681,7 @@ if ($socid > 0) { } } else { $colspan = 8; - if (isModEnabled('multicompany')) { + if (isModEnabled('multicurrency')) { $colspan += 2; } print ''.$langs->trans("None").''; @@ -775,12 +775,12 @@ if ($socid > 0) { print ''.$langs->trans("ReasonDiscount").''; print ''.$langs->trans("ConsumedBy").''; print ''.$langs->trans("AmountHT").''; - if (isModEnabled('multicompany')) { + if (isModEnabled('multicurrency')) { print ''.$langs->trans("MulticurrencyAmountHT").''; } print ''.$langs->trans("VATRate").''; print ''.$langs->trans("AmountTTC").''; - if (isModEnabled('multicompany')) { + if (isModEnabled('multicurrency')) { print ''.$langs->trans("MulticurrencyAmountTTC").''; } print ''.$langs->trans("Author").''; @@ -848,12 +848,12 @@ if ($socid > 0) { } print ''; print ''.price($obj->amount_ht).''; - if (isModEnabled('multicompany')) { + if (isModEnabled('multicurrency')) { print ''.price($obj->multicurrency_amount_ht).''; } print ''.vatrate($obj->tva_tx.($obj->vat_src_code ? ' ('.$obj->vat_src_code.')' : ''), true).''; print ''.price($obj->amount_ttc).''; - if (isModEnabled('multicompany')) { + if (isModEnabled('multicurrency')) { print ''.price($obj->multicurrency_amount_ttc).''; } print ''; @@ -865,7 +865,7 @@ if ($socid > 0) { } } else { $colspan = 8; - if (isModEnabled('multicompany')) { + if (isModEnabled('multicurrency')) { $colspan += 2; } print ''.$langs->trans("None").''; @@ -936,12 +936,12 @@ if ($socid > 0) { print ''.$langs->trans("ReasonDiscount").''; print ''.$langs->trans("ConsumedBy").''; print ''.$langs->trans("AmountHT").''; - if (isModEnabled('multicompany')) { + if (isModEnabled('multicurrency')) { print ''.$langs->trans("MulticurrencyAmountHT").''; } print ''.$langs->trans("VATRate").''; print ''.$langs->trans("AmountTTC").''; - if (isModEnabled('multicompany')) { + if (isModEnabled('multicurrency')) { print ''.$langs->trans("MulticurrencyAmountTTC").''; } print ''.$langs->trans("Author").''; @@ -1009,12 +1009,12 @@ if ($socid > 0) { } print ''; print ''.price($obj->amount_ht).''; - if (isModEnabled('multicompany')) { + if (isModEnabled('multicurrency')) { print ''.price($obj->multicurrency_amount_ht).''; } print ''.vatrate($obj->tva_tx.($obj->vat_src_code ? ' ('.$obj->vat_src_code.')' : ''), true).''; print ''.price($obj->amount_ttc).''; - if (isModEnabled('multicompany')) { + if (isModEnabled('multicurrency')) { print ''.price($obj->multicurrency_amount_ttc).''; } print ''; @@ -1026,7 +1026,7 @@ if ($socid > 0) { } } else { $colspan = 8; - if (isModEnabled('multicompany')) { + if (isModEnabled('multicurrency')) { $colspan += 2; } print ''.$langs->trans("None").''; From 818c31bb285f26f247fece38e3f0d27739c5c983 Mon Sep 17 00:00:00 2001 From: w3houde Date: Fri, 19 Jun 2026 02:51:48 +0200 Subject: [PATCH 31/38] Fix #34927 allow returning to floor 0 in TakePOS Bar/Restaurant (#38893) floors.php hid the previous-floor arrow as soon as floor was 1 ("if ($floor > 1)"), and the click-handler also fell back to 1 instead of decrementing past it, so users could never get back to floor 0 once they navigated away. Lower both thresholds to "$floor > 0" so the arrow stays visible at floor 1 and decrements to 0. Signed-off-by: Dolicraft Co-authored-by: Dolicraft --- htdocs/takepos/floors.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/htdocs/takepos/floors.php b/htdocs/takepos/floors.php index e26369e97a8..d249de6cea5 100644 --- a/htdocs/takepos/floors.php +++ b/htdocs/takepos/floors.php @@ -238,13 +238,13 @@ $( document ).ready(function() {

- 1) { ?> - ';"> trans("Floor")." ".$floor; ?> From c33e4f8365f7a371288d4a6555f97bf1a71f32c1 Mon Sep 17 00:00:00 2001 From: w3houde Date: Fri, 19 Jun 2026 03:09:52 +0200 Subject: [PATCH 32/38] Fix #36800 do not crash syslog admin page on stale handler files (#38890) If old mod_syslog_chromephp.php / mod_syslog_firephp.php / logHandlerInterface.php files are left over from a v9 install (e.g. when files were not cleaned by upgrade2), their require_once or constructor breaks the admin/syslog.php page silently. Wrap the handler load in a try/catch with a class_exists guard so the page keeps listing the working handlers and just logs a warning for stale files. Signed-off-by: Dolicraft Co-authored-by: Dolicraft --- htdocs/admin/syslog.php | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/htdocs/admin/syslog.php b/htdocs/admin/syslog.php index 24ec3b36b15..535be15de2a 100644 --- a/htdocs/admin/syslog.php +++ b/htdocs/admin/syslog.php @@ -69,10 +69,19 @@ foreach ($dirsyslogs as $reldir) { if (substr($file, 0, 11) == 'mod_syslog_' && substr($file, dol_strlen($file) - 3, 3) == 'php') { $file = substr($file, 0, dol_strlen($file) - 4); - require_once $newdir.$file.'.php'; + try { + require_once $newdir.$file.'.php'; - $module = new $file(); - '@phan-var-force LogHandler $module'; + if (!class_exists($file)) { + dol_syslog('admin/syslog.php skipping stale handler '.$file.' (class not declared)', LOG_WARNING); + continue; + } + $module = new $file(); + '@phan-var-force LogHandler $module'; + } catch (Throwable $e) { + dol_syslog('admin/syslog.php skipping stale handler '.$file.': '.$e->getMessage(), LOG_WARNING); + continue; + } // Show modules according to features level if ($module->getVersion() == 'development' && getDolGlobalInt('MAIN_FEATURES_LEVEL') < 2) { From 57e3c37162befcf4f70b40523b8903892d3a2dce Mon Sep 17 00:00:00 2001 From: w3houde Date: Fri, 19 Jun 2026 03:13:04 +0200 Subject: [PATCH 33/38] Fix #38863 enforce takepos editlines permission on delete-line button (#38889) The trash button in takepos index.php was rendered without server-side check, and the deleteline action in invoice.php only required 'takepos > run' which every POS user has. Wrap the button with hasRight('takepos','editlines') and tighten the action guard, so users without the edit-lines permission can no longer remove ticket lines from the keypad before validation. Signed-off-by: Dolicraft Co-authored-by: Dolicraft --- htdocs/takepos/index.php | 2 ++ htdocs/takepos/invoice.php | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/htdocs/takepos/index.php b/htdocs/takepos/index.php index 13894b8f0b5..40d59b29c7d 100644 --- a/htdocs/takepos/index.php +++ b/htdocs/takepos/index.php @@ -1356,7 +1356,9 @@ if (!getDolGlobalString('TAKEPOS_HIDE_HEAD_BAR')) { + hasRight('takepos', 'editlines')) { ?> +

fetch($placeid); } - if ($action == "deleteline" && ($user->hasRight('takepos', 'run') || defined('INCLUDE_PHONEPAGE_FROM_PUBLIC_PAGE'))) { + if ($action == "deleteline" && ($user->hasRight('takepos', 'editlines') || defined('INCLUDE_PHONEPAGE_FROM_PUBLIC_PAGE'))) { /* $permissiontoupdateline = ($user->hasRight('takepos', 'editlines') && ($user->hasRight('takepos', 'editorderedlines') || $line->special_code != "4")); if (defined('INCLUDE_PHONEPAGE_FROM_PUBLIC_PAGE')) { From f66179a381823f6725457a9b4662c28265162f90 Mon Sep 17 00:00:00 2001 From: w3houde Date: Fri, 19 Jun 2026 03:13:46 +0200 Subject: [PATCH 34/38] Fix #36312 refuse to set a category as its own parent (#38891) llx_categorie.fk_parent had no application-level guard against fk_parent = rowid, so a stray UPDATE (or future code path) could set a category as its own parent and break the recursive tree walk in get_full_arbo / get_filles. Reject the case at the start of Categorie::update() with a translated error and a syslog warning. Signed-off-by: Dolicraft Co-authored-by: Dolicraft --- htdocs/categories/class/categorie.class.php | 7 +++++++ htdocs/langs/en_US/categories.lang | 1 + 2 files changed, 8 insertions(+) diff --git a/htdocs/categories/class/categorie.class.php b/htdocs/categories/class/categorie.class.php index aa102c0683f..6c597200dce 100644 --- a/htdocs/categories/class/categorie.class.php +++ b/htdocs/categories/class/categorie.class.php @@ -677,6 +677,13 @@ class Categorie extends CommonObject $this->fk_parent = ($this->fk_parent != "" ? intval($this->fk_parent) : 0); $this->visible = ($this->visible != "" ? intval($this->visible) : 0); + if ($this->fk_parent > 0 && $this->fk_parent == $this->id) { + $langs->load('categories'); + $this->error = $langs->trans("ErrorCategoryCannotBeItsOwnParent"); + dol_syslog($this->error, LOG_WARNING); + return -1; + } + if ($this->already_exists()) { $this->error = $langs->trans("ImpossibleUpdateCat"); $this->error .= " : ".$langs->trans("CategoryExistsAtSameLevel"); diff --git a/htdocs/langs/en_US/categories.lang b/htdocs/langs/en_US/categories.lang index 06d7c7a92a8..bbd37a8ed48 100644 --- a/htdocs/langs/en_US/categories.lang +++ b/htdocs/langs/en_US/categories.lang @@ -21,6 +21,7 @@ NoSubCat=No subcategory. SubCatOf=Subcategory FoundCats=Found tags/categories ImpossibleAddCat=Impossible to add the tag/category %s +ErrorCategoryCannotBeItsOwnParent=A tag/category cannot be its own parent. WasAddedSuccessfully=%s was added successfully. ObjectAlreadyLinkedToCategory=Element is already linked to this tag/category. ProductIsInCategories=Product/service is linked to following tags/categories From e7bd664590c0505e1da0c06990317c9bc96b3dea Mon Sep 17 00:00:00 2001 From: w3houde Date: Fri, 19 Jun 2026 03:16:31 +0200 Subject: [PATCH 35/38] Fix #38857 keep html links and block tags in ticket mail intro/signature (#38888) The reply form serializes TICKET_MESSAGE_MAIL_INTRO and TICKET_MESSAGE_MAIL_SIGNATURE through dolPrintHTMLForAttribute() which only allows br/b/font/hr/span, so anchors, divs and strong are stripped before the email is sent. Pass an extended whitelist for these two hidden transport inputs so admin formatted footers and intros survive. Signed-off-by: Dolicraft Co-authored-by: Dolicraft --- htdocs/core/class/html.formticket.class.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/htdocs/core/class/html.formticket.class.php b/htdocs/core/class/html.formticket.class.php index 4109ec9cbcc..5f9ff3d5e2a 100644 --- a/htdocs/core/class/html.formticket.class.php +++ b/htdocs/core/class/html.formticket.class.php @@ -1866,14 +1866,15 @@ class FormTicket if (getDolGlobalString('TICKET_MESSAGE_MAIL_INTRO') || getDolGlobalString('TICKET_MESSAGE_MAIL_SIGNATURE')) { $texttooltip .= '

'.$langs->trans("ForEmailMessageWillBeCompletedWith").'...'; } + $allowedmailtags = array('a', 'div', 'strong', 'em', 'i', 'u', 'p', 'ul', 'ol', 'li', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'img'); if (getDolGlobalString('TICKET_MESSAGE_MAIL_INTRO')) { $mail_intro = make_substitutions(getDolGlobalString('TICKET_MESSAGE_MAIL_INTRO'), $this->substit); - print ''; + print ''; $texttooltip .= '
'.$langs->trans("TicketMessageMailIntro").'
'.$mail_intro; } if (getDolGlobalString('TICKET_MESSAGE_MAIL_SIGNATURE')) { $mail_signature = make_substitutions(getDolGlobalString('TICKET_MESSAGE_MAIL_SIGNATURE'), $this->substit); - print ''; + print ''; $texttooltip .= '

'.$langs->trans("TicketMessageMailFooter").'
'.$mail_signature; } print $form->textwithpicto('', $texttooltip, 1, 'help'); From 9c57cfee5fbaab31d3faadd947a7f942036ff55d Mon Sep 17 00:00:00 2001 From: w3houde Date: Fri, 19 Jun 2026 03:17:48 +0200 Subject: [PATCH 36/38] Fix #38869 load line extrafields in SupplierProposal::fetch and getLinesArray (#38887) Signed-off-by: Dolicraft Co-authored-by: Dolicraft --- htdocs/supplier_proposal/class/supplier_proposal.class.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/htdocs/supplier_proposal/class/supplier_proposal.class.php b/htdocs/supplier_proposal/class/supplier_proposal.class.php index 819657f9c95..c5493b6cd5c 100644 --- a/htdocs/supplier_proposal/class/supplier_proposal.class.php +++ b/htdocs/supplier_proposal/class/supplier_proposal.class.php @@ -1449,6 +1449,8 @@ class SupplierProposal extends CommonObject $line->multicurrency_total_ttc = $objp->multicurrency_total_ttc; $line->fk_unit = $objp->fk_unit; + $line->fetch_optionals(); + $this->lines[$i] = $line; $i++; @@ -2793,6 +2795,8 @@ class SupplierProposal extends CommonObject $this->lines[$i]->fk_unit = $obj->fk_unit; $this->lines[$i]->extraparams = !empty($obj->extraparams) ? (array) json_decode($obj->extraparams, true) : array(); + $this->lines[$i]->fetch_optionals(); + $i++; } $this->db->free($resql); From 1b4ece48e2314e621f819e5ac64017c878a74e5f Mon Sep 17 00:00:00 2001 From: Eric - CAP-REL <1468823+rycks@users.noreply.github.com> Date: Fri, 19 Jun 2026 03:19:40 +0200 Subject: [PATCH 37/38] fix adherent table name (#38871) --- htdocs/install/mysql/migration/18.0.0-19.0.0.sql | 2 ++ 1 file changed, 2 insertions(+) diff --git a/htdocs/install/mysql/migration/18.0.0-19.0.0.sql b/htdocs/install/mysql/migration/18.0.0-19.0.0.sql index 36259f40cfc..a6918580a4f 100644 --- a/htdocs/install/mysql/migration/18.0.0-19.0.0.sql +++ b/htdocs/install/mysql/migration/18.0.0-19.0.0.sql @@ -234,3 +234,5 @@ UPDATE llx_menu SET url = CONCAT(url, '&mode=init') WHERE fk_mainmenu = 'ticket' -- VMYSQL4.1 ALTER TABLE llx_asset_depreciation_options_economic MODIFY COLUMN accelerated_depreciation_option boolean DEFAULT false; -- VPGSQL8.2 ALTER TABLE llx_asset ALTER COLUMN llx_asset_depreciation_options_economic DROP DEFAULT, ALTER COLUMN llx_asset_depreciation_options_economic TYPE boolean USING llx_asset_depreciation_options_economic::integer <> 0, ALTER COLUMN llx_asset_depreciation_options_economic SET DEFAULT false; + +ALTER TABLE llx_adherent MODIFY COLUMN societe VARCHAR(128); From c72af785c998bdbec7869554479e08a9bfceeb21 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 19 Jun 2026 03:22:18 +0200 Subject: [PATCH 38/38] Fix ci --- htdocs/user/card.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/user/card.php b/htdocs/user/card.php index 6fae6e7bd8d..ad85cbdd624 100644 --- a/htdocs/user/card.php +++ b/htdocs/user/card.php @@ -444,7 +444,7 @@ if (empty($reshook)) { $object->pass = GETPOST("password", 'none'); // We can keep 'none' for password fields } if ($caneditpasswordandsee || $user->hasRight("api", "apikey", "generate")) { - $object->api_key = (GETPOSTISSET("api_key", 'alphanohtml')) ? GETPOST("api_key", 'alphanohtml') : $object->api_key; + $object->api_key = (GETPOSTISSET("api_key") ? GETPOST("api_key", 'alphanohtml') : $object->api_key); } if (!empty($user->admin) && $user->id != $id) { // admin flag can only be set/unset by an admin user and not four ourself