diff --git a/htdocs/compta/facture/list.php b/htdocs/compta/facture/list.php index 84ad5bd0f31..52b2fcceee0 100644 --- a/htdocs/compta/facture/list.php +++ b/htdocs/compta/facture/list.php @@ -676,12 +676,6 @@ if (strlen(trim($search_country))) { if ($search_type_thirdparty != '' && $search_type_thirdparty != '-1') { $sql .= " AND s.fk_typent IN (".$db->sanitize($db->escape($search_type_thirdparty)).')'; } -if ($search_company) { - $sql .= natural_search('s.nom', $search_company); -} -if ($search_company_alias) { - $sql .= natural_search('s.name_alias', $search_company_alias); -} if ($search_montant_ht != '') { $sql .= natural_search('f.total_ht', $search_montant_ht, 1); } diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index 1c533f0e686..4f17635c1c5 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -2316,7 +2316,7 @@ function dol_print_date($time, $format = '', $tzoutput = 'auto', $outputlangs = $user_date_tz = new DateTimeZone($offsettzstring); $user_dt = new DateTime(); $user_dt->setTimezone($user_date_tz); - $user_dt->setTimestamp($tzoutput == 'tzuser' ? dol_now() : $time); + $user_dt->setTimestamp(($tzoutput == 'tzuser' || empty($time)) ? dol_now() : $time); $offsettz = $user_dt->getOffset(); } else { // old method (The 'tzuser' was processed like the 'tzuserrel') $offsettz = (empty($_SESSION['dol_tz']) ? 0 : $_SESSION['dol_tz']) * 60 * 60; // Will not be used anymore