Fix: order of name/firstname

This commit is contained in:
Laurent Destailleur 2011-12-03 15:44:34 +01:00
parent eee21dd644
commit 88fc7818e9

View File

@ -70,6 +70,9 @@ $search_categ = isset($_GET["search_categ"])?$_GET["search_categ"]:$_POST["searc
* View
*/
$membertypestatic=new AdherentType($db);
$memberstatic=new Adherent($db);
llxHeader('',$langs->trans("Member"),'EN:Module_Foundations|FR:Module_Adhérents|ES:Módulo_Miembros');
$form=new Form($db);
@ -77,8 +80,6 @@ $formother=new FormOther($db);
$now=dol_now();
$membertypestatic=new AdherentType($db);
$sql = "SELECT d.rowid, d.login, d.prenom, d.nom, d.societe, ";
$sql.= " d.datefin,";
$sql.= " d.email, d.fk_adherent_type as type_id, d.morphy, d.statut,";
@ -255,39 +256,39 @@ if ($resql)
$datefin=$db->jdate($objp->datefin);
$adh=new Adherent($db);
// Nom
$var=!$var;
print "<tr $bc[$var]>";
print "<tr ".$bc[$var].">";
$memberstatic->nom=$objp->nom;
$memberstatic->prenom=$objp->prenom;
if ($objp->societe != '')
{
print "<td><a href=\"fiche.php?rowid=$objp->rowid\">".img_object($langs->trans("ShowMember"),"user").' '.$objp->prenom." ".dol_trunc($objp->nom,12)." / ".dol_trunc($objp->societe,12)."</a></td>\n";
print "<td><a href=\"fiche.php?rowid=$objp->rowid\">".img_object($langs->trans("ShowMember"),"user").' '.dol_trunc($memberstatic->getFullName($langs))." / ".dol_trunc($objp->societe,12)."</a></td>\n";
}
else
{
print "<td><a href=\"fiche.php?rowid=$objp->rowid\">".img_object($langs->trans("ShowMember"),"user").' '.$objp->prenom." ".dol_trunc($objp->nom)."</a></td>\n";
print "<td><a href=\"fiche.php?rowid=$objp->rowid\">".img_object($langs->trans("ShowMember"),"user").' '.dol_trunc($memberstatic->getFullName($langs))."</a></td>\n";
}
// Login
print "<td>".$objp->login."</td>\n";
// Type
print '<td nowrap="nowrap">';
$membertypestatic->id=$objp->type_id;
$membertypestatic->libelle=$objp->type;
print '<td nowrap="nowrap">';
print $membertypestatic->getNomUrl(1,12);
print '</td>';
// Moral/Physique
print "<td>".$adh->getmorphylib($objp->morphy)."</td>\n";
print "<td>".$memberstatic->getmorphylib($objp->morphy)."</td>\n";
// EMail
print "<td>".dol_print_email($objp->email,0,0,1)."</td>\n";
// Statut
print '<td nowrap="nowrap">';
print $adh->LibStatut($objp->statut,$objp->cotisation,$datefin,2);
print $memberstatic->LibStatut($objp->statut,$objp->cotisation,$datefin,2);
print "</td>";
// End of subscription date