From 73299477a1a25940887970598bbf4011d5ed0cb2 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 11 Sep 2007 22:16:36 +0000 Subject: [PATCH] Fix: bug #21029 : Espace client externe --- htdocs/compta/index.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/compta/index.php b/htdocs/compta/index.php index 52a52f84710..535470ef52f 100644 --- a/htdocs/compta/index.php +++ b/htdocs/compta/index.php @@ -716,7 +716,7 @@ if ($conf->facture->enabled && $user->rights->facture->lire) $sql.= " WHERE s.rowid = ff.fk_soc"; $sql.= " AND ff.paye=0 AND ff.fk_statut = 1"; if (!$user->rights->commercial->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 ff.fk_soc = ".$socid; $sql.= " GROUP BY ff.rowid, ff.facnumber, ff.fk_statut, ff.total, ff.total_ttc, s.nom, s.rowid"; $resql=$db->query($sql);