From ab6251a4547cd3b61e54da3b3b9a137de9a518ec Mon Sep 17 00:00:00 2001 From: Regis Houssin Date: Sat, 4 Jul 2009 13:12:53 +0000 Subject: [PATCH] Fix: old rowid --- htdocs/fourn/facture/index.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/fourn/facture/index.php b/htdocs/fourn/facture/index.php index da52a98f36c..015c3dccee8 100644 --- a/htdocs/fourn/facture/index.php +++ b/htdocs/fourn/facture/index.php @@ -94,7 +94,7 @@ if (!$user->rights->societe->client->voir && !$socid) $sql .= ", sc.fk_soc, sc.f $sql.= " FROM ".MAIN_DB_PREFIX."societe as s, ".MAIN_DB_PREFIX."facture_fourn as fac"; if (!$user->rights->societe->client->voir && !$socid) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; $sql.= " WHERE fac.fk_soc = s.rowid"; -if (!$user->rights->societe->client->voir && !$socid) $sql .= " AND s.idp = sc.fk_soc AND sc.fk_user = " .$user->id; +if (!$user->rights->societe->client->voir && !$socid) $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = " .$user->id; if ($socid) { $sql .= " AND s.rowid = ".$socid;