diff --git a/build/makepack-dolibarr.pl b/build/makepack-dolibarr.pl
index 809f279756cea22b866fe9c2a0839d3191eb0fd1..ac735c59e0d00502383f85610d0377daed6b7e20 100755
--- a/build/makepack-dolibarr.pl
+++ b/build/makepack-dolibarr.pl
@@ -603,7 +603,7 @@ if ($nboftargetok) {
 		if ($target eq 'TGZ') 
 		{
 			$NEWDESTI=$DESTI;
-			if ($NEWPUBLISH =~ /stable/)
+			if ($NEWDESTI =~ /stable/)
 			{
 				mkdir($DESTI.'/standard');
 				if (-d $DESTI.'/standard') { $NEWDESTI=$DESTI.'/standard'; } 
@@ -635,7 +635,7 @@ if ($nboftargetok) {
 		if ($target eq 'XZ') 
 		{
 			$NEWDESTI=$DESTI;
-			if ($NEWPUBLISH =~ /stable/)
+			if ($NEWDESTI =~ /stable/)
 			{
 				mkdir($DESTI.'/standard');
 				if (-d $DESTI.'/standard') { $NEWDESTI=$DESTI.'/standard'; }
@@ -672,7 +672,7 @@ if ($nboftargetok) {
 		if ($target eq 'ZIP') 
 		{
 			$NEWDESTI=$DESTI;
-			if ($NEWPUBLISH =~ /stable/)
+			if ($NEWDESTI =~ /stable/)
 			{
 				mkdir($DESTI.'/standard');
 				if (-d $DESTI.'/standard') { $NEWDESTI=$DESTI.'/standard'; }
@@ -713,7 +713,7 @@ if ($nboftargetok) {
 			if ($target =~ /FEDO/i) { $subdir="package_rpm_redhat-fedora"; }
 			if ($target =~ /MAND/i) { $subdir="package_rpm_mandriva"; }
 			if ($target =~ /OPEN/i) { $subdir="package_rpm_opensuse"; }
-			if ($NEWPUBLISH =~ /stable/)
+			if ($NEWDESTI =~ /stable/)
 			{
 				mkdir($DESTI.'/'.$subdir);
 				if (-d $DESTI.'/'.$subdir) { $NEWDESTI=$DESTI.'/'.$subdir; }
@@ -799,7 +799,7 @@ if ($nboftargetok) {
 		if ($target eq 'DEB') 
 		{
 			$NEWDESTI=$DESTI;
-			if ($NEWPUBLISH =~ /stable/)
+			if ($NEWDESTI =~ /stable/)
 			{
 				mkdir($DESTI.'/package_debian-ubuntu');
 				if (-d $DESTI.'/package_debian-ubuntu') { $NEWDESTI=$DESTI.'/package_debian-ubuntu'; }
@@ -1002,7 +1002,7 @@ if ($nboftargetok) {
 		if ($target eq 'APS') 
 		{
 			$NEWDESTI=$DESTI;
-			if ($NEWPUBLISH =~ /stable/)
+			if ($NEWDESTI =~ /stable/)
 			{
 				mkdir($DESTI.'/package_aps');
 				if (-d $DESTI.'/package_aps') { $NEWDESTI=$DESTI.'/package_aps'; }
@@ -1088,7 +1088,7 @@ if ($nboftargetok) {
 		if ($target eq 'EXEDOLIWAMP')
 		{
 			$NEWDESTI=$DESTI;
-			if ($NEWPUBLISH =~ /stable/)
+			if ($NEWDESTI =~ /stable/)
 			{
 				mkdir($DESTI.'/package_windows');
 				if (-d $DESTI.'/package_windows') { $NEWDESTI=$DESTI.'/package_windows'; }
diff --git a/htdocs/admin/prelevement.php b/htdocs/admin/prelevement.php
index 1a021996163321b5f00db64368273692ec8c2ae8..0e82681c686c9c9f63fd24146219e64e2bd8c017 100644
--- a/htdocs/admin/prelevement.php
+++ b/htdocs/admin/prelevement.php
@@ -48,11 +48,11 @@ if ($action == "set")
 
     $id=GETPOST('PRELEVEMENT_ID_BANKACCOUNT','int');
     $account = new Account($db);
-
     if($account->fetch($id)>0)
     {
         $res = dolibarr_set_const($db, "PRELEVEMENT_ID_BANKACCOUNT", $id,'chaine',0,'',$conf->entity);
         if (! $res > 0) $error++;
+        /*
         $res = dolibarr_set_const($db, "PRELEVEMENT_CODE_BANQUE", $account->code_banque,'chaine',0,'',$conf->entity);
         if (! $res > 0) $error++;
         $res = dolibarr_set_const($db, "PRELEVEMENT_CODE_GUICHET", $account->code_guichet,'chaine',0,'',$conf->entity);
@@ -67,6 +67,7 @@ if ($action == "set")
         if (! $res > 0) $error++;
         $res = dolibarr_set_const($db, "PRELEVEMENT_RAISON_SOCIALE", $account->proprio,'chaine',0,'',$conf->entity);
         if (! $res > 0) $error++;
+        */
     }
     else $error++;
 
diff --git a/htdocs/categories/edit.php b/htdocs/categories/edit.php
index 715547c33112a89c0e4b0c779c33c8609dcb492c..d746ac932180781dd37145ee118f4b6033b6af10 100644
--- a/htdocs/categories/edit.php
+++ b/htdocs/categories/edit.php
@@ -1,6 +1,6 @@
 <?php
 /* Copyright (C) 2005      Matthieu Valleton    <mv@seeschloss.org>
- * Copyright (C) 2006-2010 Laurent Destailleur  <eldy@users.sourceforge.net>
+ * Copyright (C) 2006-2016 Laurent Destailleur  <eldy@users.sourceforge.net>
  * Copyright (C) 2005-2012 Regis Houssin        <regis.houssin@capnetworks.com>
  * Copyright (C) 2007      Patrick Raguin	  	<patrick.raguin@gmail.com>
  *
@@ -147,7 +147,7 @@ dol_fiche_head('');
 print '<table class="border" width="100%">';
 
 // Ref
-print '<tr><td class="fieldrequired" width="25%">';
+print '<tr><td class="titlefieldcreate fieldrequired">';
 print $langs->trans("Ref").'</td>';
 print '<td><input type="text" size="25" id="label" name ="label" value="'.$object->label.'" />';
 print '</tr>';
diff --git a/htdocs/compta/bank/search.php b/htdocs/compta/bank/search.php
index 28917aca9577078f750b31a8f69bcbd0c40025d5..33e98f304c84adc35a64e58a143fd9222a459109 100644
--- a/htdocs/compta/bank/search.php
+++ b/htdocs/compta/bank/search.php
@@ -211,8 +211,8 @@ if ($resql)
     print_liste_field_titre($langs->trans("Numero"),$_SERVER['PHP_SELF'],'b.num_releve','',$param,'align="center"',$sortfield,$sortorder);
 	print_liste_field_titre($langs->trans("Description"),$_SERVER['PHP_SELF'],'','',$param,'',$sortfield,$sortorder);
 	print_liste_field_titre($langs->trans("ThirdParty"),$_SERVER['PHP_SELF'],'bu.label','',$param,'',$sortfield,$sortorder);
-	print_liste_field_titre($langs->trans("Debit"),$_SERVER['PHP_SELF'],'','',$param,'align="right"',$sortfield,$sortorder);
-	print_liste_field_titre($langs->trans("Credit"),$_SERVER['PHP_SELF'],'','',$param,'align="right"',$sortfield,$sortorder);
+	print_liste_field_titre($langs->trans("Debit"),$_SERVER['PHP_SELF'],'b.amount','',$param,'align="right"',$sortfield,$sortorder);
+	print_liste_field_titre($langs->trans("Credit"),$_SERVER['PHP_SELF'],'b.amount','',$param,'align="right"',$sortfield,$sortorder);
 	print_liste_field_titre($langs->trans("Account"),$_SERVER['PHP_SELF'],'ba.ref','',$param,'align="right"',$sortfield,$sortorder);
 	print_liste_field_titre('');
 	print "</tr>\n";
diff --git a/htdocs/compta/facture/fiche-rec.php b/htdocs/compta/facture/fiche-rec.php
index 3e2fd7447f03a42a2a39afe072aa406112308c4d..b6b9ca87ac5ba31b20521091ba5e8fad9253f144 100644
--- a/htdocs/compta/facture/fiche-rec.php
+++ b/htdocs/compta/facture/fiche-rec.php
@@ -1002,7 +1002,7 @@ else
     	if ($action == 'ask_deleteline') {
     		$formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id . '&lineid=' . $lineid, $langs->trans('DeleteProductLine'), $langs->trans('ConfirmDeleteProductLine'), 'confirm_deleteline', '', 'no', 1);
     	}
-    
+
     	print $formconfirm;
     	
 		$author = new User($db);
@@ -1160,7 +1160,7 @@ else
 		print '<table class="border" width="100%">';
 
 		// if "frequency" is empty or = 0, the reccurence is disabled
-		print '<tr><td width="20%">';
+		print '<tr><td class="titlefield">';
 		print '<table class="nobordernopadding" width="100%"><tr><td>';
 		print $langs->trans('Frequency');
 		print '</td>';
@@ -1263,7 +1263,7 @@ else
     		print '<table class="border" width="100%">';
     		
     		// Nb of generation already done
-    		print '<tr><td width="20%">'.$langs->trans("NbOfGenerationDone").'</td>';
+    		print '<tr><td class="titlefield">'.$langs->trans("NbOfGenerationDone").'</td>';
     		print '<td>';
     		print $object->nb_gen_done?$object->nb_gen_done:'0';
     		print '</td>';
@@ -1643,7 +1643,7 @@ else
 					$i++;
 				}
 			}
-			else print '<tr '.$bc[false].'><td colspan="9">'.$langs->trans("NoneF").'</td></tr>';
+			else print '<tr '.$bc[false].'><td colspan="9" class="opacitymedium">'.$langs->trans("NoneF").'</td></tr>';
 
 			print "</table>";
 			$db->free($resql);
diff --git a/htdocs/compta/prelevement/class/bonprelevement.class.php b/htdocs/compta/prelevement/class/bonprelevement.class.php
index 800cd8492c99ab7cd2d9c92992f65c5327525a26..a49b5f5f7c6d94f9d50c145f0d91c28347db581c 100644
--- a/htdocs/compta/prelevement/class/bonprelevement.class.php
+++ b/htdocs/compta/prelevement/class/bonprelevement.class.php
@@ -27,6 +27,7 @@
 
 require_once DOL_DOCUMENT_ROOT.'/core/class/commonobject.class.php';
 require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php';
+require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php';
 require_once DOL_DOCUMENT_ROOT.'/societe/class/societe.class.php';
 require_once DOL_DOCUMENT_ROOT.'/compta/paiement/class/paiement.class.php';
 
@@ -1015,15 +1016,21 @@ class BonPrelevement extends CommonObject
                     $this->date_echeance = $datetimeprev;
                     $this->reference_remise = $ref;
 
-                    $this->raison_sociale              = $conf->global->PRELEVEMENT_RAISON_SOCIALE;
-
-                    $this->emetteur_code_banque 		  = $conf->global->PRELEVEMENT_CODE_BANQUE;
-                    $this->emetteur_code_guichet       = $conf->global->PRELEVEMENT_CODE_GUICHET;
-                    $this->emetteur_numero_compte      = $conf->global->PRELEVEMENT_NUMERO_COMPTE;
-                    $this->emetteur_number_key		  = $conf->global->PRELEVEMENT_NUMBER_KEY;
-                    $this->emetteur_iban               = $conf->global->PRELEVEMENT_IBAN;
-                    $this->emetteur_bic                = $conf->global->PRELEVEMENT_BIC;
-                    $this->emetteur_ics                = $conf->global->PRELEVEMENT_ICS;		// Ex: PRELEVEMENT_ICS = "FR78ZZZ123456";
+                    $id=$conf->global->PRELEVEMENT_ID_BANKACCOUNT;
+                    $account = new Account($this->db);
+                    if ($account->fetch($id)>0)
+                    {
+                        $this->emetteur_code_banque 	   = $account->code_banque;
+                        $this->emetteur_code_guichet       = $account->code_guichet;
+                        $this->emetteur_numero_compte      = $account->number;
+                        $this->emetteur_number_key		   = $account->cle_rib;
+                        $this->emetteur_iban               = $account->iban;
+                        $this->emetteur_bic                = $account->bic;
+
+                        $this->emetteur_ics                = $conf->global->PRELEVEMENT_ICS;		// Ex: PRELEVEMENT_ICS = "FR78ZZZ123456";
+    
+                        $this->raison_sociale              = $account->proprio;
+                    }
 
                     $this->factures = $factures_prev_id;
 
@@ -1680,6 +1687,23 @@ class BonPrelevement extends CommonObject
 		$dateTime_ETAD = dol_print_date($ladate, '%Y-%m-%d');
 		$dateTime_YMDHMS = dol_print_date($ladate, '%Y-%m-%dT%H:%M:%S');
 
+		// Get data of bank account
+		$id=$configuration->global->PRELEVEMENT_ID_BANKACCOUNT;
+		$account = new Account($this->db);
+		if ($account->fetch($id)>0)
+		{
+		    $this->emetteur_code_banque 	   = $account->code_banque;
+		    $this->emetteur_code_guichet       = $account->code_guichet;
+		    $this->emetteur_numero_compte      = $account->number;
+		    $this->emetteur_number_key		   = $account->cle_rib;
+		    $this->emetteur_iban               = $account->iban;
+		    $this->emetteur_bic                = $account->bic;
+		
+		    $this->emetteur_ics                = $conf->global->PRELEVEMENT_ICS;		// Ex: PRELEVEMENT_ICS = "FR78ZZZ123456";
+		
+		    $this->raison_sociale              = $account->proprio;
+		}
+		
 		// Récupération info demandeur
 		$sql = "SELECT rowid, ref";
 		$sql.= " FROM";
@@ -1714,7 +1738,7 @@ class BonPrelevement extends CommonObject
 			$XML_SEPA_INFO .= '			</PmtTpInf>'.$CrLf;
 			$XML_SEPA_INFO .= '			<ReqdColltnDt>'.$dateTime_ETAD.'</ReqdColltnDt>'.$CrLf;
 			$XML_SEPA_INFO .= '			<Cdtr>'.$CrLf;
-			$XML_SEPA_INFO .= '				<Nm>'.strtoupper(dol_string_unaccent($configuration->global->PRELEVEMENT_RAISON_SOCIALE)).'</Nm>'.$CrLf;
+			$XML_SEPA_INFO .= '				<Nm>'.strtoupper(dol_string_unaccent($this->raison_sociale)).'</Nm>'.$CrLf;
 			$XML_SEPA_INFO .= '				<PstlAdr>'.$CrLf;
 			$XML_SEPA_INFO .= '					<Ctry>'.$country[1].'</Ctry>'.$CrLf;
 			$XML_SEPA_INFO .= '					<AdrLine>'.strtoupper(dol_string_unaccent($configuration->global->MAIN_INFO_SOCIETE_ADDRESS)).'</AdrLine>'.$CrLf;
@@ -1723,16 +1747,16 @@ class BonPrelevement extends CommonObject
 			$XML_SEPA_INFO .= '			</Cdtr>'.$CrLf;
 			$XML_SEPA_INFO .= '			<CdtrAcct>'.$CrLf;
 			$XML_SEPA_INFO .= '				<Id>'.$CrLf;
-			$XML_SEPA_INFO .= '					<IBAN>'.preg_replace('/\s/', '', $configuration->global->PRELEVEMENT_IBAN).'</IBAN>'.$CrLf;
+			$XML_SEPA_INFO .= '					<IBAN>'.preg_replace('/\s/', '', $this->emetteur_iban).'</IBAN>'.$CrLf;
 			$XML_SEPA_INFO .= '				</Id>'.$CrLf;
 			$XML_SEPA_INFO .= '			</CdtrAcct>'.$CrLf;
 			$XML_SEPA_INFO .= '			<CdtrAgt>'.$CrLf;
 			$XML_SEPA_INFO .= '				<FinInstnId>'.$CrLf;
-			$XML_SEPA_INFO .= '					<BIC>'.$configuration->global->PRELEVEMENT_BIC.'</BIC>'.$CrLf;
+			$XML_SEPA_INFO .= '					<BIC>'.$this->emetteur_bic.'</BIC>'.$CrLf;
 			$XML_SEPA_INFO .= '				</FinInstnId>'.$CrLf;
 			$XML_SEPA_INFO .= '			</CdtrAgt>'.$CrLf;
 /*			$XML_SEPA_INFO .= '			<UltmtCdtr>'.$CrLf;
-			$XML_SEPA_INFO .= '				<Nm>'.$configuration->global->PRELEVEMENT_RAISON_SOCIALE.'</Nm>'.$CrLf;
+			$XML_SEPA_INFO .= '				<Nm>'.$this->raison_sociale.'</Nm>'.$CrLf;
 			$XML_SEPA_INFO .= '				<PstlAdr>'.$CrLf;
 			$XML_SEPA_INFO .= '					<Ctry>'.$country[1].'</Ctry>'.$CrLf;
 			$XML_SEPA_INFO .= '					<AdrLine>'.$conf->global->MAIN_INFO_SOCIETE_ADDRESS.'</AdrLine>'.$CrLf;
@@ -1744,7 +1768,7 @@ class BonPrelevement extends CommonObject
 			$XML_SEPA_INFO .= '				<Id>'.$CrLf;
 			$XML_SEPA_INFO .= '					<PrvtId>'.$CrLf;
 			$XML_SEPA_INFO .= '						<Othr>'.$CrLf;
-			$XML_SEPA_INFO .= '							<Id>'.$configuration->global->PRELEVEMENT_ICS.'</Id>'.$CrLf;
+			$XML_SEPA_INFO .= '							<Id>'.$this->emetteur_ics.'</Id>'.$CrLf;
 			$XML_SEPA_INFO .= '							<SchmeNm>'.$CrLf;
 			$XML_SEPA_INFO .= '								<Prtry>SEPA</Prtry>'.$CrLf;
 			$XML_SEPA_INFO .= '							</SchmeNm>'.$CrLf;
diff --git a/htdocs/compta/salaries/card.php b/htdocs/compta/salaries/card.php
index f39fd0780ad4dc6a5664a510932f10966427c3ce..ea0070ef50b45e7d70ade2ca3efbc78fb2e8dada 100644
--- a/htdocs/compta/salaries/card.php
+++ b/htdocs/compta/salaries/card.php
@@ -415,7 +415,7 @@ if ($id)
 	}
 	else
 	{
-		print '<a class="butActionRefused" href="#" title="'.$langs->trans("LinkedToAConcialitedTransaction").'">'.$langs->trans("Delete").'</a>';
+		print '<a class="butActionRefused" href="#" title="'.$langs->trans("LinkedToAConciliatedTransaction").'">'.$langs->trans("Delete").'</a>';
 	}
 	print "</div>";
 }
diff --git a/htdocs/compta/stats/casoc.php b/htdocs/compta/stats/casoc.php
index dade07fd0e387d7cfe89fa740060602a22e10f70..08eb5c001defd05d01ec48942a1d2573c0c7c705 100644
--- a/htdocs/compta/stats/casoc.php
+++ b/htdocs/compta/stats/casoc.php
@@ -34,6 +34,8 @@ require_once DOL_DOCUMENT_ROOT . '/categories/class/categorie.class.php';
 
 $langs->load("companies");
 $langs->load("categories");
+$langs->load("bills");
+$langs->load("compta");
 
 // Define modecompta ('CREANCES-DETTES' or 'RECETTES-DEPENSES')
 $modecompta = $conf->global->ACCOUNTING_MODE;
diff --git a/htdocs/compta/tva/card.php b/htdocs/compta/tva/card.php
index fb2edc5c4d16d371e254e715467f98bda3296585..17bcd80757ca33b3619ba0baacc0272a05288465 100644
--- a/htdocs/compta/tva/card.php
+++ b/htdocs/compta/tva/card.php
@@ -365,8 +365,8 @@ if ($id)
 
 	
 	/*
-	* Boutons d'actions
-	*/
+	 * Action buttons
+	 */
 	print "<div class=\"tabsAction\">\n";
 	if ($object->rappro == 0)
 	{
@@ -381,7 +381,7 @@ if ($id)
 	}
 	else
 	{
-		print '<a class="butActionRefused" href="#" title="'.$langs->trans("LinkedToAConcialitedTransaction").'">'.$langs->trans("Delete").'</a>';
+		print '<a class="butActionRefused" href="#" title="'.$langs->trans("LinkedToAConciliatedTransaction").'">'.$langs->trans("Delete").'</a>';
 	}
 	print "</div>";
 }
diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php
index 66175d60ecd321a33247678744d761c8ca6ed55d..f9eb5ff07d19e793f85d98d6ee2f56694e214f2c 100644
--- a/htdocs/core/class/html.form.class.php
+++ b/htdocs/core/class/html.form.class.php
@@ -5063,8 +5063,8 @@ class Form
             <dt>
             <a href="#">
               '.img_picto('','list').'
-              <input type="hidden" class="'.$htmlname.'" name="'.$htmlname.'" value="'.$listcheckedstring.'">
             </a>
+            <input type="hidden" class="'.$htmlname.'" name="'.$htmlname.'" value="'.$listcheckedstring.'">
             </dt>
             <dd>
                 <div class="multiselectcheckbox'.$htmlname.'">
diff --git a/htdocs/core/modules/modFacture.class.php b/htdocs/core/modules/modFacture.class.php
index b234499cee1e96517c378615f5524e698ff25aea..d15215a4f99003c472213e180d669e0648b5a065 100644
--- a/htdocs/core/modules/modFacture.class.php
+++ b/htdocs/core/modules/modFacture.class.php
@@ -192,9 +192,10 @@ class modFacture extends DolibarrModules
 		$this->export_label[$r]='CustomersInvoicesAndInvoiceLines';	// Translation key (used only if key ExportDataset_xxx_z not found)
 		$this->export_icon[$r]='bill';
 		$this->export_permission[$r]=array(array("facture","facture","export","other"));
-		$this->export_fields_array[$r]=array('s.rowid'=>"IdCompany",'s.nom'=>'CompanyName','s.address'=>'Address','s.zip'=>'Zip','s.town'=>'Town','c.code'=>'CountryCode','s.phone'=>'Phone','s.siren'=>'ProfId1','s.siret'=>'ProfId2','s.ape'=>'ProfId3','s.idprof4'=>'ProfId4','s.code_compta'=>'CustomerAccountancyCode','s.code_compta_fournisseur'=>'SupplierAccountancyCode','s.tva_intra'=>'VATIntra','f.rowid'=>"InvoiceId",'f.facnumber'=>"InvoiceRef",'f.datec'=>"InvoiceDateCreation",'f.datef'=>"DateInvoice",'f.date_lim_reglement'=>"DateDue",'f.total'=>"TotalHT",'f.total_ttc'=>"TotalTTC",'f.tva'=>"TotalVAT",'f.paye'=>"InvoicePaid",'f.fk_statut'=>'InvoiceStatus','f.note_private'=>"NotePrivate",'f.note_public'=>"NotePublic",'f.fk_user_author'=>'CreatedById','uc.login'=>'CreatedByLogin','f.fk_user_valid'=>'ValidatedById','uv.login'=>'ValidatedByLogin', 'pj.ref'=>'ProjectRef', 'fd.rowid'=>'LineId','fd.label'=>"Label",'fd.description'=>"LineDescription",'fd.subprice'=>"LineUnitPrice",'fd.tva_tx'=>"LineVATRate",'fd.qty'=>"LineQty",'fd.total_ht'=>"LineTotalHT",'fd.total_tva'=>"LineTotalVAT",'fd.total_ttc'=>"LineTotalTTC",'fd.date_start'=>"DateStart",'fd.date_end'=>"DateEnd",'fd.special_code'=>'SpecialCode','fd.product_type'=>"TypeOfLineServiceOrProduct",'fd.fk_product'=>'ProductId','p.ref'=>'ProductRef','p.label'=>'ProductLabel','p.accountancy_code_sell'=>'ProductAccountancySellCode');
+		$this->export_fields_array[$r]=array('s.rowid'=>"IdCompany",'s.nom'=>'CompanyName','s.address'=>'Address','s.zip'=>'Zip','s.town'=>'Town','c.code'=>'CountryCode','s.phone'=>'Phone','s.siren'=>'ProfId1','s.siret'=>'ProfId2','s.ape'=>'ProfId3','s.idprof4'=>'ProfId4','s.code_compta'=>'CustomerAccountancyCode','s.code_compta_fournisseur'=>'SupplierAccountancyCode','s.tva_intra'=>'VATIntra','f.rowid'=>"InvoiceId",'f.facnumber'=>"InvoiceRef",'f.datec'=>"InvoiceDateCreation",'f.datef'=>"DateInvoice",'f.date_lim_reglement'=>"DateDue",'f.total'=>"TotalHT",'f.total_ttc'=>"TotalTTC",'f.tva'=>"TotalVAT",'f.paye'=>"InvoicePaid",'f.fk_statut'=>'InvoiceStatus','f.note_private'=>"NotePrivate",'f.note_public'=>"NotePublic",'f.fk_user_author'=>'CreatedById','uc.login'=>'CreatedByLogin','f.fk_user_valid'=>'ValidatedById','uv.login'=>'ValidatedByLogin', 'pj.ref'=>'ProjectRef', 'fd.rowid'=>'LineId','fd.description'=>"LineDescription",'fd.subprice'=>"LineUnitPrice",'fd.tva_tx'=>"LineVATRate",'fd.qty'=>"LineQty",'fd.total_ht'=>"LineTotalHT",'fd.total_tva'=>"LineTotalVAT",'fd.total_ttc'=>"LineTotalTTC",'fd.date_start'=>"DateStart",'fd.date_end'=>"DateEnd",'fd.special_code'=>'SpecialCode','fd.product_type'=>"TypeOfLineServiceOrProduct",'fd.fk_product'=>'ProductId','p.ref'=>'ProductRef','p.label'=>'ProductLabel','p.accountancy_code_sell'=>'ProductAccountancySellCode');
+		//Add 'fd.label'=>"Label" to export_fields_array if you use it. Not used by dolibarr currently.
 		//$this->export_TypeFields_array[$r]=array('s.rowid'=>"List:societe:nom",'s.nom'=>'Text','s.address'=>'Text','s.zip'=>'Text','s.town'=>'Text','c.code'=>'Text','s.phone'=>'Text','s.siren'=>'Text','s.siret'=>'Text','s.ape'=>'Text','s.idprof4'=>'Text','s.code_compta'=>'Text','s.code_compta_fournisseur'=>'Text','s.tva_intra'=>'Text','f.facnumber'=>"Text",'f.datec'=>"Date",'f.datef'=>"Date",'f.date_lim_reglement'=>"Date",'f.total'=>"Numeric",'f.total_ttc'=>"Numeric",'f.tva'=>"Numeric",'f.paye'=>"Boolean",'f.fk_statut'=>'Status','f.note_private'=>"Text",'f.note_public'=>"Text",'fd.description'=>"Text",'fd.price'=>"Numeric",'fd.tva_tx'=>"Numeric",'fd.qty'=>"Numeric",'fd.total_ht'=>"Numeric",'fd.total_tva'=>"Numeric",'fd.total_ttc'=>"Numeric",'fd.date_start'=>"Date",'fd.date_end'=>"Date",'fd.product_type'=>"Numeric",'fd.fk_product'=>'List:product:label','p.ref'=>'Text','p.label'=>'Text');
-		$this->export_TypeFields_array[$r]=array('s.nom'=>'Text','s.address'=>'Text','s.zip'=>'Text','s.town'=>'Text','c.code'=>'Text','s.phone'=>'Text','s.siren'=>'Text','s.siret'=>'Text','s.ape'=>'Text','s.idprof4'=>'Text','s.code_compta'=>'Text','s.code_compta_fournisseur'=>'Text','s.tva_intra'=>'Text','f.facnumber'=>"Text",'f.datec'=>"Date",'f.datef'=>"Date",'f.date_lim_reglement'=>"Date",'f.total'=>"Numeric",'f.total_ttc'=>"Numeric",'f.tva'=>"Numeric",'f.paye'=>"Boolean",'f.fk_statut'=>'Status','f.note_private'=>"Text",'f.note_public'=>"Text", 'pj.ref'=>'Text', 'fd.description'=>"Text",'fd.subprice'=>"Numeric",'fd.tva_tx'=>"Numeric",'fd.qty'=>"Numeric",'fd.total_ht'=>"Numeric",'fd.total_tva'=>"Numeric",'fd.total_ttc'=>"Numeric",'fd.date_start'=>"Date",'fd.date_end'=>"Date",'fd.special_code'=>'Numeric','fd.product_type'=>"Numeric",'fd.fk_product'=>'List:product:label','p.ref'=>'Text','p.label'=>'Text','p.accountancy_code_sell'=>'Text');
+		$this->export_TypeFields_array[$r]=array('s.nom'=>'Text','s.address'=>'Text','s.zip'=>'Text','s.town'=>'Text','c.code'=>'Text','s.phone'=>'Text','s.siren'=>'Text','s.siret'=>'Text','s.ape'=>'Text','s.idprof4'=>'Text','s.code_compta'=>'Text','s.code_compta_fournisseur'=>'Text','s.tva_intra'=>'Text','f.facnumber'=>"Text",'f.datec'=>"Date",'f.datef'=>"Date",'f.date_lim_reglement'=>"Date",'f.total'=>"Numeric",'f.total_ttc'=>"Numeric",'f.tva'=>"Numeric",'f.paye'=>"Boolean",'f.fk_statut'=>'Status','f.note_private'=>"Text",'f.note_public'=>"Text", 'pj.ref'=>'Text', 'fd.label'=>'Text', 'fd.description'=>"Text",'fd.subprice'=>"Numeric",'fd.tva_tx'=>"Numeric",'fd.qty'=>"Numeric",'fd.total_ht'=>"Numeric",'fd.total_tva'=>"Numeric",'fd.total_ttc'=>"Numeric",'fd.date_start'=>"Date",'fd.date_end'=>"Date",'fd.special_code'=>'Numeric','fd.product_type'=>"Numeric",'fd.fk_product'=>'List:product:label','p.ref'=>'Text','p.label'=>'Text','p.accountancy_code_sell'=>'Text');
 		$this->export_entities_array[$r]=array('s.rowid'=>"company",'s.nom'=>'company','s.address'=>'company','s.zip'=>'company','s.town'=>'company','c.code'=>'company','s.phone'=>'company','s.siren'=>'company','s.siret'=>'company','s.ape'=>'company','s.idprof4'=>'company','s.code_compta'=>'company','s.code_compta_fournisseur'=>'company','s.tva_intra'=>'company','f.rowid'=>"invoice",'f.facnumber'=>"invoice",'f.datec'=>"invoice",'f.datef'=>"invoice",'f.date_lim_reglement'=>"invoice",'f.total'=>"invoice",'f.total_ttc'=>"invoice",'f.tva'=>"invoice",'f.paye'=>"invoice",'f.fk_statut'=>'invoice','f.note_private'=>"invoice",'f.note_public'=>"invoice", 'pj.ref'=>'project', 'fd.rowid'=>'invoice_line','fd.label'=>"invoice_line",'fd.description'=>"invoice_line",'fd.subprice'=>"invoice_line",'fd.total_ht'=>"invoice_line",'fd.total_tva'=>"invoice_line",'fd.total_ttc'=>"invoice_line",'fd.tva_tx'=>"invoice_line",'fd.qty'=>"invoice_line",'fd.date_start'=>"invoice_line",'fd.date_end'=>"invoice_line",'fd.special_code'=>'invoice_line','fd.product_type'=>'invoice_line','fd.fk_product'=>'product','p.ref'=>'product','p.label'=>'product','p.accountancy_code_sell'=>'product','f.fk_user_author'=>'user','uc.login'=>'user','f.fk_user_valid'=>'user','uv.login'=>'user');
 		$this->export_dependencies_array[$r]=array('invoice_line'=>'fd.rowid','product'=>'fd.rowid'); // To add unique key if we ask a field of a child to avoid the DISTINCT to discard them
 		$keyforselect='facture'; $keyforelement='invoice'; $keyforaliasextra='extra';
diff --git a/htdocs/core/search_page.php b/htdocs/core/search_page.php
index ae1b29a5c48c1f8332a58ece5dda284b0f7a6772..e3cca7a73c71673f24fad9187bfe10697a9cc86f 100644
--- a/htdocs/core/search_page.php
+++ b/htdocs/core/search_page.php
@@ -67,51 +67,58 @@ $hookmanager->initHooks(array('searchform'));
 // Define $searchform
 $searchform = '';
 
-// TODO Mutualize code here with function left_menu into main.inc.php page
-if ($conf->use_javascript_ajax && 1 == 2)
+if ($conf->use_javascript_ajax && 1 == 2)   // select2 is ko with jmobile
 {
     if (! is_object($form)) $form=new Form($db);
     $selected=-1;
-    $searchform.=$form->selectArrayAjax('searchselectcombo', DOL_URL_ROOT.'/core/ajax/selectsearchbox.php', $selected, 'data-role="none"', '', 0, 1, 'vmenusearchselectcombo', 1, $langs->trans("Search"), 0);
+    $searchform.='<br><br>'.$form->selectArrayAjax('searchselectcombo', DOL_URL_ROOT.'/core/ajax/selectsearchbox.php', $selected, 'data-role="none"', '', 0, 1, 'minwidth300', 1, $langs->trans("Search"), 0);
 }
 else
 {
+    $conf->global->MAIN_HTML5_PLACEHOLDER = 1;
+    
     // Define $searchform
     if ((( ! empty($conf->societe->enabled) && (empty($conf->global->SOCIETE_DISABLE_PROSPECTS) || empty($conf->global->SOCIETE_DISABLE_CUSTOMERS))) || ! empty($conf->fournisseur->enabled)) && $user->rights->societe->lire)
     {
         $langs->load("companies");
-        $searchform.=printSearchForm(DOL_URL_ROOT.'/societe/list.php', DOL_URL_ROOT.'/societe/list.php', $langs->trans("ThirdParties"), 'soc', 'sall', 'T', 'searchleftt', img_object('','company'));
+        $searchform.=printSearchForm(DOL_URL_ROOT.'/societe/list.php', DOL_URL_ROOT.'/societe/list.php', $langs->trans("ThirdParties"), 'soc', 'sall', 'T', 'searchleftt', img_picto('','object_company','', 0, 1));
+        //$searchform.=printSearchForm(DOL_URL_ROOT.'/societe/list.php', DOL_URL_ROOT.'/societe/list.php', $langs->trans("ThirdParties"), 'soc', 'sall', 'T', 'searchleftt', 'notitle');
     }
 
     if (! empty($conf->societe->enabled) && $user->rights->societe->lire)
     {
         $langs->load("companies");
-        $searchform.=printSearchForm(DOL_URL_ROOT.'/contact/list.php', DOL_URL_ROOT.'/contact/list.php', $langs->trans("Contacts"), 'contact', 'sall', 'A', 'searchleftc', img_object('','contact'));
+        $searchform.=printSearchForm(DOL_URL_ROOT.'/contact/list.php', DOL_URL_ROOT.'/contact/list.php', $langs->trans("Contacts"), 'contact', 'sall', 'A', 'searchleftc', img_picto('','object_contact','', 0, 1));
+        //$searchform.=printSearchForm(DOL_URL_ROOT.'/contact/list.php', DOL_URL_ROOT.'/contact/list.php', $langs->trans("Contacts"), 'contact', 'sall', 'A', 'searchleftc', 'notitle');
     }
 
     if (((! empty($conf->product->enabled) && $user->rights->produit->lire) || (! empty($conf->service->enabled) && $user->rights->service->lire))
     )
     {
         $langs->load("products");
-        $searchform.=printSearchForm(DOL_URL_ROOT.'/product/list.php', DOL_URL_ROOT.'/product/list.php', $langs->trans("Products")."/".$langs->trans("Services"), 'products', 'sall', 'P', 'searchleftp', img_object('','product'));
+        $searchform.=printSearchForm(DOL_URL_ROOT.'/product/list.php', DOL_URL_ROOT.'/product/list.php', $langs->trans("Products")."/".$langs->trans("Services"), 'products', 'sall', 'P', 'searchleftp', img_picto('','object_product','', 0, 1));
+        //$searchform.=printSearchForm(DOL_URL_ROOT.'/product/list.php', DOL_URL_ROOT.'/product/list.php', $langs->trans("Products")."/".$langs->trans("Services"), 'products', 'sall', 'P', 'searchleftp', 'notitle');
     }
 
     if (! empty($conf->projet->enabled) && $user->rights->projet->lire)
     {
         $langs->load("projects");
-        $searchform.=printSearchForm(DOL_URL_ROOT.'/projet/list.php', DOL_URL_ROOT.'/projet/list.php', $langs->trans("Projects"), 'project', 'search_all', 'Q', 'searchleftproj', img_object('','projectpub'));
+        $searchform.=printSearchForm(DOL_URL_ROOT.'/projet/list.php', DOL_URL_ROOT.'/projet/list.php', $langs->trans("Projects"), 'project', 'search_all', 'Q', 'searchleftproj', img_picto('','object_projectpub','', 0, 1));
+        //$searchform.=printSearchForm(DOL_URL_ROOT.'/projet/list.php', DOL_URL_ROOT.'/projet/list.php', $langs->trans("Projects"), 'project', 'search_all', 'Q', 'searchleftproj', 'notitle');
     }
 
     if (! empty($conf->adherent->enabled) && $user->rights->adherent->lire)
     {
         $langs->load("members");
-        $searchform.=printSearchForm(DOL_URL_ROOT.'/adherents/list.php', DOL_URL_ROOT.'/adherents/list.php', $langs->trans("Members"), 'member', 'sall', 'M', 'searchleftm', img_object('','user'));
+        $searchform.=printSearchForm(DOL_URL_ROOT.'/adherents/list.php', DOL_URL_ROOT.'/adherents/list.php', $langs->trans("Members"), 'member', 'sall', 'M', 'searchleftm', img_picto('','object_user','', 0, 1));
+        //$searchform.=printSearchForm(DOL_URL_ROOT.'/adherents/list.php', DOL_URL_ROOT.'/adherents/list.php', $langs->trans("Members"), 'member', 'sall', 'M', 'searchleftm', 'notitle');
     }
 
 	if (! empty($conf->user->enabled) && $user->rights->user->user->lire)
     {
         $langs->load("users");
-        $searchform.=printSearchForm(DOL_URL_ROOT.'/user/index.php', DOL_URL_ROOT.'/user/index.php', $langs->trans("Users"), 'user', 'sall', 'M', 'searchleftuser', img_object('','user'));
+        $searchform.=printSearchForm(DOL_URL_ROOT.'/user/index.php', DOL_URL_ROOT.'/user/index.php', $langs->trans("Users"), 'user', 'sall', 'M', 'searchleftuser', img_picto('','object_user','', 0, 1));
+        //$searchform.=printSearchForm(DOL_URL_ROOT.'/user/index.php', DOL_URL_ROOT.'/user/index.php', $langs->trans("Users"), 'user', 'sall', 'M', 'searchleftuser', 'notitle');
     }
 }
 
diff --git a/htdocs/langs/en_US/banks.lang b/htdocs/langs/en_US/banks.lang
index 819664dfdc4f31aaae1d6d408c6024d91c258475..b0b7af4076fdf3a1d8194461737f9d053c82b5a9 100644
--- a/htdocs/langs/en_US/banks.lang
+++ b/htdocs/langs/en_US/banks.lang
@@ -78,6 +78,7 @@ AccountToCredit=Account to credit
 AccountToDebit=Account to debit
 DisableConciliation=Disable reconciliation feature for this account
 ConciliationDisabled=Reconciliation feature disabled
+LinkedToAConciliatedTransaction=Linked to a conciliated transaction
 StatusAccountOpened=Open
 StatusAccountClosed=Closed
 AccountIdShort=Number
diff --git a/htdocs/main.inc.php b/htdocs/main.inc.php
index 095817015c1ffffa3cf402b278c4cc5032f54d47..26c2b9ed489d6dd742f1cba0e165d67571f1f048 100644
--- a/htdocs/main.inc.php
+++ b/htdocs/main.inc.php
@@ -986,13 +986,14 @@ function top_httphead()
  *
  * @param 	string 	$head			Optionnal head lines
  * @param 	string 	$title			HTML title
- * @param 	int    	$disablejs		More content into html header
- * @param 	int    	$disablehead	More content into html header
+ * @param 	int    	$disablejs		Disable js output
+ * @param 	int    	$disablehead	Disable head output
  * @param 	array  	$arrayofjs		Array of complementary js files
  * @param 	array  	$arrayofcss		Array of complementary css files
+ * @param 	int    	$disablejmobile	Disable jmobile
  * @return	void
  */
-function top_htmlhead($head, $title='', $disablejs=0, $disablehead=0, $arrayofjs='', $arrayofcss='')
+function top_htmlhead($head, $title='', $disablejs=0, $disablehead=0, $arrayofjs='', $arrayofcss='', $disablejmobile=0)
 {
     global $user, $conf, $langs, $db;
 
@@ -1065,7 +1066,7 @@ function top_htmlhead($head, $title='', $disablejs=0, $disablehead=0, $arrayofjs
             	print '<link rel="stylesheet" type="text/css" href="'.DOL_URL_ROOT.'/includes/jquery/plugins/timepicker/jquery-ui-timepicker-addon.css'.($ext?'?'.$ext:'').'">'."\n";
             }
             // jQuery jMobile
-            if (! empty($conf->global->MAIN_USE_JQUERY_JMOBILE) || defined('REQUIRE_JQUERY_JMOBILE') || ! empty($conf->dol_use_jmobile))
+            if (! $disablejmobile && (! empty($conf->global->MAIN_USE_JQUERY_JMOBILE) || defined('REQUIRE_JQUERY_JMOBILE') || ! empty($conf->dol_use_jmobile)))
             {
             	print '<link rel="stylesheet" type="text/css" href="'.DOL_URL_ROOT.'/includes/jquery/plugins/mobile/jquery.mobile-latest.min.css'.($ext?'?'.$ext:'').'">'."\n";
             }
@@ -1237,7 +1238,7 @@ function top_htmlhead($head, $title='', $disablejs=0, $disablehead=0, $arrayofjs
                 print '<script type="text/javascript" src="'.DOL_URL_ROOT.'/core/js/select2_locale.js.php'.($ext?'?'.$ext:'').'"></script>'."\n";
             }
             // jQuery jMobile
-            if (! empty($conf->global->MAIN_USE_JQUERY_JMOBILE) || defined('REQUIRE_JQUERY_JMOBILE') || (! empty($conf->dol_use_jmobile) && $conf->dol_use_jmobile > 0))
+            if (! $disablejmobile && (! empty($conf->global->MAIN_USE_JQUERY_JMOBILE) || defined('REQUIRE_JQUERY_JMOBILE') || (! empty($conf->dol_use_jmobile) && $conf->dol_use_jmobile > 0)))
             {
             	// We must force not using ajax because cache of jquery does not load js of other pages.
             	// This also increase seriously speed onto mobile device where complex js code is very slow and memory very low.
@@ -1841,20 +1842,24 @@ function printSearchForm($urlaction,$urlobject,$title,$htmlmodesearch,$htmlinput
 
     $ret='';
     $ret.='<form action="'.$urlaction.'" method="post" class="searchform">';
-	$ret.='<div class="menu_titre menu_titre_search"';
-	if (! empty($conf->global->MAIN_HTML5_PLACEHOLDER)) $ret.=' style="display: inline-block"';
-	$ret.='>';
-	$ret.='<label for="'.$prefhtmlinputname.$htmlinputname.'">';
-	$ret.='<a class="vsmenu" href="'.$urlobject.'">';
-	if ($img && ! empty($conf->global->MAIN_HTML5_PLACEHOLDER)) $ret.=$img;
-	else $ret.=$img.' '.$title;
-	$ret.='</a>';
-	$ret.='</label>';
-	$ret.='</div>';
+	if (empty($conf->global->MAIN_HTML5_PLACEHOLDER))
+	{
+        $ret.='<div class="menu_titre menu_titre_search"';
+    	if (! empty($conf->global->MAIN_HTML5_PLACEHOLDER)) $ret.=' style="display: inline-block"';
+    	$ret.='>';
+    	$ret.='<label for="'.$prefhtmlinputname.$htmlinputname.'">';
+    	$ret.='<a class="vsmenu" href="'.$urlobject.'">';
+       	if ($img && ! empty($conf->global->MAIN_HTML5_PLACEHOLDER)) $ret.=$img;
+       	else if ($img || $title) $ret.=$img.' '.$title;
+    	$ret.='</a>';
+    	$ret.='</label>';
+    	$ret.='</div>';
+	}
     $ret.='<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
     $ret.='<input type="hidden" name="mode" value="search">';
     $ret.='<input type="hidden" name="mode_search" value="'.$htmlmodesearch.'">';
     $ret.='<input type="text" class="flat"';
+    if (! empty($conf->global->MAIN_HTML5_PLACEHOLDER)) $ret.=' style="text-indent: 22px; background-image: url(\''.$img.'\'); background-repeat: no-repeat; background-position: 3px;"';
     $ret.=($accesskey?' accesskey="'.$accesskey.'"':'');
     if (! empty($conf->global->MAIN_HTML5_PLACEHOLDER)) $ret.=' placeholder="'.strip_tags($title).'"';		// Will work only if MAIN_HTML5_PLACEHOLDER is set to 1
     else $ret.=' title="'.$langs->trans("SearchOf").''.strip_tags($title).'"';
diff --git a/htdocs/product/card.php b/htdocs/product/card.php
index e5417ef6bd74fec7887dcbb4cc1cc091a25fa8d6..ca52892f518f3b03fbf687aab251e96f86a262ed 100644
--- a/htdocs/product/card.php
+++ b/htdocs/product/card.php
@@ -1528,6 +1528,7 @@ else
                     print '<input type="hidden" name="barcode_type_code" value="'.$object->barcode_type_code.'">';
                     print '<input size="40" class="maxwidthonsmartphone" type="text" name="barcode" value="'.$object->barcode.'">';
                     print '&nbsp;<input type="submit" class="button" value="'.$langs->trans("Modify").'">';
+                    print '</form>';
                 }
                 else
                 {
diff --git a/htdocs/projet/tasks/contact.php b/htdocs/projet/tasks/contact.php
index f3f58c1711903114b6d66b0ad6c4cbe1315e882c..6689f966c15a16b1846dbb6a495710ef60465f2f 100644
--- a/htdocs/projet/tasks/contact.php
+++ b/htdocs/projet/tasks/contact.php
@@ -194,7 +194,7 @@ if ($id > 0 || ! empty($ref))
     		print '<table class="border" width="100%">';
 
     		// Ref
-    		print '<tr><td width="30%">';
+    		print '<tr><td class="titlefield">';
     		print $langs->trans("Ref");
     		print '</td><td>';
     		// Define a complementary filter for search of next/prev ref.
@@ -255,7 +255,7 @@ if ($id > 0 || ! empty($ref))
 		$linkback=GETPOST('withproject')?'<a href="'.DOL_URL_ROOT.'/projet/tasks.php?id='.$projectstatic->id.'">'.$langs->trans("BackToList").'</a>':'';
 
 		// Ref
-		print '<tr><td width="30%">'.$langs->trans('Ref').'</td><td colspan="3">';
+		print '<tr><td class="titlefield">'.$langs->trans('Ref').'</td><td colspan="3">';
 		if (! GETPOST('withproject') || empty($projectstatic->id))
 		{
 		    $projectsListId = $projectstatic->getProjectsAuthorizedForUser($user,0,1);
diff --git a/htdocs/projet/tasks/document.php b/htdocs/projet/tasks/document.php
index 07fda131407780f8dfaea31f31085ff3d59ccb0d..c9a69fc81a4ef9b851a52f08a59ca4b42e69fe12 100644
--- a/htdocs/projet/tasks/document.php
+++ b/htdocs/projet/tasks/document.php
@@ -137,7 +137,7 @@ if ($object->id > 0)
 		print '<table class="border" width="100%">';
 
 		// Ref
-		print '<tr><td width="30%">';
+		print '<tr><td class="titlefield">';
 		print $langs->trans("Ref");
 		print '</td><td>';
 		// Define a complementary filter for search of next/prev ref.
@@ -198,7 +198,7 @@ if ($object->id > 0)
 	print '<table class="border" width="100%">';
 
 	// Ref
-	print '<tr><td width="30%">';
+	print '<tr><td class="titlefield">';
 	print $langs->trans("Ref");
 	print '</td><td colspan="3">';
 	if (empty($withproject) || empty($projectstatic->id))
diff --git a/htdocs/projet/tasks/note.php b/htdocs/projet/tasks/note.php
index e62e58df58ba50cfb2062b6c1978147301d3fb0b..5d5cb38dbe504ceaba326c4b060c6911753c1391 100644
--- a/htdocs/projet/tasks/note.php
+++ b/htdocs/projet/tasks/note.php
@@ -117,7 +117,7 @@ if ($object->id > 0)
 		print '<table class="border" width="100%">';
 
 		// Ref
-		print '<tr><td width="30%">';
+		print '<tr><td class="titlefield">';
 		print $langs->trans("Ref");
 		print '</td><td>';
 		// Define a complementary filter for search of next/prev ref.
@@ -172,7 +172,7 @@ if ($object->id > 0)
 	$linkback=GETPOST('withproject')?'<a href="'.DOL_URL_ROOT.'/projet/tasks.php?id='.$projectstatic->id.'">'.$langs->trans("BackToList").'</a>':'';
 
 	// Ref
-	print '<tr><td width="30%">'.$langs->trans("Ref").'</td><td>';
+	print '<tr><td class="titlefield">'.$langs->trans("Ref").'</td><td>';
 	if (empty($withproject) || empty($projectstatic->id))
 	{
 	    $projectsListId = $projectstatic->getProjectsAuthorizedForUser($user,0,1);
diff --git a/htdocs/projet/tasks/time.php b/htdocs/projet/tasks/time.php
index 6c9b964ead9d3961794406f1c358ba0202bd67b3..5418a4c8f483e543ace213c073d33d51c0f33a5f 100644
--- a/htdocs/projet/tasks/time.php
+++ b/htdocs/projet/tasks/time.php
@@ -34,6 +34,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php';
 $langs->load('projects');
 
 $id=GETPOST('id','int');
+$projectid=GETPOST('projectid','int');
 $ref=GETPOST('ref','alpha');
 $action=GETPOST('action','alpha');
 $confirm=GETPOST('confirm','alpha');
@@ -65,8 +66,20 @@ $pagenext = $page + 1;
 if (! $sortfield) $sortfield='t.task_date,t.task_datehour,t.rowid';
 if (! $sortorder) $sortorder='DESC';
 
+// Initialize technical object to manage hooks of thirdparties. Note that conf->hooks_modules contains array array
+$hookmanager->initHooks(array('projecttaskcard','globalcard'));
+
 $object = new Task($db);
 $projectstatic = new Project($db);
+$extrafields_project = new ExtraFields($db);
+$extrafields_task = new ExtraFields($db);
+
+if ($projectid > 0 || ! empty($ref))
+{
+    // fetch optionals attributes and labels
+    $extralabels_projet=$extrafields_project->fetch_name_optionals_label($projectstatic->table_element);
+}
+$extralabels_task=$extrafields_task->fetch_name_optionals_label($object->table_element);
 
 
 /*
@@ -264,12 +277,14 @@ if (($id > 0 || ! empty($ref)) || $projectidforalltimes > 0)
     {
         $result=$projectstatic->fetch($projectidforalltimes);
         if (! empty($projectstatic->socid)) $projectstatic->fetch_thirdparty();
+        $res=$projectstatic->fetch_optionals($object->id,$extralabels_projet);
     }
     elseif ($object->fetch($id, $ref) >= 0)
 	{
 		$result=$projectstatic->fetch($object->fk_project);
 		if (! empty($projectstatic->socid)) $projectstatic->fetch_thirdparty();
-
+		$res=$projectstatic->fetch_optionals($object->id,$extralabels_projet);
+		
 		$object->project = clone $projectstatic;
     }
 	
@@ -332,19 +347,22 @@ if (($id > 0 || ! empty($ref)) || $projectidforalltimes > 0)
 			print dol_print_date($projectstatic->date_end,'day');
 			print '</td></tr>';
 
-			// Budget
-        	print '<tr><td>'.$langs->trans("Budget").'</td><td>';
-        	if (strcmp($object->budget_amount, '')) print price($object->budget_amount,'',$langs,0,0,0,$conf->currency);
-        	print '</td></tr>';
-        	
-        	// Other options
-        	$parameters=array();
-        	$reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$object,$action); // Note that $action and $object may have been modified by hook
-        	if (empty($reshook) && ! empty($extrafields_project->attribute_label))
+        	if (! $id && ! $ref)   // Not a dedicated task
         	{
-        		print $object->showOptionals($extrafields_project);
-        	}
-        
+    			// Budget
+            	print '<tr><td>'.$langs->trans("Budget").'</td><td>';
+            	if (strcmp($projectstatic->budget_amount, '')) print price($projectstatic->budget_amount,'',$langs,0,0,0,$conf->currency);
+            	print '</td></tr>';
+            	
+            	// Other options
+            	$parameters=array();
+            	$reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$projectstatic,$action); // Note that $action and $object may have been modified by hook
+            	if (empty($reshook) && ! empty($extrafields_project->attribute_label))
+            	{
+            		print $projectstatic->showOptionals($extrafields_project);
+            	}
+        	}    
+        	
 			print '</table>';
 
 			dol_fiche_end();
@@ -353,7 +371,7 @@ if (($id > 0 || ! empty($ref)) || $projectidforalltimes > 0)
 			/*
 			 * Actions
 			 */
-			if (empty($id))
+			if (empty($id) && empty($ref))
 			{
     			print '<div class="tabsAction">';
     			
@@ -394,7 +412,7 @@ if (($id > 0 || ! empty($ref)) || $projectidforalltimes > 0)
 		$linkback=$withproject?'<a href="'.DOL_URL_ROOT.'/projet/tasks.php?id='.$projectstatic->id.'">'.$langs->trans("BackToList").'</a>':'';
 
 		// Ref
-		print '<tr><td width="30%">';
+		print '<tr><td class="titlefield">';
 		print $langs->trans("Ref");
 		print '</td><td colspan="3">';
 		if (! GETPOST('withproject') || empty($projectstatic->id))
@@ -533,18 +551,26 @@ if (($id > 0 || ! empty($ref)) || $projectidforalltimes > 0)
 	
 	if ($projectstatic->id > 0)
 	{	
+		if ($action == 'deleteline')
+		{
+			print $form->formconfirm($_SERVER["PHP_SELF"]."?id=".$object->id.'&lineid='.$_GET["lineid"].($withproject?'&withproject=1':''),$langs->trans("DeleteATimeSpent"),$langs->trans("ConfirmDeleteATimeSpent"),"confirm_delete",'','',1);
+		}
+	    
 	    // Initialize technical object to manage hooks. Note that conf->hooks_modules contains array
 	    $hookmanager->initHooks(array('tasktimelist'));
 	    $extrafields = new ExtraFields($db);
 
 	    // Definition of fields for list
-	    $arrayfields=array(
-	        't.task_date'=>array('label'=>$langs->trans("Date"), 'checked'=>1),
-	        'author'=>array('label'=>$langs->trans("By"), 'checked'=>1),
-	        't.note'=>array('label'=>$langs->trans("Note"), 'checked'=>1),
-	        't.task_duration'=>array('label'=>$langs->trans("Duration"), 'checked'=>1),
-	        'value'=>array('label'=>$langs->trans("Value"), 'checked'=>1, 'enabled'=>$conf->salaries->enabled),
-	    );
+	    $arrayfields=array();
+	    $arrayfields['t.task_date']=array('label'=>$langs->trans("Date"), 'checked'=>1);
+		if (! $id && ! $ref)   // Not a dedicated task
+	    {
+    	    $arrayfields['t.task_ref']=array('label'=>$langs->trans("Task"), 'checked'=>1);
+	    }
+	    $arrayfields['author']=array('label'=>$langs->trans("By"), 'checked'=>1);
+	    $arrayfields['t.note']=array('label'=>$langs->trans("Note"), 'checked'=>1);
+	    $arrayfields['t.task_duration']=array('label'=>$langs->trans("Duration"), 'checked'=>1);
+	    $arrayfields['value']=array('label'=>$langs->trans("Value"), 'checked'=>1, 'enabled'=>$conf->salaries->enabled);
 	    // Extra fields
 	    if (is_array($extrafields->attribute_label) && count($extrafields->attribute_label))
 	    {
@@ -553,19 +579,17 @@ if (($id > 0 || ! empty($ref)) || $projectidforalltimes > 0)
 	            $arrayfields["ef.".$key]=array('label'=>$extrafields->attribute_label[$key], 'checked'=>$extrafields->attribute_list[$key], 'position'=>$extrafields->attribute_pos[$key], 'enabled'=>$extrafields->attribute_perms[$key]);
 	        }
 	    }
-
-
 	    
 		/*
 		 *  List of time spent
 		 */
 		$tasks = array();
 		
-		$sql = "SELECT t.rowid, t.fk_task, t.task_date, t.task_datehour, t.task_date_withhour, t.task_duration, t.fk_user, t.note, t.thm";
-		$sql.= ", u.lastname, u.firstname";
-		$sql .= " FROM ".MAIN_DB_PREFIX."projet_task_time as t";
-		$sql .= " , ".MAIN_DB_PREFIX."user as u";
-		$sql .= " WHERE t.fk_user = u.rowid";
+		$sql = "SELECT t.rowid, t.fk_task, t.task_date, t.task_datehour, t.task_date_withhour, t.task_duration, t.fk_user, t.note, t.thm,";
+		$sql .= " pt.ref, pt.label,";
+		$sql .= " u.lastname, u.firstname";
+		$sql .= " FROM ".MAIN_DB_PREFIX."projet_task_time as t, ".MAIN_DB_PREFIX."projet_task as pt, ".MAIN_DB_PREFIX."user as u";
+		$sql .= " WHERE t.fk_user = u.rowid AND t.fk_task = pt.rowid";
 		if (empty($projectidforalltimes)) $sql .= " AND t.fk_task =".$object->id;
 		if ($search_ref) $sql .= natural_search('c.ref', $search_ref);
 		
@@ -601,7 +625,6 @@ if (($id > 0 || ! empty($ref)) || $projectidforalltimes > 0)
 		}
 
 		
-		
 		$arrayofselected=is_array($toselect)?$toselect:array();
 		
 		$params='';
@@ -631,7 +654,7 @@ if (($id > 0 || ! empty($ref)) || $projectidforalltimes > 0)
 		
 		
 		
-		print '<form method="POST" action="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'">';
+		print '<form method="POST" action="'.$_SERVER["PHP_SELF"].'?id='.$id.'">';
         if ($optioncss != '') print '<input type="hidden" name="optioncss" value="'.$optioncss.'">';
 		print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
 	    print '<input type="hidden" name="formfilteraction" id="formfilteraction" value="list">';
@@ -639,7 +662,8 @@ if (($id > 0 || ! empty($ref)) || $projectidforalltimes > 0)
 	    print '<input type="hidden" name="sortfield" value="'.$sortfield.'">';
 	    print '<input type="hidden" name="sortorder" value="'.$sortorder.'">';
 		
-	    print '<input type="hidden" name="projectid" value="'.$projectstatic->id.'">';
+		print '<input type="hidden" name="id" value="'.$id.'">';
+		print '<input type="hidden" name="projectid" value="'.$projectidforalltimes.'">';
 		print '<input type="hidden" name="withproject" value="'.$withproject.'">';
 
 		$moreforfilter = '';
@@ -662,8 +686,11 @@ if (($id > 0 || ! empty($ref)) || $projectidforalltimes > 0)
 		print '<table class="tagtable liste'.($moreforfilter?" listwithfilterbefore":"").'">'."\n";
 		
 		print '<tr class="liste_titre">';
-        if (! empty($arrayfields['t.task_date']['checked'])) print_liste_field_titre($arrayfields['t.task_date']['label'],$_SERVER['PHP_SELF'],'t.task_date,t.task_datehour,t.rowid','',$params,'',$sortfield,$sortorder);
-        if (! empty($arrayfields['t.task_datehour']['checked'])) print_liste_field_titre($arrayfields['t.task_datehour']['label'],$_SERVER['PHP_SELF'],'t.task_date,t.task_datehour,t.rowid','',$params,'',$sortfield,$sortorder);
+		if (! empty($arrayfields['t.task_date']['checked'])) print_liste_field_titre($arrayfields['t.task_date']['label'],$_SERVER['PHP_SELF'],'t.task_date,t.task_datehour,t.rowid','',$params,'',$sortfield,$sortorder);
+        if (! $id && ! $ref)   // Not a dedicated task
+        {
+            if (! empty($arrayfields['t.task_ref']['checked'])) print_liste_field_titre($arrayfields['t.task_ref']['label'],$_SERVER['PHP_SELF'],'pt.ref','',$params,'',$sortfield,$sortorder);            
+        }
         if (! empty($arrayfields['author']['checked'])) print_liste_field_titre($arrayfields['author']['label'],$_SERVER['PHP_SELF'],'','',$params,'',$sortfield,$sortorder);
 		if (! empty($arrayfields['t.note']['checked'])) print_liste_field_titre($arrayfields['t.note']['label'],$_SERVER['PHP_SELF'],'t.note','',$params,'',$sortfield,$sortorder);
 		if (! empty($arrayfields['t.task_duration']['checked'])) print_liste_field_titre($arrayfields['t.task_duration']['label'],$_SERVER['PHP_SELF'],'t.task_duration','',$params,'align="right"',$sortfield,$sortorder);
@@ -692,8 +719,11 @@ if (($id > 0 || ! empty($ref)) || $projectidforalltimes > 0)
 		print '<tr class="liste_titre">';
 		// LIST_OF_TD_TITLE_SEARCH
 		if (! empty($arrayfields['t.task_date']['checked'])) print '<td class="liste_titre"></td>';
-		if (! empty($arrayfields['t.task_datehour']['checked'])) print '<td class="liste_titre"></td>';
-		if (! empty($arrayfields['author']['checked'])) print '<td class="liste_titre"></td>';
+        if (! $id && ! $ref)   // Not a dedicated task
+        {
+            if (! empty($arrayfields['t.task_ref']['checked'])) print '<td class="liste_titre"></td>';
+        }
+        if (! empty($arrayfields['author']['checked'])) print '<td class="liste_titre"></td>';
 		if (! empty($arrayfields['t.note']['checked'])) print '<td class="liste_titre"><input type="text" class="flat" name="search_note" value="'.$search_note.'" size="10"></td>';
 		if (! empty($arrayfields['t.task_duration']['checked'])) print '<td class="liste_titre right"></td>';
 		if (! empty($arrayfields['value']['checked'])) print '<td class="liste_titre"></td>';
@@ -731,6 +761,8 @@ if (($id > 0 || ! empty($ref)) || $projectidforalltimes > 0)
 		print $searchpitco;
 		print '</td>';
 		print '</tr>'."\n";		
+
+		$tasktmp = new Task($db);
 		
 		$total = 0;
 		$totalvalue = 0;
@@ -756,13 +788,29 @@ if (($id > 0 || ! empty($ref)) || $projectidforalltimes > 0)
     			}
     			print '</td>';
 			}
+
+			// Task
+            if (! empty($arrayfields['t.task_ref']['checked']))
+            {
+    			if (! $id && ! $ref)   // Not a dedicated task
+    			{
+        			print '<td class="nowrap">';
+        			$tasktmp->id = $task_time->fk_task;
+        			$tasktmp->ref = $task_time->ref;
+        			$tasktmp->label = $task_time->label;
+        			print $tasktmp->getNomUrl(1, 'withproject', 'time');	
+        			print '</td>';
+    			}
+            }
+            
 			// User
             if (! empty($arrayfields['author']['checked'])) 
             {
                 print '<td>';
     			if ($_GET['action'] == 'editline' && $_GET['lineid'] == $task_time->rowid)
     			{
-    				$contactsoftask=$object->getListContactId('internal');
+			        if (empty($object->id)) $object->fetch($id);
+    			    $contactsoftask=$object->getListContactId('internal');
     				if (!in_array($task_time->fk_user,$contactsoftask)) {
     					$contactsoftask[]=$task_time->fk_user;
     				}
diff --git a/htdocs/societe/list.php b/htdocs/societe/list.php
index e4e67ba7eabc0b5f2e5bc698ad80497bdbba3941..af84028322361745f0bec6605072b7efdb93b958 100644
--- a/htdocs/societe/list.php
+++ b/htdocs/societe/list.php
@@ -159,7 +159,8 @@ $arrayfields=array(
     's.idprof4'=>array('label'=>$langs->trans("ProfId4Short"), 'checked'=>$checkedprofid4),
     's.idprof5'=>array('label'=>$langs->trans("ProfId5Short"), 'checked'=>$checkedprofid5),
     's.idprof6'=>array('label'=>$langs->trans("ProfId6Short"), 'checked'=>$checkedprofid6),
-	's.fk_prospectlevel'=>array('label'=>$langs->trans("ProspectLevelShort"), 'checked'=>$checkprospectlevel),
+    'customerorsupplier'=>array('label'=>'Nature', 'checked'=>1),
+    's.fk_prospectlevel'=>array('label'=>$langs->trans("ProspectLevelShort"), 'checked'=>$checkprospectlevel),
 	's.fk_stcomm'=>array('label'=>$langs->trans("StatusProsp"), 'checked'=>$checkstcomm),
     's.datec'=>array('label'=>$langs->trans("DateCreation"), 'checked'=>0, 'position'=>500),
     's.tms'=>array('label'=>$langs->trans("DateModificationShort"), 'checked'=>0, 'position'=>500),
@@ -567,6 +568,8 @@ if (! empty($moreforfilter))
 $varpage=empty($contextpage)?$_SERVER["PHP_SELF"]:$contextpage;
 $selectedfields=$form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage);	// This also change content of $arrayfields
 
+if (empty($arrayfields['customerorsupplier']['checked'])) print '<input type="hidden" name="type" value="'.$type.'">';
+
 print '<table class="liste'.($moreforfilter?" listwithfilterbefore":"").'">';
 
 print '<tr class="liste_titre">';
@@ -587,7 +590,7 @@ if (! empty($arrayfields['s.ape']['checked']))            print_liste_field_titr
 if (! empty($arrayfields['s.idprof4']['checked']))        print_liste_field_titre($form->textwithpicto($langs->trans("ProfId4Short"),$textprofid[4],1,0),$_SERVER["PHP_SELF"],"s.idprof4","",$param,'class="nowrap"',$sortfield,$sortorder);
 if (! empty($arrayfields['s.idprof5']['checked']))        print_liste_field_titre($form->textwithpicto($langs->trans("ProfId5Short"),$textprofid[4],1,0),$_SERVER["PHP_SELF"],"s.idprof5","",$param,'class="nowrap"',$sortfield,$sortorder);
 if (! empty($arrayfields['s.idprof6']['checked']))        print_liste_field_titre($form->textwithpicto($langs->trans("ProfId6Short"),$textprofid[4],1,0),$_SERVER["PHP_SELF"],"s.idprof6","",$param,'class="nowrap"',$sortfield,$sortorder);
-print_liste_field_titre('');   // type of customer
+if (! empty($arrayfields['customerorsupplier']['checked'])) print_liste_field_titre('');   // type of customer
 if (! empty($arrayfields['s.fk_prospectlevel']['checked'])) print_liste_field_titre($arrayfields['s.fk_prospectlevel']['label'],$_SERVER["PHP_SELF"],"s.fk_prospectlevel","",$param,'align="center"',$sortfield,$sortorder);
 if (! empty($arrayfields['s.fk_stcomm']['checked']))      print_liste_field_titre($arrayfields['s.fk_stcomm']['label'],$_SERVER["PHP_SELF"],"s.fk_stcomm","",$param,'align="center"',$sortfield,$sortorder);
 // Extra fields
@@ -735,17 +738,19 @@ if (! empty($arrayfields['s.idprof6']['checked']))
 }
 
 // Type (customer/prospect/supplier)
-print '<td class="liste_titre maxwidthonsmartphone" align="middle">';
-if ($type != '') print '<input type="hidden" name="type" value="'.$type.'">';
-print '<select class="flat" name="search_type">';
-print '<option value="-1"'.($search_type==''?' selected':'').'>&nbsp;</option>';
-if (empty($conf->global->SOCIETE_DISABLE_CUSTOMERS)) print '<option value="1,3"'.($search_type=='1,3'?' selected':'').'>'.$langs->trans('Customer').'</option>';
-if (empty($conf->global->SOCIETE_DISABLE_PROSPECTS)) print '<option value="2,3"'.($search_type=='2,3'?' selected':'').'>'.$langs->trans('Prospect').'</option>';
-//if (empty($conf->global->SOCIETE_DISABLE_PROSPECTS)) print '<option value="3"'.($search_type=='3'?' selected':'').'>'.$langs->trans('ProspectCustomer').'</option>';
-print '<option value="4"'.($search_type=='4'?' selected':'').'>'.$langs->trans('Supplier').'</option>';
-print '<option value="0"'.($search_type=='0'?' selected':'').'>'.$langs->trans('Others').'</option>';
-print '</select></td>';
-
+if (! empty($arrayfields['customerorsupplier']['checked']))
+{
+    print '<td class="liste_titre maxwidthonsmartphone" align="middle">';
+    if ($type != '') print '<input type="hidden" name="type" value="'.$type.'">';
+    print '<select class="flat" name="search_type">';
+    print '<option value="-1"'.($search_type==''?' selected':'').'>&nbsp;</option>';
+    if (empty($conf->global->SOCIETE_DISABLE_CUSTOMERS)) print '<option value="1,3"'.($search_type=='1,3'?' selected':'').'>'.$langs->trans('Customer').'</option>';
+    if (empty($conf->global->SOCIETE_DISABLE_PROSPECTS)) print '<option value="2,3"'.($search_type=='2,3'?' selected':'').'>'.$langs->trans('Prospect').'</option>';
+    //if (empty($conf->global->SOCIETE_DISABLE_PROSPECTS)) print '<option value="3"'.($search_type=='3'?' selected':'').'>'.$langs->trans('ProspectCustomer').'</option>';
+    print '<option value="4"'.($search_type=='4'?' selected':'').'>'.$langs->trans('Supplier').'</option>';
+    print '<option value="0"'.($search_type=='0'?' selected':'').'>'.$langs->trans('Others').'</option>';
+    print '</select></td>';
+}
 if (! empty($arrayfields['s.fk_prospectlevel']['checked']))
 {
     // Prospect level
@@ -946,30 +951,33 @@ while ($i < min($num, $limit))
         print "<td>".$obj->idprof6."</td>\n";
     }
     // Type
-    print '<td align="center">';
-	$s='';
-	if (($obj->client==1 || $obj->client==3) && empty($conf->global->SOCIETE_DISABLE_CUSTOMERS))
-	{
-  		$companystatic->name=$langs->trans("Customer");
-  		$companystatic->name_alias='';
-	    $s.=$companystatic->getNomUrl(0,'customer');
-	}
-	if (($obj->client==2 || $obj->client==3) && empty($conf->global->SOCIETE_DISABLE_PROSPECTS))
-	{
-        if ($s) $s.=" / ";
-	    $companystatic->name=$langs->trans("Prospect");
-  		$companystatic->name_alias='';
-	    $s.=$companystatic->getNomUrl(0,'prospect');
-	}
-	if (! empty($conf->fournisseur->enabled) && $obj->fournisseur)
-	{
-		if ($s) $s.=" / ";
-        $companystatic->name=$langs->trans("Supplier");
-  		$companystatic->name_alias='';
-        $s.=$companystatic->getNomUrl(0,'supplier');
-	}
-	print $s;
-	print '</td>';
+    if (! empty($arrayfields['customerorsupplier']['checked']))
+    {
+        print '<td align="center">';
+    	$s='';
+    	if (($obj->client==1 || $obj->client==3) && empty($conf->global->SOCIETE_DISABLE_CUSTOMERS))
+    	{
+      		$companystatic->name=$langs->trans("Customer");
+      		$companystatic->name_alias='';
+    	    $s.=$companystatic->getNomUrl(0,'customer');
+    	}
+    	if (($obj->client==2 || $obj->client==3) && empty($conf->global->SOCIETE_DISABLE_PROSPECTS))
+    	{
+            if ($s) $s.=" / ";
+    	    $companystatic->name=$langs->trans("Prospect");
+      		$companystatic->name_alias='';
+    	    $s.=$companystatic->getNomUrl(0,'prospect');
+    	}
+    	if (! empty($conf->fournisseur->enabled) && $obj->fournisseur)
+    	{
+    		if ($s) $s.=" / ";
+            $companystatic->name=$langs->trans("Supplier");
+      		$companystatic->name_alias='';
+            $s.=$companystatic->getNomUrl(0,'supplier');
+    	}
+    	print $s;
+    	print '</td>';
+    }
     if (! empty($arrayfields['s.fk_prospectlevel']['checked']))
     {
 		// Prospect level
diff --git a/htdocs/societe/notify/card.php b/htdocs/societe/notify/card.php
index 11c62f7ccfc0feab9ceda4c0a9119b90931e650a..c56687dc834a42fe0a255493e199ee7df18b13bf 100644
--- a/htdocs/societe/notify/card.php
+++ b/htdocs/societe/notify/card.php
@@ -52,7 +52,7 @@ $offset = $conf->liste_limit * $page;
 $pageprev = $page - 1;
 $pagenext = $page + 1;
 if (! $sortorder) $sortorder="DESC";
-if (! $sortfield) $sortfield="a.daten";
+if (! $sortfield) $sortfield="n.daten";
 
 $now=dol_now();
 
@@ -221,9 +221,9 @@ if ($result > 0)
     // Line with titles
     print '<table width="100%" class="noborder">';
     print '<tr class="liste_titre">';
-    print_liste_field_titre($langs->trans("Target"),$_SERVER["PHP_SELF"],"c.lastname",'',$param,'"width="45%"',$sortfield,$sortorder);
-    print_liste_field_titre($langs->trans("Action"),$_SERVER["PHP_SELF"],"a.titre",'',$param,'"width="35%"',$sortfield,$sortorder);
-    print_liste_field_titre($langs->trans("Type"),$_SERVER["PHP_SELF"],"",'',$param,'"width="10%"',$sortfield,$sortorder);
+    print_liste_field_titre($langs->trans("Target"),$_SERVER["PHP_SELF"],"c.lastname,c.firstname",'',$param,'"width="45%"',$sortfield,$sortorder);
+    print_liste_field_titre($langs->trans("Action"),$_SERVER["PHP_SELF"],"",'',$param,'"width="35%"',$sortfield,$sortorder);
+    print_liste_field_titre($langs->trans("Type"),$_SERVER["PHP_SELF"],"n.type",'',$param,'"width="10%"',$sortfield,$sortorder);
     print_liste_field_titre('');
 	print "</tr>\n";
 
@@ -268,22 +268,7 @@ if ($result > 0)
     print '</form>';
     print '<br>';
 
-    // List of active notifications
-    print load_fiche_titre($langs->trans("ListOfActiveNotifications"),'','');
-    $var=true;
-
-    // Line with titles
-    print '<table width="100%" class="noborder">';
-    print '<tr class="liste_titre">';
-    print_liste_field_titre($langs->trans("Target"),$_SERVER["PHP_SELF"],"c.lastname",'',$param,'"width="45%"',$sortfield,$sortorder);
-    print_liste_field_titre($langs->trans("Action"),$_SERVER["PHP_SELF"],"a.titre",'',$param,'"width="35%"',$sortfield,$sortorder);
-    print_liste_field_titre($langs->trans("Type"),$_SERVER["PHP_SELF"],"",'',$param,'"width="10%"',$sortfield,$sortorder);
-    print_liste_field_titre('','','');
-    print '</tr>';
-
-	$langs->load("errors");
-	$langs->load("other");
-
+    
     // List of notifications enabled for contacts
     $sql = "SELECT n.rowid, n.type,";
     $sql.= " a.code, a.label,";
@@ -294,11 +279,35 @@ if ($result > 0)
     $sql.= " WHERE a.rowid = n.fk_action";
     $sql.= " AND c.rowid = n.fk_contact";
     $sql.= " AND c.fk_soc = ".$object->id;
-
+    
     $resql=$db->query($sql);
     if ($resql)
     {
         $num = $db->num_rows($resql);
+    }
+    else
+    {
+        dol_print_error($db);
+    }
+    
+    // List of active notifications
+    print load_fiche_titre($langs->trans("ListOfActiveNotifications").' ('.$num.')','','');
+    $var=true;
+
+    // Line with titles
+    print '<table width="100%" class="noborder">';
+    print '<tr class="liste_titre">';
+    print_liste_field_titre($langs->trans("Target"),$_SERVER["PHP_SELF"],"c.lastname,c.firstname",'',$param,'"width="45%"',$sortfield,$sortorder);
+    print_liste_field_titre($langs->trans("Action"),$_SERVER["PHP_SELF"],"",'',$param,'"width="35%"',$sortfield,$sortorder);
+    print_liste_field_titre($langs->trans("Type"),$_SERVER["PHP_SELF"],"n.type",'',$param,'"width="10%"',$sortfield,$sortorder);
+    print_liste_field_titre('','','');
+    print '</tr>';
+
+	$langs->load("errors");
+	$langs->load("other");
+
+    if ($num)
+    {
         $i = 0;
 
         $contactstatic=new Contact($db);
@@ -340,10 +349,6 @@ if ($result > 0)
         }
         $db->free($resql);
     }
-    else
-    {
-        dol_print_error($db);
-    }
 
     // List of notifications enabled for fixed email
     /*
@@ -401,20 +406,6 @@ if ($result > 0)
     print '<br><br>'."\n";
 
 
-    // List of notifications done
-    print load_fiche_titre($langs->trans("ListOfNotificationsDone"),'','');
-    $var=true;
-
-    // Line with titles
-    print '<table width="100%" class="noborder">';
-    print '<tr class="liste_titre">';
-    print_liste_field_titre($langs->trans("Target"),$_SERVER["PHP_SELF"],"c.lastname",'',$param,'',$sortfield,$sortorder);
-    print_liste_field_titre($langs->trans("Action"),$_SERVER["PHP_SELF"],"a.titre",'',$param,'',$sortfield,$sortorder);
-    print_liste_field_titre($langs->trans("Type"),$_SERVER["PHP_SELF"],"",'',$param,'',$sortfield,$sortorder);
-    //print_liste_field_titre($langs->trans("Object"),$_SERVER["PHP_SELF"],"",'',$param,'"',$sortfield,$sortorder);
-    print_liste_field_titre($langs->trans("Date"),$_SERVER["PHP_SELF"],"a.daten",'',$param,'align="right"',$sortfield,$sortorder);
-    print '</tr>';
-
     // List
     $sql = "SELECT n.rowid, n.daten, n.email, n.objet_type as object_type, n.objet_id as object_id, n.type,";
     $sql.= " c.rowid as id, c.lastname, c.firstname, c.email as contactemail,";
@@ -424,11 +415,34 @@ if ($result > 0)
     $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."socpeople as c ON n.fk_contact = c.rowid";
     $sql.= " WHERE a.rowid = n.fk_action";
     $sql.= " AND n.fk_soc = ".$object->id;
+    $sql.= $db->order($sortfield, $sortorder);
 
     $resql=$db->query($sql);
     if ($resql)
     {
         $num = $db->num_rows($resql);
+    }
+    else
+    {
+        dol_print_error($db);
+    }
+    
+    // List of notifications done
+    print load_fiche_titre($langs->trans("ListOfNotificationsDone").' ('.$num.')','','');
+    $var=true;
+
+    // Line with titles
+    print '<table width="100%" class="noborder">';
+    print '<tr class="liste_titre">';
+    print_liste_field_titre($langs->trans("Target"),$_SERVER["PHP_SELF"],"c.lastname,c.firstname",'',$param,'',$sortfield,$sortorder);
+    print_liste_field_titre($langs->trans("Action"),$_SERVER["PHP_SELF"],"",'',$param,'',$sortfield,$sortorder);
+    print_liste_field_titre($langs->trans("Type"),$_SERVER["PHP_SELF"],"n.type",'',$param,'',$sortfield,$sortorder);
+    //print_liste_field_titre($langs->trans("Object"),$_SERVER["PHP_SELF"],"",'',$param,'"',$sortfield,$sortorder);
+    print_liste_field_titre($langs->trans("Date"),$_SERVER["PHP_SELF"],"n.daten",'',$param,'align="right"',$sortfield,$sortorder);
+    print '</tr>';
+
+    if ($num > 0)
+    {
         $i = 0;
 
         $contactstatic=new Contact($db);
@@ -477,10 +491,6 @@ if ($result > 0)
         }
         $db->free($resql);
     }
-    else
-    {
-        dol_print_error($db);
-    }
 
     print '</table>';
 }
diff --git a/htdocs/theme/eldy/style.css.php b/htdocs/theme/eldy/style.css.php
index 8e982f2d69cfe15a97af506819d77d5a4f1a7ea3..0601225005107f93a8f46ce359cf42a36b5dfaa7 100644
--- a/htdocs/theme/eldy/style.css.php
+++ b/htdocs/theme/eldy/style.css.php
@@ -3796,9 +3796,9 @@ div.ecmjqft {
 /* use or not ? */
 div.jnotify-background {
 	opacity : 0.95 !important;
-    -moz-box-shadow: 3px 3px 4px #888 !important;
-    -webkit-box-shadow: 3px 3px 4px #888 !important;
-    box-shadow: 3px 3px 4px #888 !important;
+    -moz-box-shadow: 2px 2px 4px #888 !important;
+    -webkit-box-shadow: 2px 2px 4px #888 !important;
+    box-shadow: 2px 2px 4px #888 !important;
 }
 
 /* ============================================================================== */
diff --git a/htdocs/theme/md/style.css.php b/htdocs/theme/md/style.css.php
index 09a8bc80a65b767f295ef8cfba5f1b9446b62158..475257e6d1c9654a479703bb135f22ac2a1c6069 100644
--- a/htdocs/theme/md/style.css.php
+++ b/htdocs/theme/md/style.css.php
@@ -3696,9 +3696,9 @@ div.ecmjqft {
 /* use or not ? */
 div.jnotify-background {
 	opacity : 0.95 !important;
-    -moz-box-shadow: 3px 3px 4px #888 !important;
-    -webkit-box-shadow: 3px 3px 4px #888 !important;
-    box-shadow: 3px 3px 4px #888 !important;
+    -moz-box-shadow: 2px 2px 4px #888 !important;
+    -webkit-box-shadow: 2px 2px 4px #888 !important;
+    box-shadow: 2px 2px 4px #888 !important;
 }
 
 /* ============================================================================== */
diff --git a/scripts/withdrawals/build_withdrawal_file.php b/scripts/withdrawals/build_withdrawal_file.php
index 1a8c673c5f9d5305bd280a60a9b910aea1e433f8..d381c32676a99f073829a2eb3c5c06609fc5aa8e 100755
--- a/scripts/withdrawals/build_withdrawal_file.php
+++ b/scripts/withdrawals/build_withdrawal_file.php
@@ -70,6 +70,7 @@ if (! isset($argv[1])) {	// Check parameters
 
 
 $withdrawreceipt=new BonPrelevement($db);
+// $conf->global->PRELEVEMENT_CODE_BANQUE and $conf->global->PRELEVEMENT_CODE_GUICHET should be empty
 $result=$withdrawreceipt->create($conf->global->PRELEVEMENT_CODE_BANQUE,$conf->global->PRELEVEMENT_CODE_GUICHET,$argv[1]);