From 03bd59c030152ce26c72c83ea160e30e6d514853 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 4 Feb 2010 22:58:42 +0000 Subject: [PATCH] Fix: SQL error on contract page for external users --- htdocs/contrat/index.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/contrat/index.php b/htdocs/contrat/index.php index 8a2622d80b6..33afb91a05e 100644 --- a/htdocs/contrat/index.php +++ b/htdocs/contrat/index.php @@ -1,6 +1,6 @@ - * Copyright (C) 2004-2009 Laurent Destailleur + * Copyright (C) 2004-2010 Laurent Destailleur * Copyright (C) 2005-2009 Regis Houssin * * This program is free software; you can redistribute it and/or modify @@ -173,7 +173,7 @@ if ($conf->contrat->enabled && $user->rights->contrat->lire) $sql.= " AND s.entity = ".$conf->entity; $sql.= " AND c.statut = 0"; if (!$user->rights->societe->client->voir && !$socid) $sql.= " AND s.rowid = sc.fk_soc AND sc.fk_user = " .$user->id; - if ($socid) $sql.= " AND f.fk_soc = ".$socid; + if ($socid) $sql.= " AND s.fk_soc = ".$socid; $resql = $db->query($sql);