diff --git a/htdocs/adherents/adherent.class.php b/htdocs/adherents/adherent.class.php
index 8bae02f88c3eafd8af471c7f08bebce11a4d5dca..96c99a03b527cfcd5820ecc2d8c16e17b899e5d1 100644
--- a/htdocs/adherents/adherent.class.php
+++ b/htdocs/adherents/adherent.class.php
@@ -1000,18 +1000,18 @@ class Adherent extends CommonObject
 	}
 
 	/**
-	 \brief      Fonction qui insere la cotisation dans la base de donnees
-	 et eventuellement liens dans banques, mailman, etc...
-	 \param	    date        	Date d'effet de la cotisation
-	 \param	    montant     	Montant cotisation (accepte 0 pour les adherents non soumis e cotisation)
-	 \param		account_id		Id compte bancaire
-	 \param		operation		Type operation (si Id compte bancaire fourni)
-	 \param		label			Label operation (si Id compte bancaire fourni)
-	 \param		num_chq			Numero cheque (si Id compte bancaire fourni)
-	 \param		emetteur_nom	Nom emetteur cheque
-	 \param		emetteur_banque	Nom banque emetteur cheque
-	 \param		datesubend		Date fin adhesion
-	 \return     int         	rowid de l'entree ajoutee, <0 si erreur
+	 *	\brief      Fonction qui insere la cotisation dans la base de donnees
+	 *				et eventuellement liens dans banques, mailman, etc...
+	 *	\param	    date        	Date d'effet de la cotisation
+	 *	\param	    montant     	Montant cotisation (accepte 0 pour les adherents non soumis e cotisation)
+	 *	\param		account_id		Id compte bancaire
+	 *	\param		operation		Type operation (si Id compte bancaire fourni)
+	 *	\param		label			Label operation (si Id compte bancaire fourni)
+	 *	\param		num_chq			Numero cheque (si Id compte bancaire fourni)
+	 *	\param		emetteur_nom	Nom emetteur cheque
+	 *	\param		emetteur_banque	Nom banque emetteur cheque
+	 *	\param		datesubend		Date fin adhesion
+	 *	\return     int         	rowid de l'entree ajoutee, <0 si erreur
 	 */
 	function cotisation($date, $montant, $accountid=0, $operation='', $label='', $num_chq='', $emetteur_nom='', $emetteur_banque='', $datesubend=0)
 	{
diff --git a/htdocs/adherents/adherent_type.class.php b/htdocs/adherents/adherent_type.class.php
index 76ef4d06973fb952871382f862eed491558c74e3..8d92445493005adbd8ad67db5afe0aae868c03a8 100644
--- a/htdocs/adherents/adherent_type.class.php
+++ b/htdocs/adherents/adherent_type.class.php
@@ -18,71 +18,71 @@
  */
 
 /**
-    	\file       htdocs/adherents/adherent_type.class.php
-        \ingroup    adherent
-		\brief      Fichier de la classe g�rant les types d'adh�rents
-		\author     Rodolphe Quiedeville
-		\version    $Id$
-*/
+ \file       htdocs/adherents/adherent_type.class.php
+ \ingroup    adherent
+ \brief      Fichier de la classe g�rant les types d'adh�rents
+ \author     Rodolphe Quiedeville
+ \version    $Id$
+ */
 
 require_once(DOL_DOCUMENT_ROOT."/commonobject.class.php");
 
 
 /**
-        \class      AdherentType
-		\brief      Classe g�rant les types d'adh�rents
-*/
+ \class      AdherentType
+ \brief      Classe g�rant les types d'adh�rents
+ */
 class AdherentType extends CommonObject
 {
-  var $error;
-  var $errors=array();
-  var $db;
-  var $table_element = 'adherent_type';
+	var $error;
+	var $errors=array();
+	var $db;
+	var $table_element = 'adherent_type';
+
+	var $id;
+	var $libelle;
+	var $statut;
+	var $cotisation;  /**< Soumis � la cotisation */
+	var $vote;		/**< droit de vote ? */
+	var $note; 		/**< commentaire */
+	var $mail_valid;	/**< mail envoye lors de la validation */
 
-  var $id;
-  var $libelle;
-  var $statut;
-  var $cotisation;  /**< Soumis � la cotisation */
-  var $vote;		/**< droit de vote ? */
-  var $note; 		/**< commentaire */
-  var $mail_valid;	/**< mail envoye lors de la validation */
 
 
-  
 	/**
-			\brief AdherentType
-			\param DB				handler acc�s base de donn�es
-	*/
-  function AdherentType($DB)
-    {
-      $this->db = $DB ;
-      $this->statut = 1;
-    }
+	 \brief AdherentType
+	 \param DB				handler acc�s base de donn�es
+	 */
+	function AdherentType($DB)
+	{
+		$this->db = $DB ;
+		$this->statut = 1;
+	}
 
 
-/**
+	/**
 		\brief print_error_list
-*/
+		*/
 
 	function print_error_list()
-  {
-    $num = sizeof($this->error);
-    for ($i = 0 ; $i < $num ; $i++)
-      {
-	print "<li>" . $this->error[$i];
-      }
-  }
+	{
+		$num = sizeof($this->error);
+		for ($i = 0 ; $i < $num ; $i++)
+		{
+			print "<li>" . $this->error[$i];
+		}
+	}
 
 
 	/**
-			\brief      Fonction qui permet de cr�er le status de l'adh�rent
-			\param      userid			userid de l'adh�rent
-			\return     > 0 si ok, < 0 si ko
-	*/
+	 \brief      Fonction qui permet de cr�er le status de l'adh�rent
+	 \param      userid			userid de l'adh�rent
+	 \return     > 0 si ok, < 0 si ko
+	 */
 	function create($userid)
 	{
 		$this->statut=trim($this->statut);
-	
+
 		$sql = "INSERT INTO ".MAIN_DB_PREFIX."adherent_type (libelle)";
 		$sql.= " VALUES ('".addslashes($this->libelle)."')";
 
@@ -101,71 +101,70 @@ class AdherentType extends CommonObject
 	}
 
 
-/**
+	/**
 		\brief      Met a jour en base donn�es du type
 		\return     > 0 si ok, < 0 si ko
-*/
-  function update()
-    {
-      $this->libelle=trim($this->libelle);
+		*/
+	function update()
+	{
+		$this->libelle=trim($this->libelle);
 
-      $sql = "UPDATE ".MAIN_DB_PREFIX."adherent_type ";
-	  $sql.= "SET ";
-      $sql.= "statut=".$this->statut.",";
-      $sql.= "libelle = '".addslashes($this->libelle) ."',";
-      $sql.= "cotisation='".$this->cotisation."',";
-      $sql.= "note='".addslashes($this->note)."',";
-      $sql.= "vote='".$this->vote."',";
-      $sql.= "mail_valid='".addslashes($this->mail_valid)."'";
+		$sql = "UPDATE ".MAIN_DB_PREFIX."adherent_type ";
+		$sql.= "SET ";
+		$sql.= "statut=".$this->statut.",";
+		$sql.= "libelle = '".addslashes($this->libelle) ."',";
+		$sql.= "cotisation='".$this->cotisation."',";
+		$sql.= "note='".addslashes($this->note)."',";
+		$sql.= "vote='".$this->vote."',";
+		$sql.= "mail_valid='".addslashes($this->mail_valid)."'";
 
-      $sql .= " WHERE rowid = $this->id";
+		$sql .= " WHERE rowid = $this->id";
 
-      $result = $this->db->query($sql);
+		$result = $this->db->query($sql);
 
-      if ($result)
-	{
+		if ($result)
+		{
 	  return 1;
-	}
-      else
-	{
+		}
+		else
+		{
 			$this->error=$this->db->error().' sql='.$sql;
 	  return -1;
+		}
 	}
-    }
-
-/**
-		\brief      Fonction qui permet de supprimer le status de l'adh�rent
-		\param      rowid
-*/
 
+	/**
+	 *	\brief      Fonction qui permet de supprimer le status de l'adh�rent
+	 *	\param      rowid
+	 */
 	function delete($rowid)
-  {
+	{
 
-    $sql = "DELETE FROM ".MAIN_DB_PREFIX."adherent_type WHERE rowid = $rowid";
+		$sql = "DELETE FROM ".MAIN_DB_PREFIX."adherent_type WHERE rowid = $rowid";
 
-    if ( $this->db->query( $sql) )
-      {
-	if ( $this->db->affected_rows() )
+		if ( $this->db->query( $sql) )
+		{
+			if ( $this->db->affected_rows() )
 	  {
-	    return 1;
+	  	return 1;
 	  }
-	else
+	  else
 	  {
-	    return 0;
+	  	return 0;
 	  }
-      }
-    else
-      {
-	print "Err : ".$this->db->error();
-	return 0;
-      }
-  }
+		}
+		else
+		{
+			print "Err : ".$this->db->error();
+			return 0;
+		}
+	}
 
 	/**
 		\brief 		Fonction qui permet de r�cup�rer le status de l'adh�rent
 		\param 		rowid
 		\return		int			<0 si KO, >0 si OK
-	*/
+		*/
 	function fetch($rowid)
 	{
 		$sql = "SELECT d.rowid, d.libelle, d.statut, d.cotisation, d.mail_valid, d.note, d.vote";
@@ -179,7 +178,7 @@ class AdherentType extends CommonObject
 			if ($this->db->num_rows($resql))
 			{
 				$obj = $this->db->fetch_object($resql);
-		
+
 				$this->id             = $obj->rowid;
 				$this->ref            = $obj->rowid;
 				$this->libelle        = $obj->libelle;
@@ -198,58 +197,65 @@ class AdherentType extends CommonObject
 		}
 	}
 
-
+	/**
+	 * Return list of members' type
+	 *
+	 * @return 	array	List of types
+	 */
 	function liste_array()
-    {
-      $projets = array();
-
-      $sql = "SELECT rowid, libelle FROM ".MAIN_DB_PREFIX."adherent_type";
-
-      if ($this->db->query($sql) )
 	{
-	  $nump = $this->db->num_rows();
+		$projets = array();
+
+		$sql = "SELECT rowid, libelle FROM ".MAIN_DB_PREFIX."adherent_type";
 
-	  if ($nump)
-	    {
-	      $i = 0;
-	      while ($i < $nump)
+		$resql=$this->db->query($sql);
+		if ($resql)
 		{
-		  $obj = $this->db->fetch_object();
+			$nump = $this->db->num_rows($resql);
 
-		  $projets[$obj->rowid] = $obj->libelle;
-		  $i++;
+			if ($nump)
+			{
+				$i = 0;
+				while ($i < $nump)
+				{
+					$obj = $this->db->fetch_object($resql);
+
+					$projets[$obj->rowid] = $obj->libelle;
+					$i++;
+				}
+			}
+			return $projets;
 		}
-	    }
-	  return $projets;
-	}
-      else
-	{
-	  print $this->db->error();
+		else
+		{
+			print $this->db->error();
+		}
+
 	}
 
-    }
 
-	
-		/**
+	/**
 	 *    	\brief      Renvoie nom clicable (avec eventuellement le picto)
 	 *		\param		withpicto		0=Pas de picto, 1=Inclut le picto dans le lien, 2=Picto seul
+	 *		\param		maxlen			Longueur max libelle
+	 *		\param		option			Page lien
 	 *		\return		string			Chaine avec URL
 	 */
-	function getNomUrl($withpicto=0)
+	function getNomUrl($withpicto=0,$maxlen=0)
 	{
 		global $langs;
-		
+
 		$result='';
 
 		$lien = '<a href="'.DOL_URL_ROOT.'/adherents/type.php?rowid='.$this->id.'">';
 		$lienfin='</a>';
-		
+
 		$picto='group';
-		$label=$langs->trans("ShowType");
-		
+		$label=$langs->trans("ShowTypeCard",$this->libelle);
+
 		if ($withpicto) $result.=($lien.img_object($label,$picto).$lienfin);
 		if ($withpicto && $withpicto != 2) $result.=' ';
-		$result.=$lien.$this->libelle.$lienfin;
+		$result.=$lien.($maxlen?dolibarr_trunc($this->libelle,$maxlen):$this->libelle).$lienfin;
 		return $result;
 	}
 
diff --git a/htdocs/adherents/card_subscriptions.php b/htdocs/adherents/card_subscriptions.php
index d74697dd304e1359cbc1f5f000cfc2aa4f50bd22..4d0420aea84dd4dc548dfbfed32acb610d399841 100644
--- a/htdocs/adherents/card_subscriptions.php
+++ b/htdocs/adherents/card_subscriptions.php
@@ -1,7 +1,7 @@
 <?php
 /* Copyright (C) 2001-2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
  * Copyright (C) 2002-2003 Jean-Louis Bergamo   <jlb@j1b.org>
- * Copyright (C) 2004-2007 Laurent Destailleur  <eldy@users.sourceforge.net>
+ * Copyright (C) 2004-2008 Laurent Destailleur  <eldy@users.sourceforge.net>
  *
  * 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
@@ -16,16 +16,14 @@
  * You should have received a copy of the GNU General Public License
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- *
- * $Id$
  */
 
 /**
-        \file       htdocs/adherents/card_subscriptions.php
-        \ingroup    adherent
-        \brief      Onglet d'ajout, edition, suppression des adh�sions d'un adh�rent
-        \version    $Revision$
-*/
+ *       \file       htdocs/adherents/card_subscriptions.php
+ *       \ingroup    adherent
+ *       \brief      Onglet d'ajout, edition, suppression des adh�sions d'un adh�rent
+ *       \version    $Id$
+ */
 
 require("./pre.inc.php");
 require_once(DOL_DOCUMENT_ROOT."/lib/member.lib.php");
@@ -54,7 +52,7 @@ $rowid=isset($_GET["rowid"])?$_GET["rowid"]:$_POST["rowid"];
 $typeid=isset($_GET["typeid"])?$_GET["typeid"]:$_POST["typeid"];
 
 if (! $user->rights->adherent->cotisation->lire)
-	 accessforbidden();
+accessforbidden();
 
 
 /*
@@ -63,50 +61,53 @@ if (! $user->rights->adherent->cotisation->lire)
 
 if ($user->rights->adherent->cotisation->creer && $_POST["action"] == 'cotisation' && ! $_POST["cancel"])
 {
-    $langs->load("banks");
+	$langs->load("banks");
 
 	$adh->id = $rowid;
-    $result=$adh->fetch($rowid);
+	$result=$adh->fetch($rowid);
 
 	$adht->fetch($adh->typeid);
 
-    $datecotisation=0;
+	// Subscription informations
+	$datecotisation=0;
 	$datesubend=0;
-    if ($_POST["reyear"] && $_POST["remonth"] && $_POST["reday"])
-    {
- 		$datecotisation=dolibarr_mktime(0, 0, 0, $_POST["remonth"], $_POST["reday"], $_POST["reyear"]);
-    }
-    if ($_POST["endyear"] && $_POST["endmonth"] && $_POST["endday"])
-    {
- 		$datesubend=dolibarr_mktime(0, 0, 0, $_POST["endmonth"], $_POST["endday"], $_POST["endyear"]);
-    }
-    $cotisation=$_POST["cotisation"];
-
-	$accountid=$_POST["accountid"];
-	$operation=$_POST["operation"];
+	if ($_POST["reyear"] && $_POST["remonth"] && $_POST["reday"])
+	{
+		$datecotisation=dolibarr_mktime(0, 0, 0, $_POST["remonth"], $_POST["reday"], $_POST["reyear"]);
+	}
+	if ($_POST["endyear"] && $_POST["endmonth"] && $_POST["endday"])
+	{
+		$datesubend=dolibarr_mktime(0, 0, 0, $_POST["endmonth"], $_POST["endday"], $_POST["endyear"]);
+	}
+	$cotisation=$_POST["cotisation"];	// Amount of subscription
 	$label=$_POST["label"];
-	$num_chq=$_POST["num_chq"];
-	$emetteur_nom=$_POST["chqemetteur"];
-	$emetteur_banque=$_POST["chqbank"];
 	
 	if (! $datecotisation)
 	{
 		$errmsg=$langs->trans("BadDateFormat");
-	    $action='addsubscription';
+		$action='addsubscription';
 	}
 	if (! $datesubend)
 	{
 		$datesubend=dolibarr_time_plus_duree(dolibarr_time_plus_duree($datecotisation,$defaultdelay,$defaultdelayunit),-1,'d');
 	}
 	
+	// Payment informations
+	$accountid=$_POST["accountid"];
+	$operation=$_POST["operation"];	// Payment mode
+	$num_chq=$_POST["num_chq"];
+	$emetteur_nom=$_POST["chqemetteur"];
+	$emetteur_banque=$_POST["chqbank"];
+
+
 	if ($adht->cotisation)	// Type adherent soumis a cotisation
 	{
-	    if (! is_numeric($_POST["cotisation"]))
-	    {
+		if (! is_numeric($_POST["cotisation"]))
+		{
 			// If field is '' or not a numeric value
-		    $errmsg=$langs->trans("ErrorFieldRequired",$langs->transnoentities("Amount"));
-		    $action='addsubscription';
-	    }
+			$errmsg=$langs->trans("ErrorFieldRequired",$langs->transnoentities("Amount"));
+			$action='addsubscription';
+		}
 		else
 		{
 			if ($conf->banque->enabled && $conf->global->ADHERENT_BANK_USE)
@@ -125,37 +126,37 @@ if ($user->rights->adherent->cotisation->creer && $_POST["action"] == 'cotisatio
 			}
 		}
 	}
-	
-    if ($action=='cotisation')
-    {
-        $db->begin();
+
+	if ($action=='cotisation')
+	{
+		$db->begin();
 
 		$crowid=$adh->cotisation($datecotisation, $cotisation, $accountid, $operation, $label, $num_chq, $emetteur_nom, $emetteur_banque, $datesubend);
-		
-        if ($crowid > 0)
-        {
-            $db->commit();
-
-	        // Envoi mail
-	        if ($_POST["sendmail"])
-	        {
-	            $result=$adh->send_an_email($conf->global->ADHERENT_MAIL_COTIS,$conf->global->ADHERENT_MAIL_COTIS_SUBJECT,array(),array(),array(),"","",0,-1);
+
+		if ($crowid > 0)
+		{
+			$db->commit();
+
+			// Envoi mail
+			if ($_POST["sendmail"])
+			{
+				$result=$adh->send_an_email($conf->global->ADHERENT_MAIL_COTIS,$conf->global->ADHERENT_MAIL_COTIS_SUBJECT,array(),array(),array(),"","",0,-1);
 				if ($result < 0) $errmsg=$adh->error;
 			}
 
-		    $_POST["cotisation"]='';
+			$_POST["cotisation"]='';
 			$_POST["accountid"]='';
 			$_POST["operation"]='';
 			$_POST["label"]='';
 			$_POST["num_chq"]='';
-        }
-        else
-        {
-            $db->rollback();
-            $errmsg=$adh->error;
+		}
+		else
+		{
+			$db->rollback();
+			$errmsg=$adh->error;
 			$action = 'addsubscription';
-        }
-    }
+		}
+	}
 }
 
 
@@ -181,8 +182,8 @@ $adho->fetch_optionals();
 
 
 /*
-* Affichage onglets
-*/
+ * Affichage onglets
+ */
 $head = member_prepare_head($adh);
 
 dolibarr_fiche_head($head, 'subscription', $langs->trans("Member"));
@@ -227,15 +228,15 @@ if ($errmsg)
 		$langs->load("errors");
 		$errmsg=$langs->trans($errmsg);
 	}
-    print '<div class="error">'.$errmsg.'</div>';
-    print "\n";
+	print '<div class="error">'.$errmsg.'</div>';
+	print "\n";
 }
 
 
 /*
-* Barre d'actions
-*
-*/
+ * Barre d'actions
+ *
+ */
 print '<div class="tabsAction">';
 
 // Lien nouvelle cotisation si non brouillon et non r�sili�
@@ -252,9 +253,9 @@ print "<br>\n";
 
 
 /*
-* Bandeau des cotisations
-*
-*/
+ * Bandeau des cotisations
+ *
+ */
 
 print '<table border=0 width="100%">';
 
@@ -263,9 +264,9 @@ print '<td valign="top" width="50%">';
 
 
 /*
-* Liste des cotisations
-*
-*/
+ * Liste des cotisations
+ *
+ */
 $sql = "SELECT d.rowid, d.prenom, d.nom, d.societe,";
 $sql.= " c.rowid as crowid, c.cotisation,";
 $sql.= " ".$db->pdate("c.dateadh")." as dateadh,";
@@ -281,60 +282,60 @@ $sql.= " WHERE d.rowid = c.fk_adherent AND d.rowid=".$rowid;
 $result = $db->query($sql);
 if ($result)
 {
-$cotisationstatic=new Cotisation($db);
-$accountstatic=new Account($db);
+	$cotisationstatic=new Cotisation($db);
+	$accountstatic=new Account($db);
 
-$num = $db->num_rows($result);
-$i = 0;
+	$num = $db->num_rows($result);
+	$i = 0;
 
-print "<table class=\"noborder\" width=\"100%\">\n";
+	print "<table class=\"noborder\" width=\"100%\">\n";
 
-print '<tr class="liste_titre">';
-print '<td>'.$langs->trans("Ref").'</td>';
-print '<td align="center">'.$langs->trans("DateSubscription").'</td>';
-print '<td align="center">'.$langs->trans("DateEnd").'</td>';
-print '<td align="right">'.$langs->trans("Amount").'</td>';
-if ($conf->banque->enabled && $conf->global->ADHERENT_BANK_USE)
-{
-	print '<td align="right">'.$langs->trans("Account").'</td>';
-}
-print "</tr>\n";
-
-$var=True;
-while ($i < $num)
-{
-	$objp = $db->fetch_object($result);
-	$var=!$var;
-	print "<tr $bc[$var]>";
-	$cotisationstatic->ref=$objp->crowid;
-	$cotisationstatic->id=$objp->crowid;
-	print '<td>'.$cotisationstatic->getNomUrl(1).'</td>';
-	print '<td align="center">'.dolibarr_print_date($objp->dateadh,'day')."</td>\n";
-	print '<td align="center">'.dolibarr_print_date($objp->datef,'day')."</td>\n";
-	print '<td align="right">'.price($objp->cotisation).'</td>';
+	print '<tr class="liste_titre">';
+	print '<td>'.$langs->trans("Ref").'</td>';
+	print '<td align="center">'.$langs->trans("DateSubscription").'</td>';
+	print '<td align="center">'.$langs->trans("DateEnd").'</td>';
+	print '<td align="right">'.$langs->trans("Amount").'</td>';
 	if ($conf->banque->enabled && $conf->global->ADHERENT_BANK_USE)
 	{
-		print '<td align="right">';
-		if ($objp->bid) 
-		{
-			$accountstatic->label=$objp->label;
-			$accountstatic->id=$objp->baid;
-			print $accountstatic->getNomUrl(1);
-		}
-		else
+		print '<td align="right">'.$langs->trans("Account").'</td>';
+	}
+	print "</tr>\n";
+
+	$var=True;
+	while ($i < $num)
+	{
+		$objp = $db->fetch_object($result);
+		$var=!$var;
+		print "<tr $bc[$var]>";
+		$cotisationstatic->ref=$objp->crowid;
+		$cotisationstatic->id=$objp->crowid;
+		print '<td>'.$cotisationstatic->getNomUrl(1).'</td>';
+		print '<td align="center">'.dolibarr_print_date($objp->dateadh,'day')."</td>\n";
+		print '<td align="center">'.dolibarr_print_date($objp->datef,'day')."</td>\n";
+		print '<td align="right">'.price($objp->cotisation).'</td>';
+		if ($conf->banque->enabled && $conf->global->ADHERENT_BANK_USE)
 		{
-			print '&nbsp;';	
+			print '<td align="right">';
+			if ($objp->bid)
+			{
+				$accountstatic->label=$objp->label;
+				$accountstatic->id=$objp->baid;
+				print $accountstatic->getNomUrl(1);
+			}
+			else
+			{
+				print '&nbsp;';
+			}
+			print '</td>';
 		}
-		print '</td>';
+		print "</tr>";
+		$i++;
 	}
-	print "</tr>";
-	$i++;
-}
-print "</table>";
+	print "</table>";
 }
 else
 {
-dolibarr_print_error($db);
+	dolibarr_print_error($db);
 }
 
 print '</td><td valign="top">';
@@ -366,10 +367,10 @@ print '</td>';
 print '</tr>';
 print '</table>';
 
-	
+
 /*
-* Ajout d'une nouvelle cotisation
-*/
+ * Ajout d'une nouvelle cotisation
+ */
 if ($action == 'addsubscription' && $user->rights->adherent->cotisation->creer)
 {
 	print '<br>';
@@ -380,6 +381,7 @@ if ($action == 'addsubscription' && $user->rights->adherent->cotisation->creer)
 	print '<input type="hidden" name="rowid" value="'.$rowid.'">';
 	print "<table class=\"border\" width=\"100%\">\n";
 
+	// Title subscription
 	print '<tr><td colspan="2"><b>'.$langs->trans("NewCotisation").'</b></td></tr>';
 
 	$today=mktime();
@@ -422,42 +424,51 @@ if ($action == 'addsubscription' && $user->rights->adherent->cotisation->creer)
 
 	if ($adht->cotisation)
 	{
+		// Amount
 		print '<tr><td>'.$langs->trans("Amount").'</td><td><input type="text" name="cotisation" size="6" value="'.$_POST["cotisation"].'"> '.$langs->trans("Currency".$conf->monnaie).'</td></tr>';
 
+		// Label
+		print '<tr><td>'.$langs->trans("Label").'</td>';
+		print '<td><input name="label" type="text" size="32" value="'.$langs->trans("Subscription").' ';
+		print dolibarr_print_date(($datefrom?$datefrom:time()),"%Y").'" ></td></tr>';
+		
+		// Bank account
 		if ($conf->banque->enabled && $conf->global->ADHERENT_BANK_USE)
 		{
+			// Title payments
+			print '<tr><td colspan="2"><b>'.$langs->trans("Payment").'</b></td></tr>';
+			
+			// Bank account
 			print '<tr><td>'.$langs->trans("FinancialAccount").'</td><td>';
 			$html->select_comptes($_POST["accountid"],'accountid',0,'',1);
 			print "</td></tr>\n";
-		}
-		
-		print '<tr><td>'.$langs->trans("PaymentMode").'</td><td>';
-		$html->select_types_paiements($_POST["operation"],'operation');
-		print "</td></tr>\n";
-
-		print '<tr><td>'.$langs->trans('Numero');
-		print ' <em>('.$langs->trans("ChequeOrTransferNumber").')</em>';	// \todo a traduire
-		print '</td>';
-		print '<td><input name="num_chq" type="text" size="8" value="'.(empty($_POST['num_chq'])?'':$_POST['num_chq']).'"></td></tr>';
 
-		print '<tr><td>'.$langs->trans('CheckTransmitter');
-		print ' <em>('.$langs->trans("ChequeMaker").')</em>';	// \todo a traduire
-		print '</td>';
-		print '<td><input name="chqemetteur" size="32" type="text" value="'.(empty($_POST['chqemetteur'])?$facture->client->nom:$_POST['chqemetteur']).'"></td></tr>';
-
-		print '<tr><td>'.$langs->trans('Bank');
-		print ' <em>('.$langs->trans("ChequeBank").')</em>';	// \todo a traduire
-		print '</td>';
-		print '<td><input name="chqbank" size="32" type="text" value="'.(empty($_POST['chqbank'])?'':$_POST['chqbank']).'"></td></tr>';
+			// Payment mode
+			print '<tr><td>'.$langs->trans("PaymentMode").'</td><td>';
+			$html->select_types_paiements($_POST["operation"],'operation');
+			print "</td></tr>\n";
+	
+			print '<tr><td>'.$langs->trans('Numero');
+			print ' <em>('.$langs->trans("ChequeOrTransferNumber").')</em>';
+			print '</td>';
+			print '<td><input name="num_chq" type="text" size="8" value="'.(empty($_POST['num_chq'])?'':$_POST['num_chq']).'"></td></tr>';
+	
+			print '<tr><td>'.$langs->trans('CheckTransmitter');
+			print ' <em>('.$langs->trans("ChequeMaker").')</em>';
+			print '</td>';
+			print '<td><input name="chqemetteur" size="32" type="text" value="'.(empty($_POST['chqemetteur'])?$facture->client->nom:$_POST['chqemetteur']).'"></td></tr>';
+	
+			print '<tr><td>'.$langs->trans('Bank');
+			print ' <em>('.$langs->trans("ChequeBank").')</em>';
+			print '</td>';
+			print '<td><input name="chqbank" size="32" type="text" value="'.(empty($_POST['chqbank'])?'':$_POST['chqbank']).'"></td></tr>';
 
-		print '<tr><td>'.$langs->trans("Label").'</td>';
-		print '<td><input name="label" type="text" size="32" value="'.$langs->trans("Subscription").' ';
-		print dolibarr_print_date(($datefrom?$datefrom:time()),"%Y").'" ></td></tr>';
+		}
 	}
-	
+
 	print '<tr><td>'.$langs->trans("SendAcknowledgementByMail").'</td>';
 	print '<td>';
-	if (! $adh->email) 
+	if (! $adh->email)
 	{
 		print $langs->trans("NoEMail");
 	}
diff --git a/htdocs/adherents/cotisation.class.php b/htdocs/adherents/cotisation.class.php
index b912b98601a7d31f886001eafff58512dbfbb17a..c24c8502a1391d0d2dcce08fcf63780d36bc94bd 100644
--- a/htdocs/adherents/cotisation.class.php
+++ b/htdocs/adherents/cotisation.class.php
@@ -152,12 +152,12 @@ class Cotisation extends CommonObject
 		
 		$sql = "UPDATE ".MAIN_DB_PREFIX."cotisation SET ";
 		$sql .= " fk_adherent = ".$this->fk_adherent.",";
-		$sql .= " fk_bank = ".($this->fk_bank ? $this->fk_bank : 'null').",";
 		$sql .= " note=".($this->note ? "'".addslashes($this->note)."'" : 'null').",";
 		$sql .= " cotisation = '".price2num($this->amount)."',";
 		$sql .= " dateadh='".$this->db->idate($this->dateh)."',";
 		$sql .= " datef='".$this->db->idate($this->datef)."',";
-		$sql .= " datec='".$this->db->idate($this->datec)."'";
+		$sql .= " datec='".$this->db->idate($this->datec)."',";
+		$sql .= " fk_bank = ".($this->fk_bank ? $this->fk_bank : 'null');
 		$sql .= " WHERE rowid = ".$this->id;
 
 		dolibarr_syslog("Cotisation::update sql=".$sql);
diff --git a/htdocs/adherents/fiche.php b/htdocs/adherents/fiche.php
index b4ca599226e430137db83843abf68436f2971512..f4e7575cef1da4e49f53d244318c12d64ae5e572 100644
--- a/htdocs/adherents/fiche.php
+++ b/htdocs/adherents/fiche.php
@@ -935,7 +935,7 @@ if ($rowid && $action != 'edit')
     print '<tr><td>'.$langs->trans("PhoneMobile").'</td><td class="valeur">'.$adh->phone_mobile.'</td></tr>';
     
     // EMail
-    print '<tr><td>'.$langs->trans("EMail").'</td><td class="valeur">'.$adh->email.'&nbsp;</td></tr>';
+    print '<tr><td>'.$langs->trans("EMail").'</td><td class="valeur">'.dol_print_email($adh->email).'&nbsp;</td></tr>';
 
 	// Date naissance
     print '<tr><td>'.$langs->trans("Birthday").'</td><td class="valeur">'.dolibarr_print_date($adh->naiss,'day').'&nbsp;</td></tr>';
diff --git a/htdocs/adherents/fiche_subscription.php b/htdocs/adherents/fiche_subscription.php
index 850547f4088d646c55069fb5e1e9294f39c1ff7b..b0f9948ee7b5f1bbe3d96cb43a206272461b01ef 100644
--- a/htdocs/adherents/fiche_subscription.php
+++ b/htdocs/adherents/fiche_subscription.php
@@ -88,6 +88,7 @@ if ($user->rights->adherent->cotisation->creer && $_REQUEST["action"] == 'update
 			// Modifie valeures
 			$subscription->dateh=dolibarr_mktime($_POST['datesubhour'], $_POST['datesubmin'], 0, $_POST['datesubmonth'], $_POST['datesubday'], $_POST['datesubyear']);
 			$subscription->datef=dolibarr_mktime($_POST['datesubendhour'], $_POST['datesubendmin'], 0, $_POST['datesubendmonth'], $_POST['datesubendday'], $_POST['datesubendyear']);
+			$subscription->note=$_POST["note"];
 			$subscription->amount=$_POST["amount"];
 			//print 'datef='.$subscription->datef.' '.$_POST['datesubendday'];
 
@@ -143,7 +144,7 @@ if ($user->rights->adherent->cotisation->creer && $_POST["action"] == 'confirm_d
 
 
 /*
- * 
+ * View
  */
 
 llxHeader();
@@ -168,7 +169,8 @@ if ($user->rights->adherent->cotisation->creer && $action == 'edit')
 	 ********************************************/
 
     $subscription->fetch($rowid);
-	 
+	$result=$adh->fetch($subscription->fk_adherent);
+    
 	/*
 	 * Affichage onglets
 	 */
@@ -197,6 +199,12 @@ if ($user->rights->adherent->cotisation->creer && $action == 'edit')
     // Ref
     print '<tr><td width="20%">'.$langs->trans("Ref").'</td><td class="valeur" colspan="2">'.$subscription->ref.'&nbsp;</td></tr>';
 	
+    // Member
+	$adh->ref=$adh->fullname;
+    print '<tr>';
+	print '<td>'.$langs->trans("Member").'</td><td class="valeur" colspan="3">'.$adh->getNomUrl(1,0,'subscription').'</td>';
+    print '</tr>';
+
     // Date start subscription
     print '<tr><td>'.$langs->trans("DateSubscription").'</td><td class="valeur" colspan="2">';
 	$form->select_date($subscription->dateh,'datesub',1,1,0,'update',1);
@@ -213,6 +221,19 @@ if ($user->rights->adherent->cotisation->creer && $action == 'edit')
     print '<tr><td>'.$langs->trans("Amount").'</td><td class="valeur" colspan="2">';
 	print '<input type="text" class="flat" size="10" name="amount" value="'.price($subscription->amount).'"></td></tr>';
 
+    // Label
+    print '<tr><td>'.$langs->trans("Label").'</td><td class="valeur" colspan="2">';
+	print '<input type="text" class="flat" size="60" name="note" value="'.$subscription->note.'"></td></tr>';
+	
+	if ($conf->banque->enabled && $conf->global->ADHERENT_BANK_USE)
+	{
+    	print '<tr><td>'.$langs->trans("BankTransactionLine").'</td><td class="valeur" colspan="2">';
+		$bankline=new AccountLine($db);
+		$result=$bankline->fetch($subscription->fk_bank);
+		print $bankline->getNomUrl(1,0,'showall');
+    	print '</td></tr>';
+	}
+		
 	print '<tr><td colspan="3" align="center">';
 	print '<input type="submit" class="button" name="submit" value="'.$langs->trans("Save").'">';
 	print ' &nbsp; &nbsp; &nbsp; ';
@@ -296,8 +317,11 @@ if ($rowid && $action != 'edit')
 
     // Amount
     print '<tr><td>'.$langs->trans("Amount").'</td><td class="valeur" colspan="3">'.price($subscription->amount).'</td></tr>';
-
-	// Bank account
+    
+    // Amount
+    print '<tr><td>'.$langs->trans("Label").'</td><td class="valeur" colspan="3">'.$subscription->note.'</td></tr>';
+    
+    // Bank account
 	if ($conf->banque->enabled)
 	{
 	    if ($subscription->fk_bank) 
@@ -309,13 +333,17 @@ if ($rowid && $action != 'edit')
 	    	$result=$bank->fetch($bankline->fk_account);
 
 	    	print '<tr>';
-	    	print '<td valign="top" width="140">'.$langs->trans('BankAccount').'</td>';
-			print '<td>'.$bank->getNomUrl(1).'</td>';
-	    	print '<td>'.$langs->trans("BankLineConciliated").'</td><td>'.yn($bankline->rappro).'</td>';
+	    	print '<td>'.$langs->trans('BankTransactionLine').'</td>';
+			print '<td colspan="3">';
+			$bankline=new AccountLine($db);
+			$result=$bankline->fetch($subscription->fk_bank);
+			print $bankline->getNomUrl(1,0,'showall');			
+	    	print '</td>';
 	    	print '</tr>';
 	    }
 	}
 
+	
     print "</table>\n";
     print '</form>';
     
diff --git a/htdocs/adherents/liste.php b/htdocs/adherents/liste.php
index 2519911c3a5f0e2ee305d700168d5469187626ae..ae47515aef85b809182fe2059d2dc98eab9283f6 100644
--- a/htdocs/adherents/liste.php
+++ b/htdocs/adherents/liste.php
@@ -19,14 +19,15 @@
  */
 
 /** 
-        \file       htdocs/adherents/liste.php
-        \ingroup    adherent
-		\brief      Page listant les adh�rents
-		\version    $Id$
-*/
+ *      \file       htdocs/adherents/liste.php
+ *      \ingroup    adherent
+ *		\brief      Page to list all members of fundation
+ *		\version    $Id$
+ */
 
 require("./pre.inc.php");
 require_once(DOL_DOCUMENT_ROOT."/adherents/adherent.class.php");
+require_once(DOL_DOCUMENT_ROOT."/adherents/adherent_type.class.php");
 
 $langs->load("members");
 $langs->load("companies");
@@ -38,6 +39,10 @@ $langs->load("companies");
 
 llxHeader();
 
+$form=new Form($db);
+
+$membertypestatic=new AdherentType($db);
+
 
 $sall=isset($_GET["sall"])?$_GET["sall"]:$_POST["sall"];
 
@@ -66,9 +71,9 @@ if ($sall)
     $sql.=" OR d.email like '%".$sall."%' OR d.login like '%".$sall."%' OR d.adresse like '%".$sall."%'";
     $sql.=" OR d.ville like '%".$sall."%' OR d.note like '%".$sall."%')";
 }
-if ($_GET["type"])
+if ($_REQUEST["type"] > 0)
 {
-    $sql.=" AND t.rowid=".$_GET["type"];
+    $sql.=" AND t.rowid=".$_REQUEST["type"];
 }
 if (isset($_GET["statut"]))
 {   
@@ -111,10 +116,10 @@ if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST))
 $sql.= " ".$db->order($sortfield,$sortorder);
 $sql.= " ".$db->plimit($conf->liste_limit+1, $offset);
 
