From 4c0dc21ca02614b4dc97464c787c86c7783c01ee Mon Sep 17 00:00:00 2001 From: Maxime Kohlhaas Date: Thu, 18 Jan 2018 14:07:32 +0100 Subject: [PATCH 1/5] Fix validate contrat was not using force_number parameter --- htdocs/contrat/class/contrat.class.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/htdocs/contrat/class/contrat.class.php b/htdocs/contrat/class/contrat.class.php index 375c98c3c0b..86a57b1c144 100644 --- a/htdocs/contrat/class/contrat.class.php +++ b/htdocs/contrat/class/contrat.class.php @@ -322,7 +322,11 @@ class Contrat extends CommonObject $result=$this->thirdparty->set_as_client(); // Define new ref - if (! $error && (preg_match('/^[\(]?PROV/i', $this->ref) || empty($this->ref))) // empty should not happened, but when it occurs, the test save life + if ($force_number) + { + $num = $force_number; + } + else if (! $error && (preg_match('/^[\(]?PROV/i', $this->ref) || empty($this->ref))) // empty should not happened, but when it occurs, the test save life { $num = $this->getNextNumRef($this->thirdparty); } From 054d98a2baf8f566a41f38dacb857695e9a75173 Mon Sep 17 00:00:00 2001 From: atm-ph Date: Mon, 22 Jan 2018 17:09:17 +0100 Subject: [PATCH 2/5] Fix each total isn't aligned on payment card --- htdocs/compta/paiement.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/htdocs/compta/paiement.php b/htdocs/compta/paiement.php index e81d0e38345..2b6f47037f0 100644 --- a/htdocs/compta/paiement.php +++ b/htdocs/compta/paiement.php @@ -745,7 +745,8 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie { // Print total print ''; - print ''.$langs->trans('TotalTTC').''; + print ''.$langs->trans('TotalTTC').''; + if (!empty($conf->multicurrency->enabled)) print ''; if (!empty($conf->multicurrency->enabled)) print ''; if (!empty($conf->multicurrency->enabled)) print ''; if (!empty($conf->multicurrency->enabled)) print ''; From f2ae3ee41d09aa65f89f8c5f048ea3ff85967ea7 Mon Sep 17 00:00:00 2001 From: John Date: Tue, 23 Jan 2018 09:49:21 +0100 Subject: [PATCH 3/5] 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 4/5] 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 5/5] 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;