From 9e8485c2794fa44edb52113ba2ee5bc9fa6d80a5 Mon Sep 17 00:00:00 2001 From: Chl Date: Thu, 16 Aug 2018 01:06:44 +0200 Subject: [PATCH 1/5] FIX adding GROUP BY for PostgreSQL --- htdocs/compta/index.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/compta/index.php b/htdocs/compta/index.php index ebaef08c7b5..ea43c270b5f 100644 --- a/htdocs/compta/index.php +++ b/htdocs/compta/index.php @@ -722,7 +722,7 @@ if (! empty($conf->facture->enabled) && ! empty($conf->commande->enabled) && $us $reshook=$hookmanager->executeHooks('printFieldListWhereCustomerOrderToBill',$parameters); $sql.=$hookmanager->resPrint; - $sql.= " GROUP BY s.nom, s.rowid, s.email, s.code_client, s.code_compta, c.rowid, c.ref, c.facture, c.fk_statut, c.tva, c.total_ht, c.total_ttc"; + $sql.= " GROUP BY s.nom, s.email, s.rowid, s.code_client, s.code_compta, c.rowid, c.ref, c.facture, c.fk_statut, c.total_ht, c.tva, c.total_ttc, cc.rowid, cc.code"; $resql = $db->query($sql); if ( $resql ) From 71d3af8b0769a616c8affc018bb9e77ecb949321 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Fri, 17 Aug 2018 13:44:07 +0200 Subject: [PATCH 2/5] Update propal.class.php --- htdocs/comm/propal/class/propal.class.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/comm/propal/class/propal.class.php b/htdocs/comm/propal/class/propal.class.php index 12fe76a522a..c326b115c17 100644 --- a/htdocs/comm/propal/class/propal.class.php +++ b/htdocs/comm/propal/class/propal.class.php @@ -1337,10 +1337,10 @@ class Propal extends CommonObject $sql.= ' LEFT JOIN '.MAIN_DB_PREFIX.'c_incoterms as i ON p.fk_incoterms = i.rowid'; if ($ref) { - $sql.= " AND p.entity IN (".getEntity('propal').")"; // Dont't use entity if you use rowid + $sql.= " WHERE p.entity IN (".getEntity('propal').")"; // Dont't use entity if you use rowid $sql.= " AND p.ref='".$this->db->escape($ref)."'"; } - else $sql.= " AND p.rowid=".$rowid; + else $sql.= " WHERE p.rowid=".$rowid; dol_syslog(get_class($this)."::fetch", LOG_DEBUG); $resql=$this->db->query($sql); From 27e2810e1009a29c2ae8d10c8ae818f967179838 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 20 Aug 2018 17:14:03 +0200 Subject: [PATCH 3/5] Fix date format --- htdocs/user/card.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/user/card.php b/htdocs/user/card.php index e30044b8174..c1faacb14ef 100644 --- a/htdocs/user/card.php +++ b/htdocs/user/card.php @@ -1499,7 +1499,7 @@ else // Date employment print ''.$langs->trans("DateEmployment").''; print ''; - print dol_print_date($object->dateemployment); + print dol_print_date($object->dateemployment, 'day'); print ''; print "\n"; From 9a5f839e63820700466ef8d45af4df6456e4c489 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Fri, 17 Aug 2018 11:21:02 +0200 Subject: [PATCH 4/5] Update actions_printing.inc.php --- htdocs/core/actions_printing.inc.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/core/actions_printing.inc.php b/htdocs/core/actions_printing.inc.php index 62b61e531bf..302ad161241 100644 --- a/htdocs/core/actions_printing.inc.php +++ b/htdocs/core/actions_printing.inc.php @@ -1,6 +1,6 @@ - * Copyright (C) 2014 Frederic France + * Copyright (C) 2014-2018 Frederic France * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -28,7 +28,7 @@ // Filename to print must be provided into 'file' parameter // Print file -if ($action == 'print_file' and $user->rights->printing->read) +if ($action == 'print_file' && $user->rights->printing->read) { $langs->load("printing"); require_once DOL_DOCUMENT_ROOT . '/core/modules/printing/modules_printing.php'; From fb3754af59b0523441f49bf0c4dc757cd56814de Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Fri, 17 Aug 2018 15:56:23 +0200 Subject: [PATCH 5/5] Update fichinter.class.php --- htdocs/fichinter/class/fichinter.class.php | 1 + 1 file changed, 1 insertion(+) diff --git a/htdocs/fichinter/class/fichinter.class.php b/htdocs/fichinter/class/fichinter.class.php index d14419f49b0..789a351c776 100644 --- a/htdocs/fichinter/class/fichinter.class.php +++ b/htdocs/fichinter/class/fichinter.class.php @@ -278,6 +278,7 @@ class Fichinter extends CommonObject */ function update($user, $notrigger=0) { + global $conf; if (! is_numeric($this->duration)) { $this->duration = 0; }