From 9f27e2323f33e42e27fb55ddaf7dfffced77f87a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Garci=CC=81a=20de=20La=20Fuente?= Date: Sat, 21 Nov 2015 11:51:23 +0100 Subject: [PATCH 1/4] FIX #3734 Do not show empty links of deleted source objects in stock movement list --- htdocs/product/stock/class/mouvementstock.class.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/htdocs/product/stock/class/mouvementstock.class.php b/htdocs/product/stock/class/mouvementstock.class.php index 2d4a8971f1b..7cc687c9191 100644 --- a/htdocs/product/stock/class/mouvementstock.class.php +++ b/htdocs/product/stock/class/mouvementstock.class.php @@ -508,7 +508,10 @@ class MouvementStock break; } - $origin->fetch($fk_origin); - return $origin->getNomUrl(1); + if ($origin->fetch($fk_origin) > 0) { + return $origin->getNomUrl(1); + } + + return ''; } } From 91ce70a6e98035e8796f2953974a9ba3fe9a17f5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Doursenaud?= Date: Mon, 23 Nov 2015 17:25:10 +0100 Subject: [PATCH 2/4] FIX #4081 Added missing translation --- htdocs/langs/en_US/users.lang | 1 + 1 file changed, 1 insertion(+) diff --git a/htdocs/langs/en_US/users.lang b/htdocs/langs/en_US/users.lang index a9d789b8c31..197d56e37ee 100644 --- a/htdocs/langs/en_US/users.lang +++ b/htdocs/langs/en_US/users.lang @@ -119,3 +119,4 @@ HierarchicView=Hierarchical view UseTypeFieldToChange=Use field Type to change OpenIDURL=OpenID URL LoginUsingOpenID=Use OpenID to login +DisabledInMonoUserMode=Disabled in maintenance mode From 973e42d10f5a70fc26f1e133f8006160c9de8169 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Doursenaud?= Date: Wed, 25 Nov 2015 19:30:20 +0100 Subject: [PATCH 3/4] FIX #4097 Public holiday calculation The last day was ommitted and never parsed. If this day was a saturday, sunday or public holiday day, it was not computed. --- htdocs/core/lib/date.lib.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/lib/date.lib.php b/htdocs/core/lib/date.lib.php index 924d3da2259..2604d6c9086 100644 --- a/htdocs/core/lib/date.lib.php +++ b/htdocs/core/lib/date.lib.php @@ -566,7 +566,7 @@ function num_public_holiday($timestampStart, $timestampEnd, $countrycode='FR') if ((($timestampEnd - $timestampStart) % 86400) != 0) return 'ErrorDates must use same hours and must be GMT dates'; $i=0; - while ($timestampStart < $timestampEnd && ($i < 50000)) // Loop end when equals (Test on i is a security loop to avoid infinite loop) + while ($timestampStart <= $timestampEnd && ($i < 50000)) // Loop end when equals (Test on i is a security loop to avoid infinite loop) { $ferie=false; $countryfound=0; From 208bf2545fd1519c639097db6241f793a78a9adf Mon Sep 17 00:00:00 2001 From: fmarcet Date: Thu, 26 Nov 2015 17:14:03 +0100 Subject: [PATCH 4/4] Fix: Bug when idprof is mandatory on thrid creation and we use multicompany --- htdocs/societe/class/societe.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/societe/class/societe.class.php b/htdocs/societe/class/societe.class.php index 8e5622cde77..351b813959b 100644 --- a/htdocs/societe/class/societe.class.php +++ b/htdocs/societe/class/societe.class.php @@ -2348,7 +2348,7 @@ class Societe extends CommonObject } //Verify duplicate entries - $sql = "SELECT COUNT(*) as idprof FROM ".MAIN_DB_PREFIX."societe WHERE ".$field." = '".$value."'"; + $sql = "SELECT COUNT(*) as idprof FROM ".MAIN_DB_PREFIX."societe WHERE ".$field." = '".$value."' AND entity IN (".getEntity('societe',1).")"; if($socid) $sql .= " AND rowid <> ".$socid; $resql = $this->db->query($sql); if ($resql)