diff --git a/htdocs/adherent.class.php b/htdocs/adherent.class.php index dd1a3b61b9fd3749481a02f206bc7bcc802ba7c9..8261d3655f40b8842d825083caf6558efd8333db 100644 --- a/htdocs/adherent.class.php +++ b/htdocs/adherent.class.php @@ -32,6 +32,7 @@ class Adherent var $ville; var $pays; var $typeid; + var $morphy; var $email; var $public; var $commentaire; @@ -200,6 +201,7 @@ class Adherent $sql .= ",email='".$this->email."'"; $sql .= ",statut=".$this->statut; $sql .= ",fk_adherent_type=".$this->typeid; + $sql .= ",morphy='".$this->morphy."'"; $sql .= " WHERE rowid = $this->id"; @@ -257,7 +259,7 @@ class Adherent */ Function fetch($rowid) { - $sql = "SELECT d.rowid, d.prenom, d.nom, d.societe, d.statut, d.adresse, d.cp, d.ville, d.pays, d.note, d.email, d.fk_adherent_type"; + $sql = "SELECT d.rowid, d.prenom, d.nom, d.societe, d.statut, d.adresse, d.cp, d.ville, d.pays, d.note, d.email, d.fk_adherent_type, d.morphy"; $sql .= ",".$this->db->pdate("d.datefin")." as datefin"; $sql .= " FROM llx_adherent as d"; $sql .= " WHERE d.rowid = $rowid"; @@ -283,6 +285,7 @@ class Adherent $this->pays = stripslashes($obj->pays); $this->datefin = $obj->datefin; $this->commentaire = stripslashes($obj->note); + $this->cp = $obj->morphy; } } else diff --git a/htdocs/adherents/liste.php b/htdocs/adherents/liste.php index d227cf62d2aa0d31264abd4ba168695b1f953f32..b1a837485c9f24298e203ed8677840124d68b2ef 100644 --- a/htdocs/adherents/liste.php +++ b/htdocs/adherents/liste.php @@ -36,7 +36,7 @@ $pagenext = $page + 1; $sql = "SELECT d.rowid, d.prenom, d.nom, d.societe, ".$db->pdate("d.datefin")." as datefin"; -$sql .= " , d.email, t.libelle as type"; +$sql .= " , d.email, t.libelle as type, d.morphy"; $sql .= " FROM llx_adherent as d, llx_adherent_type as t"; $sql .= " WHERE d.fk_adherent_type = t.rowid"; $sql .= " ORDER BY $sortfield $sortorder " . $db->plimit($conf->liste_limit, $offset); @@ -55,6 +55,7 @@ if ($result) print "<td>Date</td>"; print "<td>Email</td>"; print "<td>Type</td>"; + print "<td>Personne</td>"; print "</TR>\n"; $var=True; @@ -67,6 +68,7 @@ if ($result) print "<TD><a href=\"fiche.php?rowid=$objp->rowid&action=edit\">".strftime("%d %B %Y",$objp->datefin)."</a></td>\n"; print "<TD>$objp->email</TD>\n"; print "<TD>$objp->type</TD>\n"; + print "<TD>$objp->morphy</TD>\n"; print "</tr>"; $i++; } diff --git a/mysql/data/data_dev.sql b/mysql/data/data_dev.sql index 8c405f24ad27f87492845792ac3bfe03a4a5fa05..caa92760c848b74d958b796777558276ae10c69b 100644 --- a/mysql/data/data_dev.sql +++ b/mysql/data/data_dev.sql @@ -52,8 +52,8 @@ delete from llx_user; insert into llx_user (name,firstname,code,login,pass,module_comm,module_compta,admin,webcal_login) values ('Quiedeville','Rodolphe','RQ','rodo','CRnN0Tam/s7z.',1,1,1,'rodo'); -insert into llx_user (name,firstname,code,login,pass,module_comm,module_compta,webcal_login) -values ('demo','demo','DEMO','demo','demo',1,0,'demo'); +insert into llx_user (name,firstname,code,login,pass,module_comm,module_compta,webcal_login,admin) +values ('demo','demo','DEMO','demo','demo',1,0,'demo',1); insert into llx_user (name,firstname,code,login,pass,module_comm,module_compta,webcal_login) values ('demo1','demo1','DM1','demo1','demo',1,0,'demo1'); diff --git a/mysql/tables/llx_adherent.sql b/mysql/tables/llx_adherent.sql index b3ba240b8dd22216f182a209d61befbef4660337..154998e3e883425d58acbea52c50ca9172fd7ba6 100644 --- a/mysql/tables/llx_adherent.sql +++ b/mysql/tables/llx_adherent.sql @@ -28,7 +28,9 @@ create table llx_adherent tms timestamp, statut smallint NOT NULL DEFAULT 0, fk_adherent_type smallint, - datec datetime, + morphy enum('mor','phy') NOT NULL, -- personne morale / personne physique + datevalid datetime, -- date de validation + datec datetime, -- date de creation prenom varchar(50), nom varchar(50), societe varchar(50), @@ -38,6 +40,7 @@ create table llx_adherent pays varchar(50), email varchar(255), fk_user_author integer NOT NULL, + fk_user_mod integer NOT NULL, fk_user_valid integer NOT NULL, datefin datetime NOT NULL, -- date de fin de validit� de la cotisation note text