From 567100671b6590f9d85897de599af8c58486f8e8 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 9 Mar 2009 10:27:21 +0000 Subject: [PATCH] Qual: Title in member subscriptions --- htdocs/adherents/cotisations.php | 32 +++++++++++++++++--------------- htdocs/adherents/index.php | 8 ++++---- 2 files changed, 21 insertions(+), 19 deletions(-) diff --git a/htdocs/adherents/cotisations.php b/htdocs/adherents/cotisations.php index 71c46c94863..be01ee2df1d 100644 --- a/htdocs/adherents/cotisations.php +++ b/htdocs/adherents/cotisations.php @@ -1,7 +1,7 @@ * Copyright (C) 2003 Jean-Louis Bergamo - * Copyright (C) 2004-2008 Laurent Destailleur + * Copyright (C) 2004-2009 Laurent Destailleur * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -53,7 +53,7 @@ $date_select=isset($_GET["date_select"])?$_GET["date_select"]:$_POST["date_selec // pas actif c'est qu'on voulait pas d'insertion en banque. // si on active apres coup, on va pas modifier toutes les adhesions pour avoir une ecriture // en banque mais on va mettre le solde banque direct a la valeur apres toutes les adh�sions. -$allowinsertbankafter=0; +$allowinsertbankafter=0; if (! $user->rights->adherent->cotisation->lire) accessforbidden(); @@ -79,18 +79,18 @@ if ($allowinsertbankafter && $_POST["action"] == '2bank' && $_POST["rowid"] !='' // Cr�er un tiers + facture et enregistrer son paiement ? -> Non requis avec module compta expert // Eventuellement offrir option a la creation adhesion - + if (! $msg) { $db->begin(); - + $dateop=time(); - + $cotisation=new Cotisation($db); $result=$cotisation->fetch($_POST["rowid"]); $adherent=new Adherent($db); $result=$adherent->fetch($cotisation->fk_adherent); - + if ($result > 0) { $amount=$cotisation->amount; @@ -161,13 +161,15 @@ $sql.= " ORDER BY $sortfield $sortorder"; $sql.= $db->plimit($conf->liste_limit+1, $offset); $result = $db->query($sql); -if ($result) +if ($result) { $num = $db->num_rows($result); $i = 0; + $title=$langs->trans("ListOfSubscriptions"); + if (! empty($date_select)) $title.=' ('.$langs->trans("Year").' '.$date_select.')'; $param.="&statut=$statut&date_select=$date_select"; - print_barre_liste($langs->trans("ListOfSubscriptions"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder,'',$num); + print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder,'',$num); print ''; @@ -212,16 +214,16 @@ if ($result) print ""; } print ""; - + // Ref print ''; - + // Nom print ''; - + // Login print ''; - + // Libelle print '\n"; - + // Date end print '\n"; // Price print ''; - + print ""; if ($allowinsertbankafter && ! $objp->fk_account && $conf->banque->enabled && $conf->global->ADHERENT_BANK_USE && $objp->cotisation) { @@ -300,7 +302,7 @@ if ($result) print ''; print "\n"; print "\n"; - + print "
'.$cotisation->getNomUrl(1).''.$adherent->getNomUrl(1).''.$adherent->login.''; if ($allowinsertbankafter && $user->rights->banque->modifier && ! $objp->fk_account && $conf->banque->enabled && $conf->global->ADHERENT_BANK_USE && $objp->cotisation) @@ -270,13 +272,13 @@ if ($result) // Date start print ''.dol_print_date($objp->dateadh,'day')."'.dol_print_date($objp->datef,'day')."'.price($objp->cotisation).'
 ".price($total)."
"; print "
\n"; diff --git a/htdocs/adherents/index.php b/htdocs/adherents/index.php index 0a40cdb11be..f73bde73207 100644 --- a/htdocs/adherents/index.php +++ b/htdocs/adherents/index.php @@ -84,7 +84,7 @@ if ($result) } -// List members up to date +// List members up to date // current rule: uptodate = the end date is in future whatever is type // old rule: uptodate = if type does not need payment, that end date is null, if type need payment that end date is in future) $sql = "SELECT count(*) as somme , d.fk_adherent_type"; @@ -178,7 +178,7 @@ print "\n"; print "
\n"; /* - * Dernieres adherent + * Last modified members */ $max=5; @@ -211,8 +211,8 @@ if ($resql) $staticmember->ref=trim($obj->prenom.' '.$obj->nom); $statictype->id=$obj->typeid; $statictype->libelle=$obj->libelle; - print ''.$staticmember->getNomUrl(1).''; - print ''.$statictype->getNomUrl(1).''; + print ''.$staticmember->getNomUrl(1,24).''; + print ''.$statictype->getNomUrl(1,16).''; print ''.dol_print_date($obj->datem,'dayhour').''; print ''.$staticmember->LibStatut($obj->statut,($obj->cotisation=='yes'?1:0),$obj->date_end_subscription,5).''; print '';