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); 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 ) 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'; 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; } diff --git a/htdocs/user/card.php b/htdocs/user/card.php index ecbc65d8003..528d56dcdba 100644 --- a/htdocs/user/card.php +++ b/htdocs/user/card.php @@ -1514,7 +1514,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";