From 9a40c966bd7d4cb67b8f16fbbb97b01d345034b0 Mon Sep 17 00:00:00 2001 From: piernov Date: Thu, 19 Jan 2023 16:25:59 +0100 Subject: [PATCH 1/5] Fix: don setPaid sets paid field When donation is classified as paid, paid field also needs to be set to 1 so that accounting reports show the correct information. --- htdocs/don/class/don.class.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/htdocs/don/class/don.class.php b/htdocs/don/class/don.class.php index 181b3fc0ca3..3b09e8cc178 100644 --- a/htdocs/don/class/don.class.php +++ b/htdocs/don/class/don.class.php @@ -758,7 +758,7 @@ class Don extends CommonObject */ public function setPaid($id, $modepayment = 0) { - $sql = "UPDATE ".MAIN_DB_PREFIX."don SET fk_statut = 2"; + $sql = "UPDATE ".MAIN_DB_PREFIX."don SET fk_statut = 2, paid = 1"; if ($modepayment) { $sql .= ", fk_payment = ".((int) $modepayment); } @@ -768,6 +768,7 @@ class Don extends CommonObject if ($resql) { if ($this->db->affected_rows($resql)) { $this->statut = 2; + $this->paid = 1; return 1; } else { return 0; From 51f1871dd6fa33ca3c569f996dfbd96699e1b109 Mon Sep 17 00:00:00 2001 From: Thomas Negre Date: Thu, 19 Jan 2023 17:09:31 +0100 Subject: [PATCH 2/5] FIX on public ticket list, only the page 1 was accessible. Other pages were 404 error. --- htdocs/public/ticket/list.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/public/ticket/list.php b/htdocs/public/ticket/list.php index 3c5dfffba17..fa4142ac260 100644 --- a/htdocs/public/ticket/list.php +++ b/htdocs/public/ticket/list.php @@ -211,7 +211,7 @@ if ($action == "view_ticketlist") { $search_array_options = $extrafields->getOptionalsFromPost($object->table_element, '', 'search_'); $filter = array(); - $param = 'action=view_ticketlist'; + $param = '&action=view_ticketlist'; // Definition of fields for list $arrayfields = array( @@ -386,7 +386,7 @@ if ($action == "view_ticketlist") { $resql = $db->query($sql); if ($resql) { $num = $db->num_rows($resql); - print_barre_liste($langs->trans('TicketList'), $page, 'public/list.php', $param, $sortfield, $sortorder, '', $num, $num_total, 'ticket'); + print_barre_liste($langs->trans('TicketList'), $page, 'list.php', $param, $sortfield, $sortorder, '', $num, $num_total, 'ticket'); // Search bar print '
'."\n"; From b2ac7a72bee80f7fe1ae197648cb707689db005d Mon Sep 17 00:00:00 2001 From: VESSILLER Date: Tue, 24 Jan 2023 11:21:59 +0100 Subject: [PATCH 3/5] FIX simple quote 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 34e2fe8b34e..3c33765c407 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 b964f1a4761c8adf2de08162ced6cc50f2167e84 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?No=C3=A9=20Courtier?= Date: Tue, 24 Jan 2023 14:21:14 +0100 Subject: [PATCH 4/5] FIX: page was not reloaded after addline causing a new lline creation was page was reloaded --- htdocs/expensereport/card.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/htdocs/expensereport/card.php b/htdocs/expensereport/card.php index 31cf21c34ae..3f0541c89b4 100644 --- a/htdocs/expensereport/card.php +++ b/htdocs/expensereport/card.php @@ -1161,8 +1161,9 @@ if (empty($reshook)) { setEventMessages($object->error, $object->errors, 'errors'); } } - - $action = ''; + + header("Location: ".$_SERVER["PHP_SELF"]."?id=".GETPOST('id', 'int')); + exit; } if ($action == 'confirm_delete_line' && GETPOST("confirm", 'alpha') == "yes" && $user->rights->expensereport->creer) { From 08bd8caaf255fe5ec08dc9608238d9e99334d8b0 Mon Sep 17 00:00:00 2001 From: stickler-ci Date: Tue, 24 Jan 2023 13:28:59 +0000 Subject: [PATCH 5/5] Fixing style errors. --- htdocs/expensereport/card.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/htdocs/expensereport/card.php b/htdocs/expensereport/card.php index 3f0541c89b4..0756cb1bc7f 100644 --- a/htdocs/expensereport/card.php +++ b/htdocs/expensereport/card.php @@ -1161,9 +1161,9 @@ if (empty($reshook)) { setEventMessages($object->error, $object->errors, 'errors'); } } - - header("Location: ".$_SERVER["PHP_SELF"]."?id=".GETPOST('id', 'int')); - exit; + + header("Location: ".$_SERVER["PHP_SELF"]."?id=".GETPOST('id', 'int')); + exit; } if ($action == 'confirm_delete_line' && GETPOST("confirm", 'alpha') == "yes" && $user->rights->expensereport->creer) {