Commit 5cd4408d authored by mbriand's avatar mbriand
Browse files

bleh

parent 36815795
......@@ -148,6 +148,7 @@ class comptoir extends stdentity
$this->type = $row['type_cpt'];
$this->id_salle = $row['id_salle'];
$this->rechargement = $row['rechargement'];
$this->archive = $row['archive'];
}
/**
......@@ -236,6 +237,9 @@ class comptoir extends stdentity
{
$this->load_by_id($id);
if ( $this->archive )
return false;
if ( !$this->is_valid() )
return false;
......
......@@ -84,14 +84,18 @@ class sitecomptoirs extends site
$this->admin_comptoirs = array();
if ( $this->user->is_in_group("gestion_ae") )
$req = new requete($this->db,"SELECT `id_comptoir`,`nom_cpt` FROM `cpt_comptoir`");
$req = new requete($this->db,"SELECT `id_comptoir`,`nom_cpt`, `archive` FROM `cpt_comptoir`");
else
$req = new requete($this->db,"SELECT `id_comptoir`,`nom_cpt`
$req = new requete($this->db,"SELECT `id_comptoir`,`nom_cpt`, `archive`
FROM `cpt_comptoir`
WHERE (`id_groupe` IN (".$this->user->get_groups_csv().") OR `id_assocpt` IN (".$this->user->get_assos_csv(4).") ) AND nom_cpt != 'test' ");
while ( list($id,$nom) = ($row = $req->get_row()) )
while ( list($id,$nom,$archive) = ($row = $req->get_row()) )
{
$this->admin_comptoirs[$id] = $nom;
if ($archive)
$this->admin_comptoirs[$id].= " (archivé)";
}
}
......
......@@ -387,12 +387,14 @@ class interfaceweb
"SELECT id_comptoir,nom_cpt " .
"FROM cpt_comptoir " .
"WHERE ( id_groupe IN (".$this->user->get_groups_csv().") OR `id_assocpt` IN (".$this->user->get_assos_csv(4).") ) AND nom_cpt != 'test' " .
"AND archive != '1' " .
"ORDER BY nom_cpt");
$req3 = new requete($this->db,
"SELECT id_comptoir,nom_cpt " .
"FROM cpt_comptoir " .
"WHERE id_groupe_vendeur IN (".$this->user->get_groups_csv().") AND type_cpt = '2' " .
"AND archive != '1' " .
"ORDER BY nom_cpt");
if ( $req->lines > 0
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment