From f405f859ca03c352b1506bdd72cf365843630c99 Mon Sep 17 00:00:00 2001 From: Florian HENRY Date: Fri, 2 Dec 2022 22:49:52 +0100 Subject: [PATCH] ineer join is better than coma and where --- htdocs/commande/class/commandestats.class.php | 3 --- 1 file changed, 3 deletions(-) diff --git a/htdocs/commande/class/commandestats.class.php b/htdocs/commande/class/commandestats.class.php index dded5f425f1..8d55f9794ee 100644 --- a/htdocs/commande/class/commandestats.class.php +++ b/htdocs/commande/class/commandestats.class.php @@ -93,9 +93,6 @@ class CommandeStats extends Stats //$this->where.= " AND c.fk_soc = s.rowid AND c.entity = ".$conf->entity; $this->where .= ($this->where ? ' AND ' : '').'c.entity IN ('.getEntity('commande').')'; - if (!$user->rights->societe->client->voir && !$this->socid) { - $this->where .= " AND c.fk_soc = sc.fk_soc AND sc.fk_user = ".((int) $user->id); - } if ($this->socid) { $this->where .= " AND c.fk_soc = ".((int) $this->socid); }