From 3e64fa4352178757aba2e3a81c3ec68be18b0968 Mon Sep 17 00:00:00 2001 From: Regis Houssin Date: Thu, 29 Sep 2022 08:45:58 +0200 Subject: [PATCH 1/5] FIXME this update override the initial message --- htdocs/ticket/class/ticket.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/ticket/class/ticket.class.php b/htdocs/ticket/class/ticket.class.php index 8d77119962d..5ed375a82dc 100644 --- a/htdocs/ticket/class/ticket.class.php +++ b/htdocs/ticket/class/ticket.class.php @@ -2757,7 +2757,7 @@ class Ticket extends CommonObject if ($result) { // update last_msg_sent date $object->date_last_msg_sent = dol_now(); - $object->update($user); + $object->update($user); // FIXME this update override the initial message } } } From 41d0b2d0c340fd6cd10576d14d4fe8ff32db631c Mon Sep 17 00:00:00 2001 From: Regis Houssin Date: Thu, 29 Sep 2022 08:56:34 +0200 Subject: [PATCH 2/5] FIX avoid override initial message ($this instead $object) --- htdocs/ticket/class/ticket.class.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/htdocs/ticket/class/ticket.class.php b/htdocs/ticket/class/ticket.class.php index 5ed375a82dc..eda4c06aa1e 100644 --- a/htdocs/ticket/class/ticket.class.php +++ b/htdocs/ticket/class/ticket.class.php @@ -2756,8 +2756,8 @@ class Ticket extends CommonObject $result = $this->sendTicketMessageByEmail($subject, $message, '', $sendto, $listofpaths, $listofmimes, $listofnames); if ($result) { // update last_msg_sent date - $object->date_last_msg_sent = dol_now(); - $object->update($user); // FIXME this update override the initial message + $this->date_last_msg_sent = dol_now(); + $this->update($user); } } } @@ -2766,7 +2766,7 @@ class Ticket extends CommonObject } // Set status to "answered" if not set yet, but only if internal user - if ($object->fk_statut < 3 && !$user->socid) { + if ($object->status < 3 && !$user->socid) { $object->setStatut(3); } return 1; From 95ce5c19dd8fa27aec8c586da0d954b47abd448c Mon Sep 17 00:00:00 2001 From: ksar <35605507+ksar-ksar@users.noreply.github.com> Date: Thu, 6 Oct 2022 14:36:53 +0200 Subject: [PATCH 3/5] FIX #22482 Preserve \r\n strings in task notes --- htdocs/projet/tasks/time.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/htdocs/projet/tasks/time.php b/htdocs/projet/tasks/time.php index 69e7c05abf1..cf2de5bef28 100644 --- a/htdocs/projet/tasks/time.php +++ b/htdocs/projet/tasks/time.php @@ -1793,7 +1793,7 @@ if (($id > 0 || !empty($ref)) || $projectidforalltimes > 0 || $allprojectforuser if (!empty($arrayfields['t.note']['checked'])) { print ''; if ($action == 'editline' && GETPOST('lineid', 'int') == $task_time->rowid) { - print ''; + print ''; } else { print dol_nl2br($task_time->note); } @@ -1802,7 +1802,7 @@ if (($id > 0 || !empty($ref)) || $projectidforalltimes > 0 || $allprojectforuser $totalarray['nbfield']++; } } elseif ($action == 'editline' && GETPOST('lineid', 'int') == $task_time->rowid) { - print ''; + print ''; } // Time spent @@ -2007,13 +2007,13 @@ if (($id > 0 || !empty($ref)) || $projectidforalltimes > 0 || $allprojectforuser if (!empty($arrayfields['t.note']['checked'])) { print ''; if ($action == 'splitline' && GETPOST('lineid', 'int') == $task_time->rowid) { - print ''; + print ''; } else { print dol_nl2br($task_time->note); } print ''; } elseif ($action == 'splitline' && GETPOST('lineid', 'int') == $task_time->rowid) { - print ''; + print ''; } // Time spent @@ -2145,13 +2145,13 @@ if (($id > 0 || !empty($ref)) || $projectidforalltimes > 0 || $allprojectforuser if (!empty($arrayfields['t.note']['checked'])) { print ''; if ($action == 'splitline' && GETPOST('lineid', 'int') == $task_time->rowid) { - print ''; + print ''; } else { print dol_nl2br($task_time->note); } print ''; } elseif ($action == 'splitline' && GETPOST('lineid', 'int') == $task_time->rowid) { - print ''; + print ''; } // Time spent From ce7f553f7dc15cdb7092ca158a7ab65ae7767b4a Mon Sep 17 00:00:00 2001 From: ksar <35605507+ksar-ksar@users.noreply.github.com> Date: Thu, 6 Oct 2022 16:06:33 +0200 Subject: [PATCH 4/5] FIX #22507 --- htdocs/accountancy/class/accountingjournal.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/accountancy/class/accountingjournal.class.php b/htdocs/accountancy/class/accountingjournal.class.php index 3134dfa95ba..982d6849f6e 100644 --- a/htdocs/accountancy/class/accountingjournal.class.php +++ b/htdocs/accountancy/class/accountingjournal.class.php @@ -456,7 +456,7 @@ class AccountingJournal extends CommonObject $sql .= " SELECT DISTINCT fk_docdet"; $sql .= " FROM " . MAIN_DB_PREFIX . "accounting_bookkeeping"; $sql .= " WHERE doc_type = 'asset'"; - $sql .= ")"; + $sql .= ") "; }*/ $sql .= "SELECT ad.fk_asset AS rowid, a.ref AS asset_ref, a.label AS asset_label, a.acquisition_value_ht AS asset_acquisition_value_ht"; From 1a71ce23dddcd811355431f01bb346ba3e5dd392 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 8 Oct 2022 02:54:10 +0200 Subject: [PATCH 5/5] Fix lang load --- htdocs/core/lib/invoice.lib.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/htdocs/core/lib/invoice.lib.php b/htdocs/core/lib/invoice.lib.php index b6ab19e2495..43e4879e62f 100644 --- a/htdocs/core/lib/invoice.lib.php +++ b/htdocs/core/lib/invoice.lib.php @@ -71,6 +71,8 @@ function facture_prepare_head($object) } else { dol_print_error($db); } + $langs->load("banks"); + $head[$h][0] = DOL_URL_ROOT.'/compta/facture/prelevement.php?facid='.urlencode($object->id); $head[$h][1] = $langs->trans('StandingOrders'); if ($nbStandingOrders > 0) {