-$result = $db->query($sql);
-if ($result) 
+$resql = $db->query($sql);
+if ($resql) 
 {
-    $num = $db->num_rows($result);
+    $num = $db->num_rows($resql);
     $i = 0;
 
     $titre=$langs->trans("MembersList");
@@ -131,9 +136,11 @@ if ($result)
         $titre=$langs->trans("MembersListQualified");
     }
 
-    if ($_GET["type"]) {
-        $objp = $db->fetch_object($result);
-        $titre.=" (".$objp->type.")";
+    if ($_REQUEST["type"] > 0) 
+    {
+		$membertype=new AdherentType($db);
+        $result=$membertype->fetch($_REQUEST["type"]);
+		$titre.=" (".$membertype->libelle.")";
     }
 
     $param="";
@@ -165,9 +172,12 @@ if ($result)
 	print '<input class="flat" type="text" name="search_nom" value="'.$_REQUEST["search_nom"].'" size="12"></td>';
 
 	print '<td align="left">';
-	print '<input class="flat" type="text" name="search_login" value="'.$_REQUEST["search_login"].'" size="12"></td>';
+	print '<input class="flat" type="text" name="search_login" value="'.$_REQUEST["search_login"].'" size="8"></td>';
 	
-	print '<td class="liste_titre">&nbsp;</td>';
+	print '<td class="liste_titre">';
+    $listetype=$membertypestatic->liste_array();
+    $form->select_array("type", $listetype, $_REQUEST["type"], 1, 0, 0, 0, '', 0, 16);
+    print '</td>';
 
 	print '<td class="liste_titre">&nbsp;</td>';
 
@@ -186,12 +196,7 @@ if ($result)
     $var=True;
     while ($i < $num && $i < $conf->liste_limit)
     {
-        if ($_GET["type"] && $i==0)
-        {
-        	# Fetch deja fait
-        } else {
-            $objp = $db->fetch_object($result);
-        }
+        $objp = $db->fetch_object($resql);
 
         $adh=new Adherent($db);
 
@@ -211,17 +216,21 @@ if ($result)
         print "<td>".$objp->login."</td>\n";
 
         // Type
-        print '<td><a href="type.php?rowid='.$objp->type_id.'">'.img_object($langs->trans("ShowType"),"group").' '.$objp->type.'</a></td>';
+        print '<td nowrap="nowrap">';
+        $membertypestatic->id=$objp->type_id;
+        $membertypestatic->libelle=$objp->type;
+        print $membertypestatic->getNomUrl(1,16);
+        print '</td>';
         
         // Moral/Physique
         print "<td>".$adh->getmorphylib($objp->morphy)."</td>\n";
 
         // EMail
-        print "<td>".$objp->email."</td>\n";
+        print "<td>".dol_print_email($objp->email)."</td>\n";
         
         // Statut
         print "<td>";
-        print $adh->LibStatut($objp->statut,$objp->cotisation,$objp->datefin,4);
+        print $adh->LibStatut($objp->statut,$objp->cotisation,$objp->datefin,2);
         print "</td>";
 
         // Date fin cotisation
diff --git a/htdocs/compta/bank/account.class.php b/htdocs/compta/bank/account.class.php
index eefe51a120f55e82c690e4459b3b0b7a2eff8c43..f63fe917dcfe012bd29531682425e1fdd69dc968 100644
--- a/htdocs/compta/bank/account.class.php
+++ b/htdocs/compta/bank/account.class.php
@@ -756,6 +756,7 @@ class Account extends CommonObject
  */
 class AccountLine
 {
+	var $error;
 	var $db;
 
 	var $rowid;
@@ -766,8 +767,11 @@ class AccountLine
 	var $amount;
 	var $label;
 	var $note;
+	var $fk_account;
 
-
+	var $bank_account_label;
+	
+	
 	/**
 	 *  Constructeur
 	 */
@@ -788,11 +792,12 @@ class AccountLine
 	 */
 	function fetch($rowid)
 	{
-		$sql = "SELECT datec, datev, dateo, amount, label, fk_account,";
-		$sql.= " fk_user_author, fk_user_rappro,";
-		$sql.= " fk_type, num_releve, num_chq, rappro, note";
-		$sql.= " FROM ".MAIN_DB_PREFIX."bank";
-		$sql.= " WHERE rowid  = ".$rowid;
+		$sql = "SELECT b.datec, b.datev, b.dateo, b.amount, b.label as label, b.fk_account,";
+		$sql.= " b.fk_user_author, b.fk_user_rappro,";
+		$sql.= " b.fk_type, b.num_releve, b.num_chq, b.rappro, b.note,";
+		$sql.= " ba.label as bank_account_label";
+		$sql.= " FROM ".MAIN_DB_PREFIX."bank as b, ".MAIN_DB_PREFIX."bank_account as ba";
+		$sql.= " WHERE b.fk_account = ba.rowid AND b.rowid  = ".$rowid;
 
 		dolibarr_syslog("AccountLine::fetch sql=".$sql);
 		$result = $this->db->query($sql);
@@ -821,6 +826,8 @@ class AccountLine
 				$this->num_chq        = $obj->num_chq;
 
 				$this->rappro        = $obj->rappro;
+
+				$this->bank_account_label = $obj->bank_account_label;
 			}
 			$this->db->free($result);
 			return 1;
@@ -955,7 +962,15 @@ class AccountLine
 		}
 	}
 
-	function getNomUrl($withpicto=0)
+	
+	/**
+	 *    	\brief      Renvoie nom clicable (avec eventuellement le picto)
+	 *		\param		withpicto		0=Pas de picto, 1=Inclut le picto dans le lien, 2=Picto seul
+	 *		\param		maxlen			Longueur max libelle
+	 *		\param		option			Option ('showall')
+	 *		\return		string			Chaine avec URL
+	 */
+	function getNomUrl($withpicto=0,$maxlen=0,$option='')
 	{
 		global $langs;
 
@@ -966,6 +981,20 @@ class AccountLine
 
 		if ($withpicto) $result.=($lien.img_object($langs->trans("ShowTransaction"),'account').$lienfin.' ');
 		$result.=$lien.$this->rowid.$lienfin;
+
+		if ($option == 'showall')
+		{
+			$result.=' (';
+			$result.=$langs->trans("BankAccount").': ';
+			$accountstatic=new Account($this->db);
+			$accountstatic->id=$this->fk_account;
+			$accountstatic->label=$this->bank_account_label;
+			$result.=$accountstatic->getNomUrl(0).', ';
+			$result.=$langs->trans("BankLineConciliated").': ';
+	    	$result.=yn($this->rappro);
+	    	$result.=')';			
+		}
+		
 		return $result;
 	}
 }
