diff --git a/htdocs/adherent.class.php b/htdocs/adherent.class.php
index dd1a3b61b9f..8261d3655f4 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 d227cf62d2a..b1a837485c9 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 "
Date | ";
print "Email | ";
print "Type | ";
+ print "Personne | ";
print "\n";
$var=True;
@@ -67,6 +68,7 @@ if ($result)
print "rowid&action=edit\">".strftime("%d %B %Y",$objp->datefin)." | \n";
print "$objp->email | \n";
print "$objp->type | \n";
+ print "$objp->morphy | \n";
print "";
$i++;
}
diff --git a/mysql/data/data_dev.sql b/mysql/data/data_dev.sql
index 8c405f24ad2..caa92760c84 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 b3ba240b8dd..154998e3e88 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