From f2ae3ee41d09aa65f89f8c5f048ea3ff85967ea7 Mon Sep 17 00:00:00 2001 From: John Date: Tue, 23 Jan 2018 09:49:21 +0100 Subject: [PATCH 1/3] Fix get entity if multiple --- htdocs/margin/checkMargins.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/margin/checkMargins.php b/htdocs/margin/checkMargins.php index 5f6f46c4b2b..3938bb18937 100644 --- a/htdocs/margin/checkMargins.php +++ b/htdocs/margin/checkMargins.php @@ -189,7 +189,7 @@ $sql .= " FROM " . MAIN_DB_PREFIX . "facture as f "; $sql .= " INNER JOIN " . MAIN_DB_PREFIX . "facturedet as d ON d.fk_facture = f.rowid"; $sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "product as p ON d.fk_product = p.rowid"; $sql .= " WHERE f.fk_statut > 0"; -$sql .= " AND f.entity = " . getEntity('facture'); +$sql .= " AND f.entity IN (" . getEntity('facture') . ") "; if (! empty($startdate)) $sql .= " AND f.datef >= '" . $db->idate($startdate) . "'"; if (! empty($enddate)) $sql .= " AND f.datef <= '" . $db->idate($enddate) . "'"; if ($search_ref) $sql.=natural_search('f.facnumber', $search_ref); From 19c616756a1b804a21fde819d5cd3413ea5401ca Mon Sep 17 00:00:00 2001 From: arnaud Date: Tue, 23 Jan 2018 12:14:22 +0100 Subject: [PATCH 2/3] FIX email sent was not in HTML --- htdocs/compta/prelevement/class/rejetprelevement.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/compta/prelevement/class/rejetprelevement.class.php b/htdocs/compta/prelevement/class/rejetprelevement.class.php index 820d3a34fcc..5343bb7af47 100644 --- a/htdocs/compta/prelevement/class/rejetprelevement.class.php +++ b/htdocs/compta/prelevement/class/rejetprelevement.class.php @@ -239,7 +239,7 @@ class RejetPrelevement $subject = $langs->trans("InfoRejectSubject"); $sendto = $emuser->getFullName($langs)." <".$emuser->email.">"; $from = $this->user->getFullName($langs)." <".$this->user->email.">"; - $msgishtml=0; + $msgishtml=1; $arr_file = array(); $arr_mime = array(); From c0481be8d814bc19cf168226c2a9b500dc9fb9c1 Mon Sep 17 00:00:00 2001 From: arnaud Date: Tue, 23 Jan 2018 17:01:03 +0100 Subject: [PATCH 3/3] FIX subject mail sepa --- htdocs/compta/prelevement/class/rejetprelevement.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/compta/prelevement/class/rejetprelevement.class.php b/htdocs/compta/prelevement/class/rejetprelevement.class.php index 5343bb7af47..87de138e63a 100644 --- a/htdocs/compta/prelevement/class/rejetprelevement.class.php +++ b/htdocs/compta/prelevement/class/rejetprelevement.class.php @@ -236,7 +236,7 @@ class RejetPrelevement require_once DOL_DOCUMENT_ROOT.'/core/class/CMailFile.class.php'; - $subject = $langs->trans("InfoRejectSubject"); + $subject = $langs->transnoentities("InfoRejectSubject"); $sendto = $emuser->getFullName($langs)." <".$emuser->email.">"; $from = $this->user->getFullName($langs)." <".$this->user->email.">"; $msgishtml=1;