From 40febd27810af57d0cf68d1ffc24c61cf197f709 Mon Sep 17 00:00:00 2001 From: gti-eu <60189441+gti-eu@users.noreply.github.com> Date: Thu, 23 Jan 2020 11:48:44 +0100 Subject: [PATCH 1/5] Fix reference check on emailcollector ObjectType is on reg[1] ObjectId is on reg[2] --- .../class/emailcollector.class.php | 24 +++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/htdocs/emailcollector/class/emailcollector.class.php b/htdocs/emailcollector/class/emailcollector.class.php index 7e957385e60..0844cff2057 100644 --- a/htdocs/emailcollector/class/emailcollector.class.php +++ b/htdocs/emailcollector/class/emailcollector.class.php @@ -1243,34 +1243,34 @@ class EmailCollector extends CommonObject $objectid = 0; $objectemail = null; - if ($reg[0] == 'inv') + if ($reg[1] == 'inv') { - $objectid = $reg[1]; + $objectid = $reg[2]; $objectemail = new Facture($this->db); } - if ($reg[0] == 'proj') + if ($reg[1] == 'proj') { - $objectid = $reg[1]; + $objectid = $reg[2]; $objectemail = new Project($this->db); } - if ($reg[0] == 'con') + if ($reg[1] == 'con') { - $objectid = $reg[1]; + $objectid = $reg[2]; $objectemail = new Contact($this->db); } - if ($reg[0] == 'thi') + if ($reg[1] == 'thi') { - $objectid = $reg[1]; + $objectid = $reg[2]; $objectemail = new Societe($this->db); } - if ($reg[0] == 'use') + if ($reg[1] == 'use') { - $objectid = $reg[1]; + $objectid = $reg[2]; $objectemail = new User($this->db); } - if ($reg[0] == 'tic') + if ($reg[1] == 'tic') { - $objectid = $reg[1]; + $objectid = $reg[2]; $objectemail = new Ticket($this->db); } From 67e57b8da2fc550fd95562984517eb8dbe59e63a Mon Sep 17 00:00:00 2001 From: gti-eu <60189441+gti-eu@users.noreply.github.com> Date: Thu, 23 Jan 2020 12:53:24 +0100 Subject: [PATCH 2/5] Add trackid to Ticket message mail --- htdocs/ticket/class/ticket.class.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/htdocs/ticket/class/ticket.class.php b/htdocs/ticket/class/ticket.class.php index cf1e2502676..f5132809dd1 100644 --- a/htdocs/ticket/class/ticket.class.php +++ b/htdocs/ticket/class/ticket.class.php @@ -2753,7 +2753,8 @@ class Ticket extends CommonObject $conf->global->MAIN_MAIL_AUTOCOPY_TO = ''; } include_once DOL_DOCUMENT_ROOT.'/core/class/CMailFile.class.php'; - $mailfile = new CMailFile($subject, $receiver, $from, $message_to_send, $filepath, $mimetype, $filename, $sendtocc, '', $deliveryreceipt, -1); + $trackid = "tic".$this->id; + $mailfile = new CMailFile($subject, $receiver, $from, $message_to_send, $filepath, $mimetype, $filename, $sendtocc, '', $deliveryreceipt, -1, '', '', $trackid); if ($mailfile->error) { setEventMessages($mailfile->error, null, 'errors'); } else { From d302f190a72b458409cbf78e35b6fa58c103fc91 Mon Sep 17 00:00:00 2001 From: AdrianDominik Date: Thu, 23 Jan 2020 13:29:28 +0100 Subject: [PATCH 3/5] Fix: strict mode mysql compatibility --- htdocs/comm/card.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/comm/card.php b/htdocs/comm/card.php index 3ce6d2f00fa..00e30b88c0f 100644 --- a/htdocs/comm/card.php +++ b/htdocs/comm/card.php @@ -1047,7 +1047,7 @@ if ($object->id > 0) $sql .= " AND f.entity = ".$conf->entity; $sql .= ' GROUP BY f.rowid, f.titre, f.amount, f.total, f.tva, f.total_ttc,'; $sql .= ' f.date_last_gen, f.datec, f.frequency, f.unit_frequency,'; - $sql .= ' f.suspended,'; + $sql .= ' f.suspended, f.date_when,'; $sql .= ' s.nom, s.rowid'; $sql .= " ORDER BY f.date_last_gen, f.datec DESC"; From fd0daad9592849c21c443ff01f3774d1c7e086a4 Mon Sep 17 00:00:00 2001 From: florian HENRY Date: Thu, 23 Jan 2020 16:49:06 +0100 Subject: [PATCH 4/5] fix SEPA line with limit select and working pagination --- htdocs/compta/prelevement/card.php | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/htdocs/compta/prelevement/card.php b/htdocs/compta/prelevement/card.php index b7850fb8dc0..0b8a441dea2 100644 --- a/htdocs/compta/prelevement/card.php +++ b/htdocs/compta/prelevement/card.php @@ -63,7 +63,7 @@ $object = new BonPrelevement($db, ""); // Load object include DOL_DOCUMENT_ROOT.'/core/actions_fetchobject.inc.php'; // Must be include, not include_once // Must be include, not include_once. Include fetch and fetch_thirdparty but not fetch_optionals -$hookmanager->initHooks(array('directdebitprevcard', 'globalcard')); +$hookmanager->initHooks(array('directdebitprevcard', 'globalcard', 'directdebitprevlist')); /* * Actions @@ -362,10 +362,19 @@ if ($id > 0 || $ref) $urladd = "&id=".$id; - print_barre_liste($langs->trans("Lines"), $page, $_SERVER["PHP_SELF"], $urladd, $sortfield, $sortorder, '', $num, $nbtotalofrecords, ''); + print '
' . "\n"; + print ''; + print ''; + if (! empty($page)) { + print ''; + } + if (! empty($limit)) { + print ''; + } + print_barre_liste($langs->trans("Lines"), $page, $_SERVER["PHP_SELF"], $urladd, $sortfield, $sortorder, '', $num, $nbtotalofrecords, '', 0, '', '', $limit); print '
'; // You can use div-table-responsive-no-min if you dont need reserved height for your table - print ''; + print '
'; print ''; print_liste_field_titre("Lines", $_SERVER["PHP_SELF"], "pl.rowid", '', $urladd); print_liste_field_titre("ThirdParty", $_SERVER["PHP_SELF"], "s.nom", '', $urladd); @@ -375,7 +384,7 @@ if ($id > 0 || $ref) $total = 0; - while ($i < min($num, $conf->liste_limit)) + while ($i < min($num, $limit)) { $obj = $db->fetch_object($result); @@ -433,6 +442,7 @@ if ($id > 0 || $ref) print "
"; print '
'; + print '
'; $db->free($result); } From dc3eafccb9f75e1062d3693956dfd4676b86c3a7 Mon Sep 17 00:00:00 2001 From: florian HENRY Date: Fri, 24 Jan 2020 13:22:04 +0100 Subject: [PATCH 5/5] add hook into withdraw list --- htdocs/compta/prelevement/demandes.php | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/htdocs/compta/prelevement/demandes.php b/htdocs/compta/prelevement/demandes.php index d21815acfac..aa0538341e6 100644 --- a/htdocs/compta/prelevement/demandes.php +++ b/htdocs/compta/prelevement/demandes.php @@ -57,6 +57,16 @@ if (! $sortfield) $sortfield="f.ref"; $massactionbutton = ''; +$hookmanager->initHooks(array('withdrawalstodolist')); + + +/* + * Actions + */ + +$parameters = array('socid' => $socid, 'limit' => $limit, 'page' => $page, 'offset' => $offset); +$reshook = $hookmanager->executeHooks('doActions', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks +if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); /* * View @@ -142,7 +152,7 @@ $newcardbutton = ''.$lan print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'generic', 0, $newcardbutton, '', $limit); -print '
'; +print ''; if ($optioncss != '') print ''; print ''; print '';