From 99206d55705c84872bc4bc5f56780d02bc1a4e2b Mon Sep 17 00:00:00 2001 From: VESSILLER Date: Mon, 24 Apr 2023 12:08:45 +0200 Subject: [PATCH 1/6] FIX special chars in generated file name from build doc mass action --- 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 3c33765c407..b323b4b3e01 100644 --- a/htdocs/core/actions_massactions.inc.php +++ b/htdocs/core/actions_massactions.inc.php @@ -1035,7 +1035,7 @@ if (!$error && $massaction == "builddoc" && $permissiontoread && !GETPOST('butto $arrayofinclusion[] = '^'.preg_quote(dol_sanitizeFileName($tmppdf), '/').'\.pdf$'; } foreach ($listofobjectref as $tmppdf) { - $arrayofinclusion[] = '^'.preg_quote(dol_sanitizeFileName($tmppdf), '/').'_[a-zA-Z0-9\-\_\']+\.pdf$'; // To include PDF generated from ODX files + $arrayofinclusion[] = '^'.preg_quote(dol_sanitizeFileName($tmppdf), '/').'_[a-zA-Z0-9\-\_\'\&\.]+\.pdf$'; // To include PDF generated from ODX files } $listoffiles = dol_dir_list($uploaddir, 'all', 1, implode('|', $arrayofinclusion), '\.meta$|\.png', 'date', SORT_DESC, 0, true); From bb350d062b6908ee46331f75a30b233b2361153e Mon Sep 17 00:00:00 2001 From: Gauthier PC portable 024 Date: Wed, 26 Apr 2023 10:25:08 +0200 Subject: [PATCH 2/6] FIX : deletion of a line of time spent (backport e3aa438d2a582313dfd5178b8cc5975e0c912c25) --- htdocs/projet/tasks/time.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/htdocs/projet/tasks/time.php b/htdocs/projet/tasks/time.php index 4be29d6f547..4dec93a3654 100644 --- a/htdocs/projet/tasks/time.php +++ b/htdocs/projet/tasks/time.php @@ -53,6 +53,7 @@ $toselect = GETPOST('toselect', 'array'); // Array of ids of elements selected i $contextpage = GETPOST('contextpage', 'aZ') ?GETPOST('contextpage', 'aZ') : 'timespentlist'; // To manage different context of search $backtopage = GETPOST('backtopage', 'alpha'); // Go back to a dedicated page $optioncss = GETPOST('optioncss', 'alpha'); +$mode = GETPOST('mode', 'alpha'); $id = GETPOST('id', 'int'); $projectid = GETPOST('projectid', 'int'); @@ -316,10 +317,10 @@ if (($action == 'updateline' || $action == 'updatesplitline') && !$cancel && $us } } -if ($action == 'confirm_deleteline' && $confirm == "yes" && $user->rights->projet->supprimer) { +if ($action == 'confirm_deleteline' && $confirm == "yes" && ($user->hasRight('projet', 'time') || $user->hasRight('projet', 'all', 'creer'))) { $object->fetchTimeSpent(GETPOST('lineid', 'int')); // load properties like $object->timespent_id - if (in_array($object->timespent_fk_user, $childids) || $user->rights->projet->all->creer) { + if (in_array($object->timespent_fk_user, $childids) || $user->hasRight('projet', 'all', 'creer')) { $result = $object->delTimeSpent($user); // delete line with $object->timespent_id if ($result < 0) { @@ -1897,7 +1898,7 @@ if (($id > 0 || !empty($ref)) || $projectidforalltimes > 0 || $allprojectforuser print ' '; print ''; } elseif ($user->hasRight('projet', 'time') || $user->hasRight('projet', 'all', 'creer')) { // Read project and enter time consumed on assigned tasks - if ($task_time->fk_user == $user->id || in_array($task_time->fk_user, $childids) || $user->hasRight('projet', 'all', 'creer')) { + if (in_array($task_time->fk_user, $childids) || $user->hasRight('projet', 'all', 'creer')) { if (getDolGlobalString('MAIN_FEATURES_LEVEL') >= 2) { print ' '; print 'rowid.$param.((empty($id) || $tab == 'timespent') ? '&tab=timespent' : '').'">'; From 1844278c4d99ff40226ad60e3e15143716ed47c0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?No=C3=A9=20Courtier?= Date: Fri, 28 Apr 2023 10:25:37 +0200 Subject: [PATCH 3/6] FIX: expense report autofill ttc input if force ttc conf is enabled --- htdocs/expensereport/card.php | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/htdocs/expensereport/card.php b/htdocs/expensereport/card.php index eb1c93f609a..80f5d0baa41 100644 --- a/htdocs/expensereport/card.php +++ b/htdocs/expensereport/card.php @@ -2643,10 +2643,22 @@ if ($action == 'create') { ,async:false ,dataType:"json" ,success:function(response) { - if (response.response_status == "success"){ - jQuery("#value_unit_ht").val(response.data); - jQuery("#value_unit_ht").trigger("change"); - jQuery("#value_unit").val(""); + if (response.response_status == "success"){'; + + if (!empty($conf->global->EXPENSEREPORT_FORCE_LINE_AMOUNTS_INCLUDING_TAXES_ONLY)) { + print ' + jQuery("#value_unit").val(parseFloat(response.data) * (100 + parseFloat(tva)) / 100); + jQuery("#value_unit").trigger("change"); + '; + } else { + print ' + jQuery("#value_unit_ht").val(response.data); + jQuery("#value_unit_ht").trigger("change"); + jQuery("#value_unit").val(""); + '; + } + + print ' } else if(response.response_status == "error" && response.errorMessage != undefined && response.errorMessage.length > 0 ){ $.jnotify(response.errorMessage, "error", {timeout: 0, type: "error"},{ remove: function (){} } ); } From a93e3ab3f6496afc1c67bb10115ceeb13ae35964 Mon Sep 17 00:00:00 2001 From: Gauthier PC portable 024 Date: Fri, 28 Apr 2023 10:50:25 +0200 Subject: [PATCH 4/6] FIX : remove NOTOKENRENOWAL (backport commit v17 7c316229db8060781ee50f4465b1133b5aeef156) --- htdocs/public/ticket/create_ticket.php | 3 --- 1 file changed, 3 deletions(-) diff --git a/htdocs/public/ticket/create_ticket.php b/htdocs/public/ticket/create_ticket.php index 68edd453aaf..0e68d1799ea 100644 --- a/htdocs/public/ticket/create_ticket.php +++ b/htdocs/public/ticket/create_ticket.php @@ -26,9 +26,6 @@ if (!defined('NOREQUIREUSER')) { define('NOREQUIREUSER', '1'); }*/ -if (!defined('NOTOKENRENEWAL')) { - define('NOTOKENRENEWAL', '1'); -} if (!defined('NOREQUIREMENU')) { define('NOREQUIREMENU', '1'); } From cd949e9fa750ac40ff8fee8114967c89d1136048 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 28 Apr 2023 12:37:01 +0200 Subject: [PATCH 5/6] Fix error message not shown --- htdocs/commande/list.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/htdocs/commande/list.php b/htdocs/commande/list.php index 2211422f3c5..62603daa082 100644 --- a/htdocs/commande/list.php +++ b/htdocs/commande/list.php @@ -213,6 +213,7 @@ include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_array_fields.tpl.php'; $object->fields = dol_sort_array($object->fields, 'position'); $arrayfields = dol_sort_array($arrayfields, 'position'); +$error = 0; /* @@ -503,6 +504,7 @@ if (empty($reshook)) { } else { $lineid = 0; $error++; + $errors[] = $objecttmp->error; break; } // Defined the new fk_parent_line From 5218a43a4272cb2e71e95d6a1cb6eab7bdbe2970 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 28 Apr 2023 18:59:12 +0200 Subject: [PATCH 6/6] FIX Click on "NEW" in simple POS was broken --- htdocs/cashdesk/affContenu.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/cashdesk/affContenu.php b/htdocs/cashdesk/affContenu.php index d8e31f3b9c9..20f5132bb02 100644 --- a/htdocs/cashdesk/affContenu.php +++ b/htdocs/cashdesk/affContenu.php @@ -26,7 +26,7 @@ require_once 'class/Facturation.class.php'; // Si nouvelle vente, reinitialisation des donnees (destruction de l'objet et vidage de la table contenant la liste des articles) -if (GETPOST('id', 'int') == 'NOUV') { +if (GETPOST('id', 'aZ09') == 'NOUV') { unset($_SESSION['serObjFacturation']); unset($_SESSION['poscart']); }