From 87f81fb853053e1e685287d62da78f6d89df7715 Mon Sep 17 00:00:00 2001 From: atm-lucas <121817516+atm-lucasmantegari@users.noreply.github.com> Date: Sat, 31 Jan 2026 20:26:31 +0100 Subject: [PATCH 01/11] fix column total ht pdf espadon (#37038) --- .../core/modules/expedition/doc/pdf_espadon.modules.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/htdocs/core/modules/expedition/doc/pdf_espadon.modules.php b/htdocs/core/modules/expedition/doc/pdf_espadon.modules.php index 51ea1be8f41..5719dd2ac37 100644 --- a/htdocs/core/modules/expedition/doc/pdf_espadon.modules.php +++ b/htdocs/core/modules/expedition/doc/pdf_espadon.modules.php @@ -737,6 +737,11 @@ class pdf_espadon extends ModelePdfExpedition $nexY = max($pdf->GetY(), $nexY); } + if ($this->getColumnStatus('totalexcltax') && $object->lines[$i]->special_code != SUBTOTALS_SPECIAL_CODE) { + $this->printStdColumnContent($pdf, $curY, 'totalexcltax', price($object->lines[$i]->total_ht, 0, $outputlangs)); + $nexY = max($pdf->GetY(), $nexY); + } + // Extrafields if (!empty($object->lines[$i]->array_options) && $object->lines[$i]->special_code != SUBTOTALS_SPECIAL_CODE) { foreach ($object->lines[$i]->array_options as $extrafieldColKey => $extrafieldValue) { @@ -951,8 +956,8 @@ class pdf_espadon extends ModelePdfExpedition $this->printStdColumnContent($pdf, $tab2_top, 'qty_shipped', $totalToShip); } - if ($this->getColumnStatus('subprice')) { - $this->printStdColumnContent($pdf, $tab2_top, 'subprice', price($object->total_ht, 0, $outputlangs)); + if ($this->getColumnStatus('totalexcltax')) { + $this->printStdColumnContent($pdf, $tab2_top, 'totalexcltax', price($object->total_ht, 0, $outputlangs)); } $pdf->SetTextColor(0, 0, 0); From e2aed0f5c1af7cf2085e1b84a384e266772cbc11 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benjamin=20Fali=C3=A8re?= <121813548+BenjaminFlr@users.noreply.github.com> Date: Wed, 4 Feb 2026 14:41:29 +0100 Subject: [PATCH 02/11] FIX: #36989 private mention on ticket pdf (#37079) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Benjamin Falière --- htdocs/core/lib/functions.lib.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index 5819c914b67..d4d4ec2332d 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -25,6 +25,7 @@ * Copyright (C) 2024 Lenin Rivas * Copyright (C) 2024 Josep Lluís Amador Teruel * Copyright (C) 2024 Benoît PASCAL + * Copyright (C) 2026 Benjamin Falière * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -15583,10 +15584,11 @@ function show_actions_messaging($conf, $langs, $db, $filterobj, $objcon = null, } $libelle = ''; - if (!empty($actionstatic->code) && preg_match('/^TICKET_MSG/', $actionstatic->code)) { - $out .= $langs->trans('TicketNewMessage'); - } elseif (!empty($actionstatic->code) && preg_match('/^TICKET_MSG_PRIVATE/', $actionstatic->code)) { + + if (!empty($actionstatic->code) && preg_match('/^TICKET_MSG_PRIVATE/', $actionstatic->code)) { $out .= $langs->trans('TicketNewMessage').' ('.$langs->trans('Private').')'; + } elseif (!empty($actionstatic->code) && preg_match('/^TICKET_MSG/', $actionstatic->code)) { + $out .= $langs->trans('TicketNewMessage'); } elseif (isset($histo[$key]['type'])) { if ($histo[$key]['type'] == 'action') { $transcode = $langs->transnoentitiesnoconv("Action".$histo[$key]['acode']); From 6ce11adba1612518b891b869690957806036f9fe Mon Sep 17 00:00:00 2001 From: Francis Appels Date: Wed, 4 Feb 2026 21:22:59 +0100 Subject: [PATCH 03/11] FIX: #36944 father kits with lot (#37089) --- htdocs/expedition/card.php | 10 +++++----- htdocs/expedition/class/expedition.class.php | 8 ++++---- htdocs/expedition/dispatch.php | 2 +- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/htdocs/expedition/card.php b/htdocs/expedition/card.php index c6eea93b1b1..fdd19e0bb2b 100644 --- a/htdocs/expedition/card.php +++ b/htdocs/expedition/card.php @@ -1344,7 +1344,7 @@ if ($action == 'create') { if ($res < 0) { dol_print_error($db, $product->error, $product->errors); } - if (getDolGlobalInt('PRODUIT_SOUSPRODUITS')) { + if (getDolGlobalInt('PRODUIT_SOUSPRODUITS') && !getDolGlobalInt('PRODUIT_SOUSPRODUITS_ALSO_ENABLE_PARENT_STOCK_MOVE')) { $productChildrenNb = $product->hasFatherOrChild(1); } if ($productChildrenNb > 0) { @@ -1549,13 +1549,13 @@ if ($action == 'create') { $subj = 0; // Define nb of lines suggested for this order line $nbofsuggested = 0; - if (is_object($product->stock_warehouse[$warehouse_id]) && count($product->stock_warehouse[$warehouse_id]->detail_batch)) { + if (is_object($product->stock_warehouse[$warehouse_id]) && !empty($product->stock_warehouse[$warehouse_id]->detail_batch)) { foreach ($product->stock_warehouse[$warehouse_id]->detail_batch as $dbatch) { $nbofsuggested++; } } print ''; - if (is_object($product->stock_warehouse[$warehouse_id]) && count($product->stock_warehouse[$warehouse_id]->detail_batch)) { + if (is_object($product->stock_warehouse[$warehouse_id]) && !empty($product->stock_warehouse[$warehouse_id]->detail_batch)) { foreach ($product->stock_warehouse[$warehouse_id]->detail_batch as $dbatch) { // $dbatch is instance of Productbatch //var_dump($dbatch); $batchStock = + $dbatch->qty; // To get a numeric @@ -1797,7 +1797,7 @@ if ($action == 'create') { // Define nb of lines suggested for this order line $nbofsuggested = 0; foreach ($product->stock_warehouse as $warehouse_id => $stock_warehouse) { - if (($stock_warehouse->real > 0 || !getDolGlobalInt('STOCK_DISALLOW_NEGATIVE_TRANSFER')) && (count($stock_warehouse->detail_batch))) { + if (($stock_warehouse->real > 0 || !getDolGlobalInt('STOCK_DISALLOW_NEGATIVE_TRANSFER')) && (!empty($stock_warehouse->detail_batch))) { $nbofsuggested += count($stock_warehouse->detail_batch); } } @@ -1810,7 +1810,7 @@ if ($action == 'create') { } $tmpwarehouseObject->fetch($warehouse_id); - if (($stock_warehouse->real > 0 || !getDolGlobalInt('STOCK_DISALLOW_NEGATIVE_TRANSFER')) && (count($stock_warehouse->detail_batch))) { + if (($stock_warehouse->real > 0 || !getDolGlobalInt('STOCK_DISALLOW_NEGATIVE_TRANSFER')) && (!empty($stock_warehouse->detail_batch))) { foreach ($stock_warehouse->detail_batch as $dbatch) { $batchStock = + $dbatch->qty; // To get a numeric if (isset($alreadyQtyBatchSetted[$line->fk_product][$dbatch->batch][intval($warehouse_id)])) { diff --git a/htdocs/expedition/class/expedition.class.php b/htdocs/expedition/class/expedition.class.php index f8886ade5d0..359eb71735c 100644 --- a/htdocs/expedition/class/expedition.class.php +++ b/htdocs/expedition/class/expedition.class.php @@ -547,7 +547,7 @@ class Expedition extends CommonObject if (empty($line->product_type) || getDolGlobalString('STOCK_SUPPORTS_SERVICES') || getDolGlobalString('SHIPMENT_SUPPORTS_SERVICES')) { $line_id = 0; if (!isset($kits_id_cached[$line->fk_product])) { - if (!isset($line->detail_batch) || isset($kits_list[$line->fk_product])) { // no batch management or is kit + if (!isset($line->detail_batch) || (isset($kits_list[$line->fk_product]) && !getDolGlobalInt('PRODUIT_SOUSPRODUITS_ALSO_ENABLE_PARENT_STOCK_MOVE'))) { // no batch management or is kit $qty = isset($kits_list[$line->fk_product]) ? $kits_list[$line->fk_product]['total_qty'] : $line->qty; $warehouse_id = isset($kits_list[$line->fk_product]) ? 0 : $line->entrepot_id; $line_id = $this->create_line($warehouse_id, $line->origin_line_id, $qty, $line->rang, $line->array_options, 0, $line->fk_product); @@ -626,7 +626,7 @@ class Expedition extends CommonObject // create line for a child of virtual product if (!isset($sub_kits_id_cached[$product_child_id]) || $warehouse_id > 0) { - $line_id = $this->create_line($warehouse_id, 0, $product_child_qty, $line->rang, $line->array_options, $parent_line_id, $product_child_id); + $line_id = $this->create_line($warehouse_id, $line->origin_line_id, $product_child_qty, $line->rang, $line->array_options, $parent_line_id, $product_child_id); if ($line_id <= 0) { $error++; dol_syslog(__METHOD__ . ' : ' . $this->errorsToString(), LOG_ERR); @@ -1557,7 +1557,7 @@ class Expedition extends CommonObject $obj = $this->db->fetch_object($resql); $line_id = (int) $obj->expeditiondet_id; - if ($can_update_stock && empty($obj->iskit) && !empty($obj->incdec)) { + if ($can_update_stock && (empty($obj->iskit) || getDolGlobalInt('PRODUIT_SOUSPRODUITS_ALSO_ENABLE_PARENT_STOCK_MOVE')) && !empty($obj->incdec)) { $mouvS = new MouvementStock($this->db); // we do not log origin because it will be deleted $mouvS->origin = ''; @@ -1767,7 +1767,7 @@ class Expedition extends CommonObject $obj = $this->db->fetch_object($resql); $line_id = (int) $obj->expeditiondet_id; - if ($can_update_stock && empty($obj->iskit) && !empty($obj->incdec)) { + if ($can_update_stock && (empty($obj->iskit) || getDolGlobalInt('PRODUIT_SOUSPRODUITS_ALSO_ENABLE_PARENT_STOCK_MOVE')) && !empty($obj->incdec)) { $mouvS = new MouvementStock($this->db); // we do not log origin because it will be deleted $mouvS->origin = ''; diff --git a/htdocs/expedition/dispatch.php b/htdocs/expedition/dispatch.php index d8a6f389693..3e47bcd48ea 100644 --- a/htdocs/expedition/dispatch.php +++ b/htdocs/expedition/dispatch.php @@ -908,7 +908,7 @@ if ($object->id > 0 || !empty($object->ref)) { $resql_child = $db->query($sql_child); if ($resql_child) { if ($child_obj = $db->fetch_object($resql_child)) { - $line_obj->iskit = (int) $child_obj->iskit; + if (!getDolGlobalInt('PRODUIT_SOUSPRODUITS_ALSO_ENABLE_PARENT_STOCK_MOVE')) $line_obj->iskit = (int) $child_obj->iskit; if ($can_manage_stock) { $line_obj->incdec = (int) $child_obj->incdec; // reset value to 0 or 1 if stock can be managed } From 7eae776e13e0b3e73bc19545c7980c4a010cc705 Mon Sep 17 00:00:00 2001 From: Francis Appels Date: Sat, 7 Feb 2026 23:28:36 +0100 Subject: [PATCH 04/11] Fix #37089, still some checks on PRODUIT_SOUSPRODUITS_ALSO_ENABLE_PARENT_STOCK_MOVE (#37115) --- htdocs/expedition/class/expedition.class.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/htdocs/expedition/class/expedition.class.php b/htdocs/expedition/class/expedition.class.php index 359eb71735c..e8401ba50c4 100644 --- a/htdocs/expedition/class/expedition.class.php +++ b/htdocs/expedition/class/expedition.class.php @@ -549,7 +549,7 @@ class Expedition extends CommonObject if (!isset($kits_id_cached[$line->fk_product])) { if (!isset($line->detail_batch) || (isset($kits_list[$line->fk_product]) && !getDolGlobalInt('PRODUIT_SOUSPRODUITS_ALSO_ENABLE_PARENT_STOCK_MOVE'))) { // no batch management or is kit $qty = isset($kits_list[$line->fk_product]) ? $kits_list[$line->fk_product]['total_qty'] : $line->qty; - $warehouse_id = isset($kits_list[$line->fk_product]) ? 0 : $line->entrepot_id; + $warehouse_id = (isset($kits_list[$line->fk_product]) && !getDolGlobalInt('PRODUIT_SOUSPRODUITS_ALSO_ENABLE_PARENT_STOCK_MOVE')) ? 0 : $line->entrepot_id; $line_id = $this->create_line($warehouse_id, $line->origin_line_id, $qty, $line->rang, $line->array_options, 0, $line->fk_product); if ($line_id <= 0) { $error++; @@ -565,7 +565,7 @@ class Expedition extends CommonObject } // virtual products - if (isset($kits_list[$line->fk_product])) { + if (isset($kits_list[$line->fk_product]) && !getDolGlobalInt('PRODUIT_SOUSPRODUITS_ALSO_ENABLE_PARENT_STOCK_MOVE')) { $prods_arbo = $kits_list[$line->fk_product]['arbo']; $total_qty = $kits_list[$line->fk_product]['total_qty']; @@ -626,7 +626,7 @@ class Expedition extends CommonObject // create line for a child of virtual product if (!isset($sub_kits_id_cached[$product_child_id]) || $warehouse_id > 0) { - $line_id = $this->create_line($warehouse_id, $line->origin_line_id, $product_child_qty, $line->rang, $line->array_options, $parent_line_id, $product_child_id); + $line_id = $this->create_line($warehouse_id, ($parent_line_id ? 0 : $line->origin_line_id), $product_child_qty, $line->rang, $line->array_options, $parent_line_id, $product_child_id); if ($line_id <= 0) { $error++; dol_syslog(__METHOD__ . ' : ' . $this->errorsToString(), LOG_ERR); From 6ef62a45b5a458dd6f6a3ac140e51f57e78714cc Mon Sep 17 00:00:00 2001 From: Anthony Berton <34568357+BB2A-Anthony@users.noreply.github.com> Date: Sat, 7 Feb 2026 23:44:57 +0100 Subject: [PATCH 05/11] FIX - getModuleDirForApiClass for propal (#37098) Co-authored-by: Anthony Berton --- htdocs/core/lib/functions2.lib.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/lib/functions2.lib.php b/htdocs/core/lib/functions2.lib.php index e8b7e51efff..f825f5be8bd 100644 --- a/htdocs/core/lib/functions2.lib.php +++ b/htdocs/core/lib/functions2.lib.php @@ -2752,7 +2752,7 @@ function getModuleDirForApiClass($moduleobject) $moduledirforclass = 'api'; } elseif ($moduleobject == 'contact' || $moduleobject == 'contacts' || $moduleobject == 'customer' || $moduleobject == 'thirdparty' || $moduleobject == 'thirdparties') { $moduledirforclass = 'societe'; - } elseif ($moduleobject == 'propale' || $moduleobject == 'proposals') { + } elseif ($moduleobject == 'propal' || $moduleobject == 'propale' || $moduleobject == 'proposals') { $moduledirforclass = 'comm/propal'; } elseif ($moduleobject == 'agenda' || $moduleobject == 'agendaevents') { $moduledirforclass = 'comm/action'; From 3361d4b0bac39a489523fd3a359b7e0adbb95452 Mon Sep 17 00:00:00 2001 From: Joachim Kueter Date: Sun, 8 Feb 2026 00:04:45 +0100 Subject: [PATCH 06/11] Fix: auto-generate pdf from odt-templates also for not yet validatedocuments (#37082) * Fix: auto-generate pdf from odt-templates also for not yet validated documents Not validated documents have a ref containing (PROV When auto-generating pdf documents from odt documents is activated, this fails for not validated documents: the brackets ( ) in the ref are getting escaped twice which leads the pdf generation to fail. The change removes the double escaping, the$command is already escaped before. With this change, also for unvalidated documents, pdf documents are getting generated. * replace ( ) for escapeshellcmd temporarily replace ( ) by placeholders to avoid them getting escaped check that no placeholder injection happened before apply to both execmethods (1 and 2) * Retrigger check --- htdocs/includes/odtphp/odf.php | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/htdocs/includes/odtphp/odf.php b/htdocs/includes/odtphp/odf.php index 9f0f5d6899f..98355ecb488 100644 --- a/htdocs/includes/odtphp/odf.php +++ b/htdocs/includes/odtphp/odf.php @@ -99,7 +99,7 @@ class Odf * Class constructor * * @param string $filename The name of the odt file - * @param array $config Array of config data + * @param array $config Array of config data * @throws OdfException */ public function __construct($filename, $config = array()) @@ -953,9 +953,23 @@ IMG; // $result = $utils->executeCLI($command, $outputfile); and replace test on $execmethod. // $retval will be $result['result'] // $errorstring will be $result['output'] + + // Protect parentheses from being double-escaped by escapeshellcmd(). + // The $command is already built with escapeshellarg() for all arguments, + // but escapeshellcmd() escapes parentheses inside quoted strings, breaking + // filenames like "(PROV35)_invoice.odt" for draft invoices. + // Security: reject if placeholder strings already exist to prevent injection. + if (strpos($command, '__PARENTHESIS_OPEN__') !== false || strpos($command, '__PARENTHESIS_CLOSE__') !== false) { + dol_syslog(get_class($this).'::exportAsAttachedPDF Invalid characters in command path: '.$command, LOG_WARNING); + throw new OdfException('Invalid characters in command path'); + } + $commandprotected = str_replace(array('(', ')'), array('__PARENTHESIS_OPEN__', '__PARENTHESIS_CLOSE__'), $command); + $commandescaped = escapeshellcmd($commandprotected); + $commandtoexec = str_replace(array('__PARENTHESIS_OPEN__', '__PARENTHESIS_CLOSE__'), array('(', ')'), $commandescaped); + $retval=0; $output_arr=array(); if ($execmethod == 1) { - exec(escapeshellcmd($command), $output_arr, $retval); + exec($commandtoexec, $output_arr, $retval); } if ($execmethod == 2) { $outputfile = DOL_DATA_ROOT.'/odt2pdf.log'; @@ -963,9 +977,9 @@ IMG; $handle = fopen($outputfile, 'w'); if ($handle) { dol_syslog(get_class($this)."Run command ".$command, LOG_DEBUG); - dol_syslog(get_class($this)."escapeshellcmd(command) = ".escapeshellcmd($command), LOG_DEBUG); + dol_syslog(get_class($this)."escapeshellcmd(command) = ".$commandtoexec, LOG_DEBUG); fwrite($handle, $command."\n"); - $handlein = popen(escapeshellcmd($command), 'r'); + $handlein = popen($commandtoexec, 'r'); while (!feof($handlein)) { $read = fgets($handlein); fwrite($handle, $read); From 08040ec30e089b2877131a06118f4a0b8aee2e94 Mon Sep 17 00:00:00 2001 From: DarmonNoah <152853486+DarmonNoah@users.noreply.github.com> Date: Sun, 8 Feb 2026 00:00:12 +0100 Subject: [PATCH 07/11] Fixed Bug : email sending test #36741 (#37107) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixed Bug : email sending test #36741 @defrance --> Issue fixed The problem was caused by initializing $result = 0 in core/actions_sendmails.inc.php. When sending a test email from Setup → Emails, there is no $object to fetch. As a result, $result remained 0 and the code incorrectly triggered ErrorFailedToReadObject. The fix consists in explicitly setting $result = 1 when no $object is provided (test email / generic email context). This correctly treats the absence of an object as a valid case and restores the ability to send test emails, while keeping $result properly initialized. Co-authored-by: Laurent Destailleur --- htdocs/core/actions_sendmails.inc.php | 1 + 1 file changed, 1 insertion(+) diff --git a/htdocs/core/actions_sendmails.inc.php b/htdocs/core/actions_sendmails.inc.php index d6cc082fd7a..8bd0321bb77 100644 --- a/htdocs/core/actions_sendmails.inc.php +++ b/htdocs/core/actions_sendmails.inc.php @@ -189,6 +189,7 @@ if (($action == 'send' || $action == 'relance') && !GETPOST('addfile') && !GETPO } } else { $thirdparty = $mysoc; + $result = 1; // No object to fetch (e.g. Setup -> Emails -> send test email): consider OK } if ($result > 0) { From 79ba81a75d0d5aa01534c501c0551f130ee9d4ce Mon Sep 17 00:00:00 2001 From: adamhocini <72007447+adamhocini@users.noreply.github.com> Date: Sat, 7 Feb 2026 23:58:14 +0100 Subject: [PATCH 08/11] Correct linked_objects assignment for 'propal' #Wrong sourcetype 'commande' instead of 'propal' when creating recurring invoice template from invoice linked to proposal #37099 @defrance (#37112) * Correct linked_objects assignment for 'propal' @defrance Adam Hocini * Refactor linked objects assignment for proposals --------- Co-authored-by: Laurent Destailleur --- htdocs/compta/facture/card-rec.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/htdocs/compta/facture/card-rec.php b/htdocs/compta/facture/card-rec.php index 17f635f41d2..5cbd36e1392 100644 --- a/htdocs/compta/facture/card-rec.php +++ b/htdocs/compta/facture/card-rec.php @@ -301,8 +301,7 @@ if (empty($reshook)) { $object->linked_objects['commande'] = $orderid; } elseif (!empty($srcObject->linkedObjectsIds['propal'])) { $proposalid = reset($srcObject->linkedObjectsIds['propal']); - - $object->linked_objects['commande'] = $proposalid; + $object->linked_objects['propal'] = $proposalid; } } From 01111145025269d7d3560023f51ca3c932833251 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 8 Feb 2026 00:19:03 +0100 Subject: [PATCH 09/11] Fix CI --- htdocs/comm/action/list.php | 6 +++++- htdocs/ticket/class/ticket.class.php | 4 ++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/htdocs/comm/action/list.php b/htdocs/comm/action/list.php index 220eb9e3b0c..0899fe6d5b3 100644 --- a/htdocs/comm/action/list.php +++ b/htdocs/comm/action/list.php @@ -653,6 +653,8 @@ if (!getDolGlobalInt('MAIN_DISABLE_FULL_SCANLIST')) { } else { dol_print_error($db); } + + $db->free($resql); } else { $sqlforcount1 = preg_replace('/^'.preg_quote($sqlfields, '/').'/', 'SELECT COUNT(*) as nbtotalofrecords', $sql1); $sqlforcount2 = preg_replace('/^'.preg_quote($sqlfields, '/').'/', 'SELECT COUNT(*) as nbtotalofrecords', $sql2); @@ -666,13 +668,15 @@ if (!getDolGlobalInt('MAIN_DISABLE_FULL_SCANLIST')) { } else { dol_print_error($db); } + + $db->free($resql1); + $db->free($resql2); } if (($page * $limit) > (int) $nbtotalofrecords) { // if total resultset is smaller then paging size (filtering), goto and load page 0 $page = 0; $offset = 0; } - $db->free($resql); } // Complete request and execute it with limit diff --git a/htdocs/ticket/class/ticket.class.php b/htdocs/ticket/class/ticket.class.php index 45806481ae9..4f92b577d71 100644 --- a/htdocs/ticket/class/ticket.class.php +++ b/htdocs/ticket/class/ticket.class.php @@ -1834,8 +1834,8 @@ class Ticket extends CommonObject $now = dol_now(); // Clean parameters - if (isset($this->fk_track_id)) { - $this->fk_track_id = trim($this->fk_track_id); + if (isset($this->track_id)) { + $this->track_id = trim($this->track_id); } if (isset($this->message)) { From 713918dadf595a74d5c3389e1e52d28e80ee46fa Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 8 Feb 2026 13:04:23 +0100 Subject: [PATCH 10/11] Debug v23 --- htdocs/fourn/facture/card.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/fourn/facture/card.php b/htdocs/fourn/facture/card.php index a5b1cccc533..19f57993d75 100644 --- a/htdocs/fourn/facture/card.php +++ b/htdocs/fourn/facture/card.php @@ -4242,7 +4242,7 @@ if ($action == 'create') { // Create payment if ($object->type != FactureFournisseur::TYPE_CREDIT_NOTE && $object->status == FactureFournisseur::STATUS_VALIDATED && $object->paid == 0) { - print ''.$langs->trans('DoPayment').''; // must use facid because id is for payment id not invoice + print ''.$langs->trans('DoPayment').''; // must use facid because id is for payment id not invoice } // Reverse back money or convert to reduction From 01e947cfad625adf2e3c1409074a2f6a476ad677 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 8 Feb 2026 13:10:29 +0100 Subject: [PATCH 11/11] Rename var --- htdocs/includes/odtphp/odf.php | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/htdocs/includes/odtphp/odf.php b/htdocs/includes/odtphp/odf.php index 98355ecb488..093080489ea 100644 --- a/htdocs/includes/odtphp/odf.php +++ b/htdocs/includes/odtphp/odf.php @@ -965,21 +965,20 @@ IMG; } $commandprotected = str_replace(array('(', ')'), array('__PARENTHESIS_OPEN__', '__PARENTHESIS_CLOSE__'), $command); $commandescaped = escapeshellcmd($commandprotected); - $commandtoexec = str_replace(array('__PARENTHESIS_OPEN__', '__PARENTHESIS_CLOSE__'), array('(', ')'), $commandescaped); - + $commandescapedtoexec = str_replace(array('__PARENTHESIS_OPEN__', '__PARENTHESIS_CLOSE__'), array('(', ')'), $commandescaped); + $retval=0; $output_arr=array(); if ($execmethod == 1) { - exec($commandtoexec, $output_arr, $retval); - } - if ($execmethod == 2) { + exec($commandescapedtoexec, $output_arr, $retval); + } elseif ($execmethod == 2) { $outputfile = DOL_DATA_ROOT.'/odt2pdf.log'; $handle = fopen($outputfile, 'w'); if ($handle) { dol_syslog(get_class($this)."Run command ".$command, LOG_DEBUG); - dol_syslog(get_class($this)."escapeshellcmd(command) = ".$commandtoexec, LOG_DEBUG); + dol_syslog(get_class($this)."escapeshellcmd(command) = ".$commandescapedtoexec, LOG_DEBUG); fwrite($handle, $command."\n"); - $handlein = popen($commandtoexec, 'r'); + $handlein = popen($commandescapedtoexec, 'r'); while (!feof($handlein)) { $read = fgets($handlein); fwrite($handle, $read);