diff --git a/htdocs/compta/bank/info.php b/htdocs/compta/bank/info.php
index 3ccc80c307ebfef6e5df7aa9efa8906b25b2117c..526563139264f53ba8595b0dff2eb9e74c18392d 100644
--- a/htdocs/compta/bank/info.php
+++ b/htdocs/compta/bank/info.php
@@ -1,5 +1,5 @@
 <?php
-/* Copyright (C) 2005 Laurent Destailleur  <eldy@users.sourceforge.net>
+/* Copyright (C) 2005-2008 Laurent Destailleur  <eldy@users.sourceforge.net>
  *
  * 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
@@ -14,16 +14,13 @@
  * You should have received a copy of the GNU General Public License
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- *
- * $Id$
- * $Source$
  */
 
 /**
     	\file       htdocs/compta/bank/info.php
 		\ingroup    banque
 		\brief      Onglet info d'une ecriture bancaire
-		\version    $Revision$
+		\version    $Id$
 */
 
 require("./pre.inc.php");
@@ -57,7 +54,7 @@ $hselected = $h;
 $h++;      
 
 
-dolibarr_fiche_head($head, $hselected, $langs->trans("LineRecord").": ".$line->ref);
+dolibarr_fiche_head($head, $hselected, $langs->trans("LineRecord"));
 
 print '<table width="100%"><tr><td>';
 dolibarr_print_object_info($line);
