Skip to content

Commit

Permalink
Update fournisseur.class.php
Browse files Browse the repository at this point in the history
same change made on the main develop branch
  • Loading branch information
defrance committed May 25, 2014
1 parent 493e82b commit 0a23125
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions htdocs/fourn/class/fournisseur.class.php
Expand Up @@ -180,15 +180,16 @@ function CreateCategory($user, $name)
function ListArray()
{
global $conf;
global $user;

$arr = array();

$sql = "SELECT s.rowid, s.nom";
$sql.= " FROM ".MAIN_DB_PREFIX."societe as s";
if (!$this->user->rights->societe->client->voir && !$this->user->societe_id) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
if (!$user->rights->societe->client->voir && !$user->societe_id) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
$sql.= " WHERE s.fournisseur = 1";
$sql.= " AND s.entity IN (".getEntity('societe', 1).")";
if (!$this->user->rights->societe->client->voir && !$this->user->societe_id) $sql.= " AND s.rowid = sc.fk_soc AND sc.fk_user = " .$this->user->id;
if (!$user->rights->societe->client->voir && !$user->societe_id) $sql.= " AND s.rowid = sc.fk_soc AND sc.fk_user = " .$this->user->id;

$resql=$this->db->query($sql);

Expand Down

0 comments on commit 0a23125

Please sign in to comment.