diff --git a/htdocs/adherents/liste.php b/htdocs/adherents/liste.php index b0a9ab79ddd..26f7d7eb452 100644 --- a/htdocs/adherents/liste.php +++ b/htdocs/adherents/liste.php @@ -34,11 +34,15 @@ $offset = $conf->liste_limit * $page ; $pageprev = $page - 1; $pagenext = $page + 1; +if (! isset($statut)) +{ + $statut = 1 ; +} $sql = "SELECT d.rowid, d.prenom, d.nom, d.societe, ".$db->pdate("d.datefin")." as datefin"; -$sql .= " , d.email, t.libelle as type, d.morphy, d.statut"; +$sql .= " , d.email, t.libelle as type, d.morphy, d.statut, t.cotisation"; $sql .= " FROM llx_adherent as d, llx_adherent_type as t"; -$sql .= " WHERE d.fk_adherent_type = t.rowid"; +$sql .= " WHERE d.fk_adherent_type = t.rowid AND d.statut = $statut"; $sql .= " ORDER BY $sortfield $sortorder " . $db->plimit($conf->liste_limit, $offset); $result = $db->query($sql); @@ -66,7 +70,23 @@ if ($result) $var=!$var; print ""; print "rowid&action=edit\">".stripslashes($objp->prenom)." ".stripslashes($objp->nom)." / ".stripslashes($objp->societe)."\n"; - print "rowid&action=edit\">".strftime("%d %B %Y",$objp->datefin)."\n"; + print ""; + if ($objp->cotisation == 'yes') + { + if ($objp->datefin < time()) + { + print "rowid&action=edit\">".strftime("%d %B %Y",$objp->datefin)." - Cotisation non recue\n"; + } + else + { + print "rowid&action=edit\">".strftime("%d %B %Y",$objp->datefin)."\n"; + } + } + else + { + print " "; + } + print "$objp->email\n"; print "$objp->type\n"; print "$objp->morphy\n"; diff --git a/htdocs/adherents/pre.inc.php b/htdocs/adherents/pre.inc.php index 06dec5417cb..4a65da06e05 100644 --- a/htdocs/adherents/pre.inc.php +++ b/htdocs/adherents/pre.inc.php @@ -34,12 +34,18 @@ function llxHeader($head = "") { $menu = new Menu(); $menu->add("index.php","Adherents"); - $menu->add_submenu("liste.php","liste"); + $menu->add_submenu("liste.php?statut=1","Adhérents à ce jour"); + $menu->add_submenu("liste.php?statut=-1","Adhésions à valider"); + + $menu->add_submenu("liste.php?statut=0","Adhésions résiliées"); if ($user->admin) { - $menu->add_submenu("fiche.php?action=create","nouvel adhérent"); + $menu->add("fiche.php?action=create","Nouvel adhérent"); } + + + $menu->add("cotisations.php","Cotisations"); if ($user->admin)