diff --git a/htdocs/compta/bank/ligne.php b/htdocs/compta/bank/ligne.php
index 346fa21d480d6ddc9c078dcf78ab79be3e67fead..c032fd742823f4795c8fa97b996b42ffa20ae90c 100644
--- a/htdocs/compta/bank/ligne.php
+++ b/htdocs/compta/bank/ligne.php
@@ -20,10 +20,10 @@
  */
 
 /**
- \file       htdocs/compta/bank/ligne.php
- \ingroup    compta
- \brief      Page edition d'une ecriture bancaire
- \version    $Id$
+ *	\file       htdocs/compta/bank/ligne.php
+ *	\ingroup    compta
+ *	\brief      Page edition d'une ecriture bancaire
+ *	\version    $Id$
  */
 
 require("./pre.inc.php");
@@ -90,7 +90,7 @@ if ($_POST["action"] == "update")
 	{
 		$objp = $db->fetch_object($result);
 		if ($objp->rappro)
-		die ("Vous ne pouvez pas modifier une �criture d�j� rapproch�e");
+		die ("Conciliation of a line already conciliated is not possible");
 	}
 
 	$db->begin();
@@ -198,7 +198,7 @@ $head[$h][0] = DOL_URL_ROOT.'/compta/bank/info.php?rowid='.$_GET["rowid"];
 $head[$h][1] = $langs->trans("Info");
 $h++;
 
-dolibarr_fiche_head($head, $hselected, $langs->trans('LineRecord').': '.$_GET["rowid"]);
+dolibarr_fiche_head($head, $hselected, $langs->trans('LineRecord'));
 
 
 $sql = "SELECT b.rowid,".$db->pdate("b.dateo")." as do,".$db->pdate("b.datev")." as dv, b.amount, b.label, b.rappro,";
@@ -217,8 +217,8 @@ if ($result)
 		// Confirmations
 		if ($_GET["action"] == 'delete_categ')
 		{
-	  $html->form_confirm("ligne.php?rowid=".$_GET["rowid"]."&amp;cat1=".$_GET["fk_categ"]."&amp;orig_account=".$orig_account,$langs->trans("RemoveFromCategory"),$langs->trans("RemoveFromCategoryConfirm"),"confirm_delete_categ");
-	  print '<br>';
+			$html->form_confirm("ligne.php?rowid=".$_GET["rowid"]."&amp;cat1=".$_GET["fk_categ"]."&amp;orig_account=".$orig_account,$langs->trans("RemoveFromCategory"),$langs->trans("RemoveFromCategoryConfirm"),"confirm_delete_categ");
+			print '<br>';
 		}
 
 		print '<table class="border" width="100%">';
@@ -232,20 +232,23 @@ if ($result)
 
 		$links=$acct->get_url($rowid);
 
-		// Tableau sur 4 colonne si deja rapproche, sinon sur 5 colonnes
-
+		// Ref
+		print '<tr><td width="20%">'.$langs->trans("Ref")."</td>";
+		print '<td colspan="4">'.$objp->rowid.'</td>';
+		print '</tr>';
+		
 		// Author
 		print '<tr><td width="20%">'.$langs->trans("Author")."</td>";
 		if ($objp->fk_user_author)
 		{
-	  $author=new User($db,$objp->fk_user_author);
-	  $author->fetch();
-	  print '<td colspan="4"><a href="'.DOL_URL_ROOT.'/user/fiche.php?id='.$author->id.'">';
-	  print img_object($langs->trans("ShowUser"),'user').' '.$author->fullname.'</a></td>';
+			$author=new User($db,$objp->fk_user_author);
+			$author->fetch();
+			print '<td colspan="4"><a href="'.DOL_URL_ROOT.'/user/fiche.php?id='.$author->id.'">';
+			print img_object($langs->trans("ShowUser"),'user').' '.$author->fullname.'</a></td>';
 		}
 		else
 		{
-	  print '<td colspan="4">&nbsp;</td>';
+			print '<td colspan="4">&nbsp;</td>';
 		}
 		print "</tr>";
 
@@ -267,14 +270,14 @@ if ($result)
 		print '<tr><td>'.$langs->trans("DateOperation").'</td>';
 		if (! $objp->rappro && ($user->rights->banque->modifier || $user->rights->banque->consolidate))
 		{
-	  print '<td colspan="3">';
-	  $html->select_date($objp->do,'dateo','','','','update');
-	  print '</td><td align="center"><input type="submit" class="button" value="'.$langs->trans("Update").'"></td>';
+			print '<td colspan="3">';
+			$html->select_date($objp->do,'dateo','','','','update');
+			print '</td><td align="center"><input type="submit" class="button" value="'.$langs->trans("Update").'"></td>';
 		}
 		else
 		{
-	  print '<td colspan="4">';
-	  print dolibarr_print_date($objp->do);
+			print '<td colspan="4">';
+			print dolibarr_print_date($objp->do);
 		}
 		print '</td></tr>';
 
@@ -308,7 +311,7 @@ if ($result)
 			print '<input name="label" class="flat" value="';
 			if (eregi('^\((.*)\)$',$objp->label,$reg))
 			{
-				// Label g�n�rique car entre parenth�ses. On l'affiche en le traduisant	
+				// Label g�n�rique car entre parenth�ses. On l'affiche en le traduisant
 				print $langs->trans($reg[1]);
 			}
 			else
@@ -321,16 +324,16 @@ if ($result)
 		}
 		else
 		{
-			  print '<td colspan="4">';
-			  if (eregi('^\((.*)\)$',$objp->label,$reg))
-			  {
-			  	// Label g�n�rique car entre parenth�ses. On l'affiche en le traduisant	
-			  	print $langs->trans($reg[1]);
-			  }
-			  else
-			  {
-			  	print $objp->label;
-			  }
+			print '<td colspan="4">';
+			if (eregi('^\((.*)\)$',$objp->label,$reg))
+			{
+				// Label g�n�rique car entre parenth�ses. On l'affiche en le traduisant
+				print $langs->trans($reg[1]);
+			}
+			else
+			{
+				print $objp->label;
+			}
 		}
 		print '</td></tr>';
 
@@ -397,14 +400,14 @@ if ($result)
 		print "<tr><td>".$langs->trans("Amount")."</td>";
 		if (! $objp->rappro && $user->rights->banque->modifier)
 		{
-	  print '<td colspan="3">';
-	  print '<input name="amount" class="flat" size="10" value="'.price($objp->amount).'"> '.$langs->trans("Currency".$conf->monnaie);
-	  print '</td><td align="center"><input type="submit" class="button" value="'.$langs->trans("Update").'">';
+			print '<td colspan="3">';
+			print '<input name="amount" class="flat" size="10" value="'.price($objp->amount).'"> '.$langs->trans("Currency".$conf->monnaie);
+			print '</td><td align="center"><input type="submit" class="button" value="'.$langs->trans("Update").'">';
 		}
 		else
 		{
-	  print '<td colspan="4">';
-	  print price($objp->amount);
+			print '<td colspan="4">';
+			print price($objp->amount);
 		}
 		print "</td></tr>";
 
diff --git a/htdocs/compta/paiement/fiche.php b/htdocs/compta/paiement/fiche.php
index 38c1115a6eff4bd68307b5b604e427b2006b0533..3eba329de7ab1ea53eae4d2b849ae93c47ceec5e 100644
--- a/htdocs/compta/paiement/fiche.php
+++ b/htdocs/compta/paiement/fiche.php
@@ -128,7 +128,7 @@ $head[$h][1] = $langs->trans("Info");
 $h++;      
 
 
-dolibarr_fiche_head($head, $hselected, $langs->trans("Payment").": ".$paiement->ref);
+dolibarr_fiche_head($head, $hselected, $langs->trans("Payment"));
 
 /*
  * Confirmation de la suppression du paiement
@@ -158,25 +158,6 @@ print '<table class="border" width="100%">';
 // Ref
 print '<tr><td valign="top" width="140">'.$langs->trans('Ref').'</td><td colspan="3">'.$paiement->id.'</td></tr>';
 
-// Bank account
-if ($conf->banque->enabled)
-{
-    if ($paiement->bank_account) 
-    {
-    	$bankline=new AccountLine($db);
-    	$bankline->fetch($paiement->bank_line);
-    
-    	$bank=new Account($db);
-    	$bank->fetch($bankline->fk_account);
-
-    	print '<tr>';
-    	print '<td valign="top" width="140">'.$langs->trans('BankAccount').'</td>';
-    	print '<td>'.$bank->getNomUrl(1).'</td>';
-    	print '<td>'.$langs->trans("BankLineConciliated").'</td><td>'.yn($bankline->rappro).'</td>';
-    	print '</tr>';
-    }
-}
-
 // Date
 print '<tr><td valign="top" width="120">'.$langs->trans('Date').'</td><td colspan="3">'.dolibarr_print_date($paiement->date,'day').'</td></tr>';
 
@@ -196,6 +177,23 @@ print '<tr><td valign="top">'.$langs->trans('Amount').'</td><td colspan="3">'.pr
 // Note
 print '<tr><td valign="top">'.$langs->trans('Note').'</td><td colspan="3">'.nl2br($paiement->note).'</td></tr>';
 
+// Bank account
+if ($conf->banque->enabled)
+{
+    if ($paiement->bank_account) 
+    {
+    	$bankline=new AccountLine($db);
+    	$bankline->fetch($paiement->bank_line);
+    
+    	print '<tr>';
+    	print '<td>'.$langs->trans('BankTransactionLine').'</td>';
+		print '<td colspan="3">';
+		print $bankline->getNomUrl(1,0,'showall');			
+    	print '</td>';
+    	print '</tr>';
+    }
+}
+
 print '</table>';
 
 
diff --git a/htdocs/compta/paiement/info.php b/htdocs/compta/paiement/info.php
index cab074b10415788f35b3de2c3e651d1aef5c7f09..b659a2aa7599e465230bbf42e7ba82eb6c1792d3 100644
--- a/htdocs/compta/paiement/info.php
+++ b/htdocs/compta/paiement/info.php
@@ -55,7 +55,16 @@ $hselected = $h;
 $h++;      
 
 
-dolibarr_fiche_head($head, $hselected, $langs->trans("Payment").": ".$paiement->ref);
+dolibarr_fiche_head($head, $hselected, $langs->trans("Payment"));
+
+print '<table class="border" width="100%">';
+
+// Ref
+print '<tr><td valign="top" width="140">'.$langs->trans('Ref').'</td><td colspan="3">'.$paiement->id.'</td></tr>';
+
+print '</table>';
+
+print '<br>';
 
 print '<table width="100%"><tr><td>';
 dolibarr_print_object_info($paiement);
diff --git a/htdocs/html.form.class.php b/htdocs/html.form.class.php
index 96ea184fb8929a904305fe003e333fcc0849ca38..10652319fc478620f929dc35bdfc9887959c4e68 100644
--- a/htdocs/html.form.class.php
+++ b/htdocs/html.form.class.php
@@ -2795,8 +2795,9 @@ class Form
 	 *	\param	optionType      Type de l'option: 1 pour des fonctions javascript
 	 *	\param  option          Valeur de l'option en fonction du type choisi
 	 *	\param  translate       Traduire la valeur
+	 * 	\param	maxlen			Length maximum for labels
 	 */
-	function select_array($htmlname, $array, $id='', $show_empty=0, $key_in_label=0, $value_as_key=0, $optionType=0, $option='', $translate=0)
+	function select_array($htmlname, $array, $id='', $show_empty=0, $key_in_label=0, $value_as_key=0, $optionType=0, $option='', $translate=0, $maxlen=0)
 	{
 		global $langs;
 		// \TODO Simplify optionType and option (only one should be necessary)
@@ -2827,12 +2828,14 @@ class Form
 
 			if ($key_in_label)
 			{
-				$selectOptionValue = $key.' - '.($translate?$langs->trans($value):$value);
+				$newval=($translate?$langs->trans($value):$value);
+				$selectOptionValue = $key.' - '.($maxlen?dolibarr_trunc($newval,$maxlen):$newval);
 				print $selectOptionValue;
 			}
 			else
 			{
-				$selectOptionValue = ($translate?$langs->trans($value):$value);
+				$newval=($translate?$langs->trans($value):$value);
+				$selectOptionValue = ($maxlen?dolibarr_trunc($newval,$maxlen):$newval); 
 				if ($value == '' || $value == '-') { $selectOptionValue='&nbsp;'; }
 				print $selectOptionValue;
 			}
diff --git a/htdocs/langs/en_US/banks.lang b/htdocs/langs/en_US/banks.lang
index cea31119d2ec7332880664f5fe71b16ce68824c9..155fbd1307fbd5c0117b1e185237eafef0744eb4 100644
--- a/htdocs/langs/en_US/banks.lang
+++ b/htdocs/langs/en_US/banks.lang
@@ -121,4 +121,5 @@ TransactionWithOtherAccount=Account transfert
 PaymentNumberUpdateSucceeded=Payment number updated succesfully
 PaymentNumberUpdateFailed=Payment number could not be updated
 PaymentDateUpdateSucceeded=Payment date update succesfully
-PaymentDateUpdateFailed=Payment date could not be updated
\ No newline at end of file
+PaymentDateUpdateFailed=Payment date could not be updated
+BankTransactionLine=Bank transaction
\ No newline at end of file
diff --git a/htdocs/langs/en_US/members.lang b/htdocs/langs/en_US/members.lang
index 78f2d502087d0a4200b4be18d2f5fe5a05b1e96d..7d3c8240932bb6b42ce5833710a2c19214e9f334 100644
--- a/htdocs/langs/en_US/members.lang
+++ b/htdocs/langs/en_US/members.lang
@@ -131,4 +131,4 @@ DescADHERENT_ETIQUETTE_TYPE=Labels format
 DescADHERENT_CARD_HEADER_TEXT=Text printed on top of member cards
 DescADHERENT_CARD_TEXT=Text printed on member cards
 DescADHERENT_CARD_FOOTER_TEXT=Text printed on bottom of member cards
-
+ShowTypeCard=Show type %s
diff --git a/htdocs/langs/fr_FR/banks.lang b/htdocs/langs/fr_FR/banks.lang
index 926e19fa1357fc2c5518ffa3381149fd72873141..d0d01b9431e79d981ca1ea4c0b5658058c7ea385 100644
--- a/htdocs/langs/fr_FR/banks.lang
+++ b/htdocs/langs/fr_FR/banks.lang
@@ -121,4 +121,5 @@ TransactionWithOtherAccount=Transfert de compte
 PaymentNumberUpdateSucceeded=Num�ro de paiement mis � jour
 PaymentNumberUpdateFailed=Impossible de mettre le num�ro de paiement � jour
 PaymentDateUpdateSucceeded=Date de paiement mise � jour
-PaymentDateUpdateFailed=Impossible de mettre la date de paiement � jour
\ No newline at end of file
+PaymentDateUpdateFailed=Impossible de mettre la date de paiement � jour
+BankTransactionLine=Ecriture bancaire
\ No newline at end of file
diff --git a/htdocs/langs/fr_FR/members.lang b/htdocs/langs/fr_FR/members.lang
index a2026950f2672321218a4db033a3c54448499ad4..46c6a629099ae2e2b15448249e4092084d2af830 100644
--- a/htdocs/langs/fr_FR/members.lang
+++ b/htdocs/langs/fr_FR/members.lang
@@ -131,3 +131,4 @@ DescADHERENT_ETIQUETTE_TYPE=Format 
 DescADHERENT_CARD_HEADER_TEXT=Texte imprim� sur le haut des cartes adh�rents
 DescADHERENT_CARD_TEXT=Texte imprim� sur les cartes adh�rents
 DescADHERENT_CARD_FOOTER_TEXT=Texte imprim� sur le bas des cartes adh�rents
+ShowTypeCard=Voir type %s
\ No newline at end of file