diff --git a/htdocs/adherents/class/adherent.class.php b/htdocs/adherents/class/adherent.class.php
index 1ffa7da1866d01ab2389c2ee23d7cac06f069bf6..833b5bf224e6330ab8f9093b0077fe37415c51fb 100644
--- a/htdocs/adherents/class/adherent.class.php
+++ b/htdocs/adherents/class/adherent.class.php
@@ -1775,7 +1775,7 @@ class Adherent extends CommonObject
 	        $response->warning_delay=$conf->adherent->subscription->warning_delay/60/60/24;
 	        $response->label=$langs->trans("MembersWithSubscriptionToReceive");
 	        $response->url=DOL_URL_ROOT.'/adherents/list.php?mainmenu=members&statut=1&filter=outofdate';
-	        $response->img=img_object($langs->trans("Members"),"user");
+	        $response->img=img_object('',"user");
 
             $adherentstatic = new Adherent($this->db);
 
diff --git a/htdocs/comm/action/class/actioncomm.class.php b/htdocs/comm/action/class/actioncomm.class.php
index 7140bb09a1e47416b2b2814bfd693ed52c6ff892..fc0bbebb9019119f11cd70490bd59f94ab472310 100644
--- a/htdocs/comm/action/class/actioncomm.class.php
+++ b/htdocs/comm/action/class/actioncomm.class.php
@@ -936,7 +936,7 @@ class ActionComm extends CommonObject
 	        $response->label = $langs->trans("ActionsToDo");
 	        $response->url = DOL_URL_ROOT.'/comm/action/listactions.php?status=todo&mainmenu=agenda';
 	        if ($user->rights->agenda->allactions->read) $response->url.='&filtert=-1';
-	        $response->img = img_object($langs->trans("Actions"),"action");
+	        $response->img = img_object('',"action");
 
             // This assignment in condition is not a bug. It allows walking the results.
             while ($obj=$this->db->fetch_object($resql))
diff --git a/htdocs/comm/propal/class/propal.class.php b/htdocs/comm/propal/class/propal.class.php
index 765179c3d635f480d670ad1f252f8a83d6116d4c..3489860e1dd3bdd6f41b958aab55329fd17b8dd7 100644
--- a/htdocs/comm/propal/class/propal.class.php
+++ b/htdocs/comm/propal/class/propal.class.php
@@ -3027,7 +3027,7 @@ class Propal extends CommonObject
 	        $response->label = $label;
 	        $response->url = DOL_URL_ROOT.'/comm/propal/list.php?viewstatut='.$statut.'&mainmenu=commercial&leftmenu=propals';
 	        $response->url_late = DOL_URL_ROOT.'/comm/propal/list.php?viewstatut='.$statut.'&mainmenu=commercial&leftmenu=propals&sortfield=p.datep&sortorder=asc';
-	        $response->img = img_object($langs->trans("Propals"),"propal");
+	        $response->img = img_object('',"propal");
 
             // This assignment in condition is not a bug. It allows walking the results.
             while ($obj=$this->db->fetch_object($resql))
diff --git a/htdocs/commande/class/commande.class.php b/htdocs/commande/class/commande.class.php
index 7bad08b2f84dfc6c9849c5c509d3f6d1c976f25e..e87923beb8c9096931fd259b525a849aa6ec4f2f 100644
--- a/htdocs/commande/class/commande.class.php
+++ b/htdocs/commande/class/commande.class.php
@@ -3102,6 +3102,8 @@ class Commande extends CommonOrder
 
         $error = 0;
 
+        dol_syslog(get_class($this) . "::delete ".$this->id, LOG_DEBUG);
+        
         $this->db->begin();
 
         if (! $error && ! $notrigger)
@@ -3117,7 +3119,6 @@ class Commande extends CommonOrder
         {
         	// Delete order details
         	$sql = 'DELETE FROM '.MAIN_DB_PREFIX."commandedet WHERE fk_commande = ".$this->id;
-        	dol_syslog(get_class($this)."::delete", LOG_DEBUG);
         	if (! $this->db->query($sql) )
         	{
         		$error++;
@@ -3126,7 +3127,6 @@ class Commande extends CommonOrder
 
         	// Delete order
         	$sql = 'DELETE FROM '.MAIN_DB_PREFIX."commande WHERE rowid = ".$this->id;
-        	dol_syslog(get_class($this)."::delete", LOG_DEBUG);
         	if (! $this->db->query($sql) )
         	{
         		$error++;
@@ -3184,7 +3184,6 @@ class Commande extends CommonOrder
 
         if (! $error)
         {
-        	dol_syslog(get_class($this)."::delete $this->id by $user->id", LOG_DEBUG);
         	$this->db->commit();
         	return 1;
         }
@@ -3192,7 +3191,6 @@ class Commande extends CommonOrder
         {
 	        foreach($this->errors as $errmsg)
 	        {
-		        dol_syslog(get_class($this)."::delete ".$errmsg, LOG_ERR);
 		        $this->error.=($this->error?', '.$errmsg:$errmsg);
 	        }
 	        $this->db->rollback();
@@ -3233,7 +3231,7 @@ class Commande extends CommonOrder
 	        $response->warning_delay=$conf->commande->client->warning_delay/60/60/24;
 	        $response->label=$langs->trans("OrdersToProcess");
 	        $response->url=DOL_URL_ROOT.'/commande/list.php?viewstatut=-3&mainmenu=commercial&leftmenu=orders';
-	        $response->img=img_object($langs->trans("Orders"),"order");
+	        $response->img=img_object('',"order");
 
             $generic_commande = new Commande($this->db);
 
diff --git a/htdocs/compta/bank/class/account.class.php b/htdocs/compta/bank/class/account.class.php
index be4ec60b7f85c02286a62dd29556ec3fe5682433..1670ac2917c6f2b631cc4e2825a2cb843a59c1cd 100644
--- a/htdocs/compta/bank/class/account.class.php
+++ b/htdocs/compta/bank/class/account.class.php
@@ -1185,7 +1185,7 @@ class Account extends CommonObject
 	        $response->warning_delay=$conf->bank->rappro->warning_delay/60/60/24;
 	        $response->label=$langs->trans("TransactionsToConciliate");
 	        $response->url=DOL_URL_ROOT.'/compta/bank/index.php?leftmenu=bank&mainmenu=bank';
-	        $response->img=img_object($langs->trans("TransactionsToConciliate"),"payment");
+	        $response->img=img_object('',"payment");
 
             while ($obj=$this->db->fetch_object($resql))
             {
diff --git a/htdocs/compta/facture/card.php b/htdocs/compta/facture/card.php
index 88ce6ca10e073f52c606bb8e7507d41a6db8d94e..663c0374b9a0243835b6a9013c9a4e89c257abd9 100644
--- a/htdocs/compta/facture/card.php
+++ b/htdocs/compta/facture/card.php
@@ -4099,7 +4099,7 @@ else if ($id > 0 || ! empty($ref))
 					if ($resteapayer == 0) {
 						print '<div class="inline-block divButAction"><span class="butActionRefused" title="' . $langs->trans("DisabledBecauseRemainderToPayIsZero") . '">' . $langs->trans('DoPayment') . '</span></div>';
 					} else {
-						print '<div class="inline-block divButAction"><a class="butAction" href="paiement.php?facid=' . $object->id . '&amp;action=create&amp;accountid='.$object->fk_account.'">' . $langs->trans('DoPayment') . '</a></div>';
+						print '<div class="inline-block divButAction"><a class="butAction" href="'. DOL_URL_ROOT .'/compta/paiement.php?facid=' . $object->id . '&amp;action=create&amp;accountid='.$object->fk_account.'">' . $langs->trans('DoPayment') . '</a></div>';
 					}
 				}
 			}
@@ -4115,7 +4115,7 @@ else if ($id > 0 || ! empty($ref))
 					}
 					else
 					{
-						print '<div class="inline-block divButAction"><a class="butAction" href="paiement.php?facid='.$object->id.'&amp;action=create&amp;accountid='.$object->fk_account.'">'.$langs->trans('DoPaymentBack').'</a></div>';
+						print '<div class="inline-block divButAction"><a class="butAction" href="'. DOL_URL_ROOT .'/compta/paiement.php?facid='.$object->id.'&amp;action=create&amp;accountid='.$object->fk_account.'">'.$langs->trans('DoPaymentBack').'</a></div>';
 					}
 				}
 
diff --git a/htdocs/compta/facture/class/facture.class.php b/htdocs/compta/facture/class/facture.class.php
index 721713fc27953d0fd0c1e00165969e3a7eeb2c3b..963534da934cc3d6690026c631fddb00579cdfd4 100644
--- a/htdocs/compta/facture/class/facture.class.php
+++ b/htdocs/compta/facture/class/facture.class.php
@@ -3680,7 +3680,7 @@ class Facture extends CommonInvoice
 			$response->warning_delay=$conf->facture->client->warning_delay/60/60/24;
 			$response->label=$langs->trans("CustomerBillsUnpaid");
 			$response->url=DOL_URL_ROOT.'/compta/facture/list.php?search_status=1&mainmenu=accountancy&leftmenu=customers_bills';
-			$response->img=img_object($langs->trans("Bills"),"bill");
+			$response->img=img_object('',"bill");
 
 			$generic_facture = new Facture($this->db);
 
diff --git a/htdocs/compta/paiement/cheque/class/remisecheque.class.php b/htdocs/compta/paiement/cheque/class/remisecheque.class.php
index ad53e98693ef26e1cf17341cff3f86e386415710..d784bfa03e71cb4f8d1b532006c0dcaa90f791ea 100644
--- a/htdocs/compta/paiement/cheque/class/remisecheque.class.php
+++ b/htdocs/compta/paiement/cheque/class/remisecheque.class.php
@@ -511,7 +511,7 @@ class RemiseCheque extends CommonObject
 			$response->warning_delay=$conf->bank->cheque->warning_delay/60/60/24;
 			$response->label=$langs->trans("BankChecksToReceipt");
 			$response->url=DOL_URL_ROOT.'/compta/paiement/cheque/index.php?leftmenu=checks&amp;mainmenu=bank';
-			$response->img=img_object($langs->trans("BankChecksToReceipt"),"payment");
+			$response->img=img_object('',"payment");
 
 			while ($obj=$this->db->fetch_object($resql))
 			{
diff --git a/htdocs/contrat/card.php b/htdocs/contrat/card.php
index 400548b7076480f193a5552ab0c7ac1d6a9c6886..34f44c4f6908725f3fa86ae75d1aa48d83ac8f8d 100644
--- a/htdocs/contrat/card.php
+++ b/htdocs/contrat/card.php
@@ -1271,7 +1271,7 @@ else
 
         $hselected = 0;
 
-        dol_fiche_head($head, $hselected, $langs->trans("Contract"), 0, 'contract');
+        dol_fiche_head($head, $hselected, $langs->trans("Contract"), -1, 'contract');
 
 
         /*
@@ -1595,7 +1595,7 @@ else
 
                     print "</tr>\n";
 
-                    // Dates de en service prevues et effectives
+                    // Dates of service planed and real
                     if ($objp->subprice >= 0)
                     {
 	                    $colspan = 6;
@@ -1862,15 +1862,13 @@ else
                 print '</table>';
             }
 
+            // Form to activate line
             if ($user->rights->contrat->activer && $action == 'activateline' && $object->lines[$cursorline-1]->id == GETPOST('ligne'))
             {
-                /**
-                 * Activer la ligne de contrat
-                 */
                 print '<form name="active" action="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&amp;ligne='.GETPOST('ligne').'&amp;action=active" method="post">';
                 print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
 
-                print '<table class="noborder tableforservicepart2" width="100%">';
+                print '<table class="noborder tableforservicepart2'.($cursorline < $nbofservices ?'  boxtablenobottom':'').'" width="100%">';
 
                 // Definie date debut et fin par defaut
                 $dateactstart = $objp->date_debut;
diff --git a/htdocs/contrat/class/contrat.class.php b/htdocs/contrat/class/contrat.class.php
index ca89cdd8d182bc9c7c8fc830eefbb2fc81e222ad..d4d41b2f60c97a484c4df971d5c19d6df2d6982a 100644
--- a/htdocs/contrat/class/contrat.class.php
+++ b/htdocs/contrat/class/contrat.class.php
@@ -1765,7 +1765,7 @@ class Contrat extends CommonObject
 	/**
 	 *  Return label of a contract status
 	 *
-	 *  @param	int		$mode       0=libelle long, 1=libelle court, 2=Picto + Libelle court, 3=Picto, 4=Picto + Long label of all services, 5=Libelle court + Picto, 6=Picto of all services
+	 *  @param	int		$mode       0=libelle long, 1=libelle court, 2=Picto + Libelle court, 3=Picto, 4=Picto + Long label of all services, 5=Libelle court + Picto, 6=Picto of all services, 7=Same than 6 with fixed length
 	 *  @return string      		Label
 	 */
 	function getLibStatut($mode)
@@ -1777,7 +1777,7 @@ class Contrat extends CommonObject
 	 *  Renvoi label of a given contrat status
 	 *
 	 *  @param	int		$statut      	Status id
-	 *  @param  int		$mode          	0=Long label, 1=Short label, 2=Picto + Libelle court, 3=Picto, 4=Picto + Long label of all services, 5=Libelle court + Picto, 6=Picto of all services
+	 *  @param  int		$mode          	0=Long label, 1=Short label, 2=Picto + Libelle court, 3=Picto, 4=Picto + Long label of all services, 5=Libelle court + Picto, 6=Picto of all services, 7=Same than 6 with fixed length
 	 *	@return string      			Label
 	 */
 	function LibStatut($statut,$mode)
@@ -1808,7 +1808,7 @@ class Contrat extends CommonObject
 			if ($statut == 1) { return img_picto($langs->trans('ContractStatusValidated'),'statut4'); }
 			if ($statut == 2) { return img_picto($langs->trans('ContractStatusClosed'),'statut6'); }
 		}
-		if ($mode == 4 || $mode == 6)
+		if ($mode == 4 || $mode == 6 || $mode == 7)
 		{
 			$line=new ContratLigne($this->db);
 			$text='';
@@ -1818,10 +1818,15 @@ class Contrat extends CommonObject
 				$text.=' '.$langs->trans("Services");
 				$text.=': &nbsp; &nbsp; ';
 			}
-			$text.=$this->nbofserviceswait.' '.$line->LibStatut(0,3).' &nbsp; ';
-			$text.=$this->nbofservicesopened.' '.$line->LibStatut(4,3,0).' &nbsp; ';
-			$text.=$this->nbofservicesexpired.' '.$line->LibStatut(4,3,1).' &nbsp; ';
-			$text.=$this->nbofservicesclosed.' '.$line->LibStatut(5,3);
+			$text.=($mode == 7?'<div class="inline-block">':'');
+			$text.=($mode != 7 || $this->nbofserviceswait > 0) ? $this->nbofserviceswait.' '.$line->LibStatut(0,3).' &nbsp; ' : '';
+			$text.=($mode == 7?'</div><div class="inline-block">':'');
+			$text.=($mode != 7 || $this->nbofservicesopened > 0) ? $this->nbofservicesopened.' '.$line->LibStatut(4,3,0).' &nbsp; ' : '';
+			$text.=($mode == 7?'</div><div class="inline-block">':'');
+			$text.=($mode != 7 || $this->nbofservicesexpired > 0) ? $this->nbofservicesexpired.' '.$line->LibStatut(4,3,1).' &nbsp; ' : '';
+			$text.=($mode == 7?'</div><div class="inline-block">':'');
+			$text.=($mode != 7 || $this->nbofservicesclosed > 0) ? $this->nbofservicesclosed.' '.$line->LibStatut(5,3).' &nbsp; ' : '';
+			$text.=($mode == 7?'</div>':'');
 			return $text;
 		}
 		if ($mode == 5)
@@ -2070,7 +2075,7 @@ class Contrat extends CommonObject
 			$response->warning_delay = $warning_delay/60/60/24;
 			$response->label = $label;
 			$response->url = $url;
-			$response->img = img_object($langs->trans("Contract"),"contract");
+			$response->img = img_object('',"contract");
 
 			while ($obj=$this->db->fetch_object($resql))
 			{
diff --git a/htdocs/contrat/list.php b/htdocs/contrat/list.php
index 7436c16fe69f3a5534efea632a23e465f18c8d8b..c382bfc76126fcdb6eedfe19ba5af31e543220c2 100644
--- a/htdocs/contrat/list.php
+++ b/htdocs/contrat/list.php
@@ -340,7 +340,7 @@ if ($resql)
 	print '<input type="hidden" name="action" value="list">';
 	print '<input type="hidden" name="sortfield" value="'.$sortfield.'">';
 	print '<input type="hidden" name="sortorder" value="'.$sortorder.'">';
-
+	
     print_barre_liste($langs->trans("ListOfContracts"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $totalnboflines, 'title_commercial.png', 0, '', '', $limit);
 
 	if ($sall)
@@ -393,51 +393,12 @@ if ($resql)
 
     $varpage=empty($contextpage)?$_SERVER["PHP_SELF"]:$contextpage;
     $selectedfields=$form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage);	// This also change content of $arrayfields
-	
+	if ($massactionbutton) $selectedfields.=$form->showCheckAddButtons('checkforselect', 1);
+    
     print '<div class="div-table-responsive">';
     print '<table class="tagtable liste'.($moreforfilter?" listwithfilterbefore":"").'">'."\n";
-    print '<tr class="liste_titre">';
-    if (! empty($arrayfields['c.ref']['checked']))               print_liste_field_titre($arrayfields['c.ref']['label'], $_SERVER["PHP_SELF"], "c.ref","","$param",'',$sortfield,$sortorder);
-    if (! empty($arrayfields['c.ref_customer']['checked']))      print_liste_field_titre($arrayfields['c.ref_customer']['label'], $_SERVER["PHP_SELF"], "c.ref_customer","","$param",'',$sortfield,$sortorder);
-    if (! empty($arrayfields['c.ref_supplier']['checked']))      print_liste_field_titre($arrayfields['c.ref_supplier']['label'], $_SERVER["PHP_SELF"], "c.ref_supplier","","$param",'',$sortfield,$sortorder);
-    if (! empty($arrayfields['s.nom']['checked']))               print_liste_field_titre($arrayfields['s.nom']['label'], $_SERVER["PHP_SELF"], "s.nom","","$param",'',$sortfield,$sortorder);
-	if (! empty($arrayfields['s.town']['checked']))              print_liste_field_titre($arrayfields['s.town']['label'],$_SERVER["PHP_SELF"],'s.town','',$param,'',$sortfield,$sortorder);
-	if (! empty($arrayfields['s.zip']['checked']))               print_liste_field_titre($arrayfields['s.zip']['label'],$_SERVER["PHP_SELF"],'s.zip','',$param,'',$sortfield,$sortorder);
-	if (! empty($arrayfields['state.nom']['checked']))           print_liste_field_titre($arrayfields['state.nom']['label'],$_SERVER["PHP_SELF"],"state.nom","",$param,'',$sortfield,$sortorder);
-	if (! empty($arrayfields['country.code_iso']['checked']))    print_liste_field_titre($arrayfields['country.code_iso']['label'],$_SERVER["PHP_SELF"],"country.code_iso","",$param,'align="center"',$sortfield,$sortorder);
-	if (! empty($arrayfields['typent.code']['checked']))         print_liste_field_titre($arrayfields['typent.code']['label'],$_SERVER["PHP_SELF"],"typent.code","",$param,'align="center"',$sortfield,$sortorder);
-    if (! empty($arrayfields['sale_representative']['checked'])) print_liste_field_titre($arrayfields['sale_representative']['label'], $_SERVER["PHP_SELF"], "","","$param",'',$sortfield,$sortorder);
-    if (! empty($arrayfields['c.date_contrat']['checked']))      print_liste_field_titre($arrayfields['c.date_contrat']['label'], $_SERVER["PHP_SELF"], "c.date_contrat","","$param",'align="center"',$sortfield,$sortorder);
-	// Extra fields
-	if (is_array($extrafields->attribute_label) && count($extrafields->attribute_label))
-	{
-	   foreach($extrafields->attribute_label as $key => $val) 
-	   {
-           if (! empty($arrayfields["ef.".$key]['checked'])) 
-           {
-				$align=$extrafields->getAlignFlag($key);
-				print_liste_field_titre($extralabels[$key],$_SERVER["PHP_SELF"],"ef.".$key,"",$param,($align?'align="'.$align.'"':''),$sortfield,$sortorder);
-           }
-	   }
-	}
-	// Hook fields
-	$parameters=array('arrayfields'=>$arrayfields);
-    $reshook=$hookmanager->executeHooks('printFieldListTitle',$parameters);    // Note that $action and $object may have been modified by hook
-    print $hookmanager->resPrint;
-	if (! empty($arrayfields['c.datec']['checked']))     print_liste_field_titre($arrayfields['c.datec']['label'],$_SERVER["PHP_SELF"],"c.date_creation","",$param,'align="center" class="nowrap"',$sortfield,$sortorder);
-	if (! empty($arrayfields['c.tms']['checked']))       print_liste_field_titre($arrayfields['c.tms']['label'],$_SERVER["PHP_SELF"],"c.tms","",$param,'align="center" class="nowrap"',$sortfield,$sortorder);
-    if (! empty($arrayfields['status']['checked']))
-    {
-        print_liste_field_titre($staticcontratligne->LibStatut(0,3), '', '', '', '', 'width="16"');
-        print_liste_field_titre($staticcontratligne->LibStatut(4,3,0), '', '', '', '', 'width="16"');
-        print_liste_field_titre($staticcontratligne->LibStatut(4,3,1), '', '', '', '', 'width="16"');
-        print_liste_field_titre($staticcontratligne->LibStatut(5,3), '', '', '', '', 'width="16"');
-    }
-	print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"],"",'','','align="right"',$sortfield,$sortorder,'maxwidthsearch ');
-    print "</tr>\n";
 
-    print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
-    print '<tr class="liste_titre">';
+    print '<tr class="liste_titre_filter">';
     if (! empty($arrayfields['c.ref']['checked']))
     {
         print '<td class="liste_titre">';
@@ -486,7 +447,7 @@ if ($resql)
         print '<td class="liste_titre maxwidthonsmartphone" align="center">';
         print $form->selectarray("search_type_thirdparty", $formcompany->typent_array(0), $search_type_thirdparty, 0, 0, 0, '', 0, 0, 0, (empty($conf->global->SOCIETE_SORT_ON_TYPEENT)?'ASC':$conf->global->SOCIETE_SORT_ON_TYPEENT));
         print '</td>';
-    }    
+    }
     if (! empty($arrayfields['sale_representative']['checked']))
     {
         print '<td class="liste_titre"></td>';
@@ -495,12 +456,12 @@ if ($resql)
     {
         // Date contract
         print '<td class="liste_titre center">';
-      	//print $langs->trans('Month').': ';
-       	if (! empty($conf->global->MAIN_LIST_FILTER_ON_DAY)) print '<input class="flat" type="text" size="1" maxlength="2" name="day" value="'.$day.'">';
-       	print '<input class="flat" type="text" size="1" maxlength="2" name="month" value="'.$month.'">';
-       	//print '&nbsp;'.$langs->trans('Year').': ';
-       	$syear = $year;
-       	$formother->select_year($syear,'year',1, 20, 5);
+        //print $langs->trans('Month').': ';
+        if (! empty($conf->global->MAIN_LIST_FILTER_ON_DAY)) print '<input class="flat" type="text" size="1" maxlength="2" name="day" value="'.$day.'">';
+        print '<input class="flat" type="text" size="1" maxlength="2" name="month" value="'.$month.'">';
+        //print '&nbsp;'.$langs->trans('Year').': ';
+        $syear = $year;
+        $formother->select_year($syear,'year',1, 20, 5);
         print '</td>';
     }
     // Extra fields
@@ -541,19 +502,58 @@ if ($resql)
     {
         print '<td class="liste_titre">';
         print '</td>';
-    }    
+    }
     // Status
     if (! empty($arrayfields['status']['checked']))
     {
         print '<td class="liste_titre" colspan="4" align="right"></td>';
     }
     print '<td class="liste_titre" align="middle">';
-	$searchpitco=$form->showFilterAndCheckAddButtons($massactionbutton?1:0, 'checkforselect', 1);
-	print $searchpitco;
+    $searchpitco=$form->showFilterButtons();
+    print $searchpitco;
     print '</td>';
     print "</tr>\n";
+    
+    print '<tr class="liste_titre">';
+    if (! empty($arrayfields['c.ref']['checked']))               print_liste_field_titre($arrayfields['c.ref']['label'], $_SERVER["PHP_SELF"], "c.ref","","$param",'',$sortfield,$sortorder);
+    if (! empty($arrayfields['c.ref_customer']['checked']))      print_liste_field_titre($arrayfields['c.ref_customer']['label'], $_SERVER["PHP_SELF"], "c.ref_customer","","$param",'',$sortfield,$sortorder);
+    if (! empty($arrayfields['c.ref_supplier']['checked']))      print_liste_field_titre($arrayfields['c.ref_supplier']['label'], $_SERVER["PHP_SELF"], "c.ref_supplier","","$param",'',$sortfield,$sortorder);
+    if (! empty($arrayfields['s.nom']['checked']))               print_liste_field_titre($arrayfields['s.nom']['label'], $_SERVER["PHP_SELF"], "s.nom","","$param",'',$sortfield,$sortorder);
+	if (! empty($arrayfields['s.town']['checked']))              print_liste_field_titre($arrayfields['s.town']['label'],$_SERVER["PHP_SELF"],'s.town','',$param,'',$sortfield,$sortorder);
+	if (! empty($arrayfields['s.zip']['checked']))               print_liste_field_titre($arrayfields['s.zip']['label'],$_SERVER["PHP_SELF"],'s.zip','',$param,'',$sortfield,$sortorder);
+	if (! empty($arrayfields['state.nom']['checked']))           print_liste_field_titre($arrayfields['state.nom']['label'],$_SERVER["PHP_SELF"],"state.nom","",$param,'',$sortfield,$sortorder);
+	if (! empty($arrayfields['country.code_iso']['checked']))    print_liste_field_titre($arrayfields['country.code_iso']['label'],$_SERVER["PHP_SELF"],"country.code_iso","",$param,'align="center"',$sortfield,$sortorder);
+	if (! empty($arrayfields['typent.code']['checked']))         print_liste_field_titre($arrayfields['typent.code']['label'],$_SERVER["PHP_SELF"],"typent.code","",$param,'align="center"',$sortfield,$sortorder);
+    if (! empty($arrayfields['sale_representative']['checked'])) print_liste_field_titre($arrayfields['sale_representative']['label'], $_SERVER["PHP_SELF"], "","","$param",'',$sortfield,$sortorder);
+    if (! empty($arrayfields['c.date_contrat']['checked']))      print_liste_field_titre($arrayfields['c.date_contrat']['label'], $_SERVER["PHP_SELF"], "c.date_contrat","","$param",'align="center"',$sortfield,$sortorder);
+	// Extra fields
+	if (is_array($extrafields->attribute_label) && count($extrafields->attribute_label))
+	{
+	   foreach($extrafields->attribute_label as $key => $val) 
+	   {
+           if (! empty($arrayfields["ef.".$key]['checked'])) 
+           {
+				$align=$extrafields->getAlignFlag($key);
+				print_liste_field_titre($extralabels[$key],$_SERVER["PHP_SELF"],"ef.".$key,"",$param,($align?'align="'.$align.'"':''),$sortfield,$sortorder);
+           }
+	   }
+	}
+	// Hook fields
+	$parameters=array('arrayfields'=>$arrayfields);
+    $reshook=$hookmanager->executeHooks('printFieldListTitle',$parameters);    // Note that $action and $object may have been modified by hook
+    print $hookmanager->resPrint;
+	if (! empty($arrayfields['c.datec']['checked']))     print_liste_field_titre($arrayfields['c.datec']['label'],$_SERVER["PHP_SELF"],"c.date_creation","",$param,'align="center" class="nowrap"',$sortfield,$sortorder);
+	if (! empty($arrayfields['c.tms']['checked']))       print_liste_field_titre($arrayfields['c.tms']['label'],$_SERVER["PHP_SELF"],"c.tms","",$param,'align="center" class="nowrap"',$sortfield,$sortorder);
+    if (! empty($arrayfields['status']['checked']))
+    {
+        print_liste_field_titre($staticcontratligne->LibStatut(0,3), '', '', '', '', 'width="16"');
+        print_liste_field_titre($staticcontratligne->LibStatut(4,3,0), '', '', '', '', 'width="16"');
+        print_liste_field_titre($staticcontratligne->LibStatut(4,3,1), '', '', '', '', 'width="16"');
+        print_liste_field_titre($staticcontratligne->LibStatut(5,3), '', '', '', '', 'width="16"');
+    }
+	print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"],"",'','','align="right"',$sortfield,$sortorder,'maxwidthsearch ');
+    print "</tr>\n";
 
-    $var=true;
     while ($i < min($num,$limit))
     {
         $obj = $db->fetch_object($resql);
@@ -563,8 +563,7 @@ if ($resql)
         $contracttmp->ref_customer=$obj->ref_customer;
         $contracttmp->ref_supplier=$obj->ref_supplier;
         
-        $var=!$var;
-        print '<tr '.$bc[$var].'>';
+        print '<tr>';
         if (! empty($arrayfields['c.ref']['checked']))
         {
             print '<td class="nowrap">';
diff --git a/htdocs/contrat/tpl/linkedobjectblock.tpl.php b/htdocs/contrat/tpl/linkedobjectblock.tpl.php
index 9ea21f890fc594a2cf5ec74dfb35b640277cb991..1257e3503a9476f5e2a48ac26e3482712d17ab1d 100644
--- a/htdocs/contrat/tpl/linkedobjectblock.tpl.php
+++ b/htdocs/contrat/tpl/linkedobjectblock.tpl.php
@@ -43,7 +43,7 @@ foreach($linkedObjectBlock as $key => $objectlink)
     <td></td>
 	<td align="center"><?php echo dol_print_date($objectlink->date_contrat,'day'); ?></td>
 	<td align="right">&nbsp;</td>
-	<td align="right"><?php echo $objectlink->getLibStatut(6); ?></td>
+	<td align="right"><?php echo $objectlink->getLibStatut(7); ?></td>
 	<td align="right"><a href="<?php echo $_SERVER["PHP_SELF"].'?id='.$object->id.'&action=dellink&dellinkid='.$key; ?>"><?php echo img_delete($langs->transnoentitiesnoconv("RemoveLink")); ?></a></td>
 </tr>
 <?php } ?>
diff --git a/htdocs/core/boxes/box_contracts.php b/htdocs/core/boxes/box_contracts.php
index cd436f3eb858b165455920d278e65d82a4c33a12..7585c5d931cf8a8249fa954205026ea3150f6ba8 100644
--- a/htdocs/core/boxes/box_contracts.php
+++ b/htdocs/core/boxes/box_contracts.php
@@ -1,7 +1,7 @@
 <?php
-/* Copyright (C) 2010 Regis Houssin        <regis.houssin@capnetworks.com>
- * Copyright (C) 2015 Frederic France      <frederic.france@free.fr>
- * Copyright (C) 2016 Laurent Destailleur  <eldy@users.sourceforge.net>
+/* Copyright (C) 2010      Regis Houssin        <regis.houssin@capnetworks.com>
+ * Copyright (C) 2015      Frederic France      <frederic.france@free.fr>
+ * Copyright (C) 2016-2017 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
@@ -125,7 +125,7 @@ class box_contracts extends ModeleBoxes
 
                     $this->info_box_contents[$line][] = array(
                         'td' => 'class="nowrap right"',
-                        'text' => $contractstatic->getLibStatut(6),
+                        'text' => $contractstatic->getLibStatut(7),
                         'asis'=>1,
                     );
 
diff --git a/htdocs/core/boxes/modules_boxes.php b/htdocs/core/boxes/modules_boxes.php
index 3ebac7e7ab05a457487559ef87fc0c1a81d6dff5..26ee34bdca0f648733b7507bbc7125d56b9f601d 100644
--- a/htdocs/core/boxes/modules_boxes.php
+++ b/htdocs/core/boxes/modules_boxes.php
@@ -325,13 +325,13 @@ class ModeleBoxes    // Can't be abtract as it is instantiated to build "empty"
                             if (! empty($contents[$i][$j]['maxlength'])) $maxlength=$contents[$i][$j]['maxlength'];
 
                             if ($maxlength) $textwithnotags=dol_trunc($textwithnotags,$maxlength);
-                            if (preg_match('/^<img/i',$text) || ! empty($contents[$i][$j]['asis'])) $out.= $text;   // show text with no html cleaning
+                            if (preg_match('/^<img/i',$text) || preg_match('/^<div/i',$text) || ! empty($contents[$i][$j]['asis'])) $out.= $text;   // show text with no html cleaning
                             else $out.= $textwithnotags;                // show text with html cleaning
 
                             // End Url
                             if (! empty($contents[$i][$j]['url'])) $out.= '</a>';
 
-                            if (preg_match('/^<img/i',$text2) || ! empty($contents[$i][$j]['asis2'])) $out.= $text2; // show text with no html cleaning
+                            if (preg_match('/^<img/i',$text2) || preg_match('/^<div/i',$text2) || ! empty($contents[$i][$j]['asis2'])) $out.= $text2; // show text with no html cleaning
                             else $out.= $text2withnotags;               // show text with html cleaning
 
                             if (! empty($textnoformat)) $out.= "\n".$textnoformat."\n";
diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php
index 4b8d9517dcf045b13882f790d76fb7a9d9cdca11..271f87ab4a0e3c530fd84cc1571de22a5106cb93 100644
--- a/htdocs/core/class/html.form.class.php
+++ b/htdocs/core/class/html.form.class.php
@@ -5804,8 +5804,8 @@ class Form
             $navurl = preg_replace('/\/tasks\/(task|contact|time|note|document).php/','/tasks.php',$navurl);
             $paramid='ref';
         }
-        $previous_ref = $object->ref_previous?'<a data-role="button" data-icon="arrow-l" data-iconpos="left" href="'.$navurl.'?'.$paramid.'='.urlencode($object->ref_previous).$moreparam.'">'.(($conf->dol_use_jmobile != 4)?'&lt;':'&nbsp;').'</a>':'<span class="inactive">'.(($conf->dol_use_jmobile != 4)?'&lt;':'&nbsp;').'</span>';
-        $next_ref     = $object->ref_next?'<a data-role="button" data-icon="arrow-r" data-iconpos="right" href="'.$navurl.'?'.$paramid.'='.urlencode($object->ref_next).$moreparam.'">'.(($conf->dol_use_jmobile != 4)?'&gt;':'&nbsp;').'</a>':'<span class="inactive">'.(($conf->dol_use_jmobile != 4)?'&gt;':'&nbsp;').'</span>';
+        $previous_ref = $object->ref_previous?'<a href="'.$navurl.'?'.$paramid.'='.urlencode($object->ref_previous).$moreparam.'"><i class="fa fa-chevron-left"></i></a>':'<span class="inactive"><i class="fa fa-chevron-left opacitymedium"></i></span>';
+        $next_ref     = $object->ref_next?'<a href="'.$navurl.'?'.$paramid.'='.urlencode($object->ref_next).$moreparam.'"><i class="fa fa-chevron-right"></i></a>':'<span class="inactive"><i class="fa fa-chevron-right opacitymedium"></i></span>';
 
         //print "xx".$previous_ref."x".$next_ref;
         $ret.='<!-- Start banner content --><div style="vertical-align: middle">';
@@ -6158,41 +6158,71 @@ class Form
         return $out;
     }
 
+    
     /**
      *	Return HTML to show the search and clear seach button
      *
-     *  @param	int  	$addcheckuncheckall        Add the check all/uncheck all checkbox (use javascript) and code to manage this
-     *  @param  string  $cssclass                  CSS class
-     *  @param  int     $calljsfunction            0=default. 1=call function initCheckForSelect() after changing status of checkboxes
      *  @return	string
      */
-    function showFilterAndCheckAddButtons($addcheckuncheckall=0, $cssclass='checkforaction', $calljsfunction=0)
+    function showFilterButtons()
     {
         global $conf, $langs;
-
+    
         $out='<div class="nowrap">';
         $out.='<input type="image" class="liste_titre" name="button_search" src="'.img_picto($langs->trans("Search"),'search.png','','',1).'" value="'.dol_escape_htmltag($langs->trans("Search")).'" title="'.dol_escape_htmltag($langs->trans("Search")).'">';
         $out.='<input type="image" class="liste_titre" name="button_removefilter" src="'.img_picto($langs->trans("Search"),'searchclear.png','','',1).'" value="'.dol_escape_htmltag($langs->trans("RemoveFilter")).'" title="'.dol_escape_htmltag($langs->trans("RemoveFilter")).'">';
         $out.='</div>';
+
+        return $out;
+    }
+
+    /**
+     *	Return HTML to show the search and clear seach button
+     *
+     *  @param  string  $cssclass                  CSS class
+     *  @param  int     $calljsfunction            0=default. 1=call function initCheckForSelect() after changing status of checkboxes
+     *  @return	string
+     */
+    function showCheckAddButtons($cssclass='checkforaction', $calljsfunction=0)
+    {
+        global $conf, $langs;
+    
+        $out='';
+        if (! empty($conf->use_javascript_ajax)) $out.='<input type="checkbox" id="checkallactions" name="checkallactions" class="checkallactions">';
+        $out.='<script type="text/javascript">
+            $(document).ready(function() {
+            	$("#checkallactions").click(function() {
+                    if($(this).is(\':checked\')){
+                        console.log("We check all");
+                		$(".'.$cssclass.'").prop(\'checked\', true);
+                    }
+                    else
+                    {
+                        console.log("We uncheck all");
+                		$(".'.$cssclass.'").prop(\'checked\', false);
+                    }'."\n";
+        if ($calljsfunction) $out.='if (typeof initCheckForSelect == \'function\') { initCheckForSelect(); } else { console.log("No function initCheckForSelect found. Call won\'t be done."); }';
+        $out.='         });
+                });
+            </script>';
+
+        return $out;
+    }
+
+    /**
+     *	Return HTML to show the search and clear seach button
+     *
+     *  @param	int  	$addcheckuncheckall        Add the check all/uncheck all checkbox (use javascript) and code to manage this
+     *  @param  string  $cssclass                  CSS class
+     *  @param  int     $calljsfunction            0=default. 1=call function initCheckForSelect() after changing status of checkboxes
+     *  @return	string
+     */
+    function showFilterAndCheckAddButtons($addcheckuncheckall=0, $cssclass='checkforaction', $calljsfunction=0)
+    {
+        $out.=$this->showFilterButtons();
         if ($addcheckuncheckall)
         {
-            if (! empty($conf->use_javascript_ajax)) $out.='<input type="checkbox" id="checkallactions" name="checkallactions" class="checkallactions">';
-            $out.='<script type="text/javascript">
-                $(document).ready(function() {
-                	$("#checkallactions").click(function() {
-                        if($(this).is(\':checked\')){
-                            console.log("We check all");
-                    		$(".'.$cssclass.'").prop(\'checked\', true);
-                        }
-                        else
-                        {
-                            console.log("We uncheck all");
-                    		$(".'.$cssclass.'").prop(\'checked\', false);
-                        }'."\n";
-            if ($calljsfunction) $out.='if (typeof initCheckForSelect == \'function\') { initCheckForSelect(); } else { console.log("No function initCheckForSelect found. Call won\'t be done."); }';
-            $out.='         });
-                    });
-                </script>';
+            $out.=$this->showCheckAddButtons($cssclass, $calljsfunction);
         }
         return $out;
     }
diff --git a/htdocs/core/lib/fichinter.lib.php b/htdocs/core/lib/fichinter.lib.php
index 964bbe14b2c04ccd502f7cfa1bce14fb53e09907..4e91c02f4f2ceaa41d5d4abe75806584dde23f94 100644
--- a/htdocs/core/lib/fichinter.lib.php
+++ b/htdocs/core/lib/fichinter.lib.php
@@ -55,14 +55,6 @@ function fichinter_prepare_head($object)
 		$h++;
 	}
 
-	if (! empty($conf->global->MAIN_USE_PREVIEW_TABS))
-	{
-		$head[$h][0] = DOL_URL_ROOT.'/fichinter/apercu.php?id='.$object->id;
-		$head[$h][1] = $langs->trans('Preview');
-		$head[$h][2] = 'preview';
-		$h++;
-	}
-
     // Show more tabs from modules
     // Entries must be declared in modules descriptor with line
     // $this->tabs = array('entity:+tabname:Title:@mymodule:/mymodule/mypage.php?id=__ID__');   to add new tab
diff --git a/htdocs/core/lib/files.lib.php b/htdocs/core/lib/files.lib.php
index 51be81a7bd5e7444d772a6ac0dc61347ebd15c6c..1cb4da034889785f45a4de67f7e51bca045c690a 100644
--- a/htdocs/core/lib/files.lib.php
+++ b/htdocs/core/lib/files.lib.php
@@ -1626,7 +1626,7 @@ function dol_check_secure_access_document($modulepart,$original_file,$entity,$fu
 		$original_file=$conf->commande->dir_output.'/'.$original_file;
 	}
 	// Wrapping pour les apercu intervention
-	elseif ($modulepart == 'apercufichinter' && !empty($conf->ficheinter->dir_output))
+	elseif (($modulepart == 'apercufichinter' || $modulepart == 'apercuficheinter') && !empty($conf->ficheinter->dir_output))
 	{
 		if ($fuser->rights->ficheinter->lire) $accessallowed=1;
 		$original_file=$conf->ficheinter->dir_output.'/'.$original_file;
diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php
index 06419ba5930a47dc08a884e4426c74011ab4f3bb..20186ebe28de9ac4829746c44f4db31823b10c5c 100644
--- a/htdocs/core/lib/functions.lib.php
+++ b/htdocs/core/lib/functions.lib.php
@@ -1014,6 +1014,7 @@ function dol_banner_tab($object, $paramid, $morehtml='', $shownav=1, $fieldid='r
 	if ($object->element == 'propal')    $modulepart='propal';
 	if ($object->element == 'commande')  $modulepart='commande';
 	if ($object->element == 'facture')   $modulepart='facture';
+	if ($object->element == 'fichinter') $modulepart='ficheinter';
 	
 	if ($object->element == 'product')
 	{
@@ -1041,7 +1042,7 @@ function dol_banner_tab($object, $paramid, $morehtml='', $shownav=1, $fieldid='r
             if ($modulepart != 'unknown')
             {
                 // Check if a preview file is available
-                if (in_array($modulepart, array('propal', 'commande', 'facture')) && class_exists("Imagick"))
+                if (in_array($modulepart, array('propal', 'commande', 'facture', 'ficheinter')) && class_exists("Imagick"))
                 {
                     $objectref = dol_sanitizeFileName($object->ref);
                     $dir_output = $conf->$modulepart->dir_output . "/";
@@ -2694,6 +2695,7 @@ function img_warning($titlealt = 'default', $morealt = '')
 
 	if ($titlealt == 'default') $titlealt = $langs->trans('Warning');
 
+	//return '<div class="imglatecoin">'.img_picto($titlealt, 'warning_white.png', 'class="pictowarning valignmiddle"'.($morealt ? ($morealt == '1' ? ' style="float: right"' : ' '.$morealt): '')).'</div>';
 	return img_picto($titlealt, 'warning.png', 'class="pictowarning valignmiddle"'.($morealt ? ($morealt == '1' ? ' style="float: right"' : ' '.$morealt): ''));
 }
 
diff --git a/htdocs/cron/card.php b/htdocs/cron/card.php
index b4d27eb8878074c2d96809b4c14d22ae1061ea41..5e2bc435e562746d00a08b67ffc0bfe6891db41c 100644
--- a/htdocs/cron/card.php
+++ b/htdocs/cron/card.php
@@ -321,6 +321,7 @@ if (($action=="create") || ($action=="edit"))
 		print '<input type="hidden" name="action" value="add">'."\n";
 	}
 
+	
 	dol_fiche_head('');
 
 	print '<table class="border" width="100%">';
@@ -535,7 +536,7 @@ if (($action=="create") || ($action=="edit"))
 	print "</tr>";
 	
 	print '</table>';
-
+    
 	dol_fiche_end();
 
 	print '<div align="center">';
@@ -554,11 +555,13 @@ else
 	 */
     $now = dol_now();
     
-	dol_fiche_head($head, 'card', $langs->trans("CronTask"), 0, 'cron');
+	dol_fiche_head($head, 'card', $langs->trans("CronTask"), -1, 'cron');
 
 	$linkback = '<a href="' . DOL_URL_ROOT . '/cron/list.php?status=-2">' . $langs->trans("BackToList") . '</a>';
 	
 	// box add_jobs_box
+	print '<div class="fichecenter">';
+	print '<div class="underbanner clearboth"></div>';
 	print '<table class="border" width="100%">';
 
 	print '<tr><td class="titlefield">';
@@ -617,10 +620,13 @@ else
 	print "</td></tr>";
 
 	print '</table>';
-
+    print '</div>';
+    
 	print '<br>';
 
 	
+	print '<div class="fichecenter">';
+	print '<div class="underbanner clearboth"></div>';
 	print '<table class="border" width="100%">';
 	
 	print '<tr><td class="titlefield">';
@@ -673,9 +679,12 @@ else
 	print "</td></tr>";
 	
 	print '</table>';
+	print '</div>';
 	
 	print '<br>';
 	
+	print '<div class="fichecenter">';
+	print '<div class="underbanner clearboth"></div>';
 	print '<table class="border" width="100%">';
 
 	print '<tr><td class="titlefield">';
@@ -699,7 +708,8 @@ else
 	print "</td></tr>";
 
 	print '</table>';
-
+    print '</div>';
+    
 	dol_fiche_end();
 
 
diff --git a/htdocs/cron/class/cronjob.class.php b/htdocs/cron/class/cronjob.class.php
index 59a3d02538630fb549626a54be17716ccc7a7185..2f9ad12a57fc03968ab475df5b027fbb60a56a09 100644
--- a/htdocs/cron/class/cronjob.class.php
+++ b/htdocs/cron/class/cronjob.class.php
@@ -55,6 +55,7 @@ class Cronjob extends CommonObject
 	var $unitfrequency;
 	var $frequency;
 	var $status;
+	var $processing;
 	var $fk_user_author;
 	var $fk_user_mod;
 	var $nbrun;
@@ -287,6 +288,7 @@ class Cronjob extends CommonObject
 		$sql.= " t.unitfrequency,";
 		$sql.= " t.frequency,";
 		$sql.= " t.status,";
+		$sql.= " t.processing,";
 		$sql.= " t.fk_user_author,";
 		$sql.= " t.fk_user_mod,";
 		$sql.= " t.note,";
@@ -330,6 +332,7 @@ class Cronjob extends CommonObject
 				$this->unitfrequency = $obj->unitfrequency;
 				$this->frequency = $obj->frequency;
 				$this->status = $obj->status;
+				$this->processing = $obj->processing;
 				$this->fk_user_author = $obj->fk_user_author;
 				$this->fk_user_mod = $obj->fk_user_mod;
 				$this->note = $obj->note;
@@ -352,15 +355,16 @@ class Cronjob extends CommonObject
     /**
      *  Load object in memory from the database
      *
-	 *  @param	string		$sortorder    sort order
-	 *  @param	string		$sortfield    sort field
-	 *  @param	int			$limit		  limit page
-	 *  @param	int			$offset    	  page
-	 *  @param	int			$status    	  display active or not
-	 *  @param	array		$filter    	  filter output
-     *  @return int          			<0 if KO, >0 if OK
+	 *  @param	string		$sortorder      sort order
+	 *  @param	string		$sortfield      sort field
+	 *  @param	int			$limit		    limit page
+	 *  @param	int			$offset    	    page
+	 *  @param	int			$status    	    display active or not
+	 *  @param	array		$filter    	    filter output
+	 *  @param  int         $processing     Processing or not 
+     *  @return int          			    <0 if KO, >0 if OK
      */
-    function fetch_all($sortorder='DESC', $sortfield='t.rowid', $limit=0, $offset=0, $status=1, $filter='')
+    function fetch_all($sortorder='DESC', $sortfield='t.rowid', $limit=0, $offset=0, $status=1, $filter='', $processing=-1)
     {
     	global $langs;
     	
@@ -391,6 +395,7 @@ class Cronjob extends CommonObject
     	$sql.= " t.unitfrequency,";
     	$sql.= " t.frequency,";
     	$sql.= " t.status,";
+    	$sql.= " t.processing,";
     	$sql.= " t.fk_user_author,";
     	$sql.= " t.fk_user_mod,";
     	$sql.= " t.note,";
@@ -399,6 +404,7 @@ class Cronjob extends CommonObject
     	$sql.= " t.test";
     	$sql.= " FROM ".MAIN_DB_PREFIX."cronjob as t";
     	$sql.= " WHERE 1 = 1";
+    	if ($processing >= 0) $sql.= " AND t.processing = ".(empty($processing)?'0':'1');
     	if ($status >= 0 && $status < 2) $sql.= " AND t.status = ".(empty($status)?'0':'1');
     	if ($status == 2) $sql.= " AND t.status = 2";
     	//Manage filter
@@ -463,6 +469,7 @@ class Cronjob extends CommonObject
 	    			$line->unitfrequency = $obj->unitfrequency;
 	    			$line->frequency = $obj->frequency;
 	    			$line->status = $obj->status;
+	    			$line->processing = $obj->processing;
 	    			$line->fk_user_author = $obj->fk_user_author;
 	    			$line->fk_user_mod = $obj->fk_user_mod;
 	    			$line->note = $obj->note;
@@ -520,9 +527,11 @@ class Cronjob extends CommonObject
 		if (isset($this->status)) $this->status=trim($this->status);
 		if (isset($this->note)) $this->note=trim($this->note);
 		if (isset($this->nbrun)) $this->nbrun=trim($this->nbrun);
-		if (empty($this->maxrun)) $this->maxrun=0;
         if (isset($this->libname)) $this->libname = trim($this->libname);
         if (isset($this->test)) $this->test = trim($this->test);
+
+		if (empty($this->maxrun)) $this->maxrun=0;
+        if (empty($this->processing)) $this->processing=0;
         
 		// Check parameters
 		// Put here code to add a control on parameters values
@@ -588,6 +597,7 @@ class Cronjob extends CommonObject
 		$sql.= " unitfrequency=".(isset($this->unitfrequency)?$this->unitfrequency:"null").",";
 		$sql.= " frequency=".(isset($this->frequency)?$this->frequency:"null").",";
 		$sql.= " status=".(isset($this->status)?$this->status:"null").",";
+		$sql.= " processing=".((isset($this->processing) && $this->processing > 0)?$this->processing:"0").",";
 		$sql.= " fk_user_mod=".$user->id.",";
 		$sql.= " note=".(isset($this->note)?"'".$this->db->escape($this->note)."'":"null").",";
 		$sql.= " nbrun=".((isset($this->nbrun) && $this->nbrun >0)?$this->nbrun:"null").",";
@@ -786,7 +796,8 @@ class Cronjob extends CommonObject
 		$this->lastresult='';
 		$this->unitfrequency='';
 		$this->frequency='';
-		$this->status='';
+		$this->status=0;
+		$this->processing=0;
 		$this->fk_user_author='';
 		$this->fk_user_mod='';
 		$this->note='';
@@ -898,6 +909,7 @@ class Cronjob extends CommonObject
 		$this->datelastresult=null;
 		$this->lastoutput='';
 		$this->lastresult='';
+		$this->processing = 1;                // To know job was started
 		$this->nbrun=$this->nbrun + 1;
 		$result = $this->update($user);       // This include begin/commit
 		if ($result<0) {
@@ -1099,6 +1111,7 @@ class Cronjob extends CommonObject
 		dol_syslog(get_class($this)."::run_jobs now we update job to track it is finished (with success or error)");
 		
 		$this->datelastresult=dol_now();
+		$this->processing=0;
 		$result = $this->update($user);       // This include begin/commit
 		if ($result < 0)
 		{
diff --git a/htdocs/cron/list.php b/htdocs/cron/list.php
index 880235a9a17a0430590570b485b4306f1c2790b9..4703641de205169fb3480898b7d3df3db8730d20 100644
--- a/htdocs/cron/list.php
+++ b/htdocs/cron/list.php
@@ -295,25 +295,9 @@ print '<br>';
 
 
 print '<div class="div-table-responsive">';
-print '<table width="100%" class="noborder">';
-print '<tr class="liste_titre">';
-print_liste_field_titre($langs->trans("ID"),$_SERVER["PHP_SELF"],"t.rowid","",$param,'',$sortfield,$sortorder);
-print_liste_field_titre($langs->trans("CronLabel"),$_SERVER["PHP_SELF"],"t.label","",$param,'',$sortfield,$sortorder);
-print_liste_field_titre($langs->trans("CronTask"),'','',"",$param,'',$sortfield,$sortorder);
-print_liste_field_titre($langs->trans("CronFrequency"),'',"","",$param,'',$sortfield,$sortorder);
-print_liste_field_titre($langs->trans("CronDtStart"),$_SERVER["PHP_SELF"],"t.datestart","",$param,'align="center"',$sortfield,$sortorder);
-print_liste_field_titre($langs->trans("CronDtEnd"),$_SERVER["PHP_SELF"],"t.dateend","",$param,'align="center"',$sortfield,$sortorder);
-print_liste_field_titre($langs->trans("CronMaxRun"),$_SERVER["PHP_SELF"],"t.maxrun","",$param,'align="right"',$sortfield,$sortorder);
-print_liste_field_titre($langs->trans("CronNbRun"),$_SERVER["PHP_SELF"],"t.nbrun","",$param,'align="right"',$sortfield,$sortorder);
-print_liste_field_titre($langs->trans("CronDtNextLaunch"),$_SERVER["PHP_SELF"],"t.datenextrun","",$param,'align="center"',$sortfield,$sortorder);
-print_liste_field_titre($langs->trans("CronDtLastLaunch"),$_SERVER["PHP_SELF"],"t.datelastrun","",$param,'align="center"',$sortfield,$sortorder);
-print_liste_field_titre($langs->trans("CronLastResult"),$_SERVER["PHP_SELF"],"t.lastresult","",$param,'align="center"',$sortfield,$sortorder);
-print_liste_field_titre($langs->trans("CronLastOutput"),$_SERVER["PHP_SELF"],"t.lastoutput","",$param,'',$sortfield,$sortorder);
-print_liste_field_titre($langs->trans("Status"),$_SERVER["PHP_SELF"],"t.status","",$param,'align="center"',$sortfield,$sortorder);
-print_liste_field_titre('');
-print "</tr>\n";
+print '<table class="noborder">';
 
-print '<tr class="liste_titre">';
+print '<tr class="liste_titre_filter">';
 print '<td class="liste_titre">&nbsp;</td>';
 print '<td class="liste_titre">';
 print '<input type="text" class="flat" name="search_label" value="'.$search_label.'" size="10">';
@@ -336,6 +320,24 @@ print '<input type="image" class="liste_titre" name="button_removefilter" src="'
 print '</td>';
 print '</tr>';
 
+print '<tr class="liste_titre">';
+print_liste_field_titre($langs->trans("ID"),$_SERVER["PHP_SELF"],"t.rowid","",$param,'',$sortfield,$sortorder);
+print_liste_field_titre($langs->trans("CronLabel"),$_SERVER["PHP_SELF"],"t.label","",$param,'',$sortfield,$sortorder);
+print_liste_field_titre($langs->trans("CronTask"),'','',"",$param,'',$sortfield,$sortorder);
+print_liste_field_titre($langs->trans("CronFrequency"),'',"","",$param,'',$sortfield,$sortorder);
+print_liste_field_titre($langs->trans("CronDtStart"),$_SERVER["PHP_SELF"],"t.datestart","",$param,'align="center"',$sortfield,$sortorder);
+print_liste_field_titre($langs->trans("CronDtEnd"),$_SERVER["PHP_SELF"],"t.dateend","",$param,'align="center"',$sortfield,$sortorder);
+print_liste_field_titre($langs->trans("CronMaxRun"),$_SERVER["PHP_SELF"],"t.maxrun","",$param,'align="right"',$sortfield,$sortorder);
+print_liste_field_titre($langs->trans("CronNbRun"),$_SERVER["PHP_SELF"],"t.nbrun","",$param,'align="right"',$sortfield,$sortorder);
+print_liste_field_titre($langs->trans("CronDtNextLaunch"),$_SERVER["PHP_SELF"],"t.datenextrun","",$param,'align="center"',$sortfield,$sortorder);
+print_liste_field_titre($langs->trans("CronDtLastLaunch"),$_SERVER["PHP_SELF"],"t.datelastrun","",$param,'align="center"',$sortfield,$sortorder);
+print_liste_field_titre($langs->trans("CronLastResult"),$_SERVER["PHP_SELF"],"t.lastresult","",$param,'align="center"',$sortfield,$sortorder);
+print_liste_field_titre($langs->trans("CronLastOutput"),$_SERVER["PHP_SELF"],"t.lastoutput","",$param,'',$sortfield,$sortorder);
+print_liste_field_titre($langs->trans("Status"),$_SERVER["PHP_SELF"],"t.status","",$param,'align="center"',$sortfield,$sortorder);
+print_liste_field_titre('');
+print "</tr>\n";
+
+
 if ($num > 0)
 {
 	// Loop on each job
diff --git a/htdocs/expensereport/class/expensereport.class.php b/htdocs/expensereport/class/expensereport.class.php
index 578ab81b339d1d14e45c90730a19e1cce4ca110e..e4754f4ab60bf2352f8f1ee5e6e6e49be5f15633 100644
--- a/htdocs/expensereport/class/expensereport.class.php
+++ b/htdocs/expensereport/class/expensereport.class.php
@@ -1913,7 +1913,7 @@ class ExpenseReport extends CommonObject
 	            $response->label=$langs->trans("ExpenseReportsToPay");
 	            $response->url=DOL_URL_ROOT.'/expensereport/list.php?mainmenu=hrm&amp;statut=5';
 	        }
-	        $response->img=img_object($langs->trans("ExpenseReports"),"trip");
+	        $response->img=img_object('',"trip");
 
             while ($obj=$this->db->fetch_object($resql))
             {
diff --git a/htdocs/fichinter/apercu.php b/htdocs/fichinter/apercu.php
deleted file mode 100644
index 899ecaf9805752dd9a1e1d220c286bd944455915..0000000000000000000000000000000000000000
--- a/htdocs/fichinter/apercu.php
+++ /dev/null
@@ -1,197 +0,0 @@
-<?php
-/* Copyright (C) 2002-2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
- * Copyright (C) 2004-2014 Laurent Destailleur  <eldy@users.sourceforge.net>
- * Copyright (C) 2005-2011 Regis Houssin        <regis.houssin@capnetworks.com>
- * Copyright (C) 2011-2012 Juanjo Menent        <jmenent@2byte.es>
- *
- * 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
- * the Free Software Foundation; either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-/**
- * 		\file		htdocs/fichinter/apercu.php
- * 		\ingroup	fichinter
- * 		\brief		Page de l'onglet apercu d'une fiche d'intervention
- */
-
-require '../main.inc.php';
-require_once DOL_DOCUMENT_ROOT.'/core/lib/fichinter.lib.php';
-require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
-require_once DOL_DOCUMENT_ROOT.'/fichinter/class/fichinter.class.php';
-if (! empty($conf->projet->enabled))	require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php';
-
-$langs->load('interventions');
-
-
-// Security check
-$socid=0;
-$id = GETPOST('id','int');
-$ref = GETPOST('ref','alpha');
-if ($user->societe_id) $socid=$user->societe_id;
-$result = restrictedArea($user, 'ficheinter', $id, 'fichinter');
-
-
-/*
- * View
- */
-
-llxHeader();
-
-$form = new Form($db);
-
-/* *************************************************************************** */
-/*                                                                             */
-/* Mode fiche                                                                  */
-/*                                                                             */
-/* *************************************************************************** */
-
-if ($id > 0 || ! empty($ref))
-{
-	$object = new Fichinter($db);
-
-	if ($object->fetch($id,$ref) > 0)
-	{
-		$soc = new Societe($db);
-		$soc->fetch($object->socid);
-
-		$head = fichinter_prepare_head($object);
-		dol_fiche_head($head, 'preview', $langs->trans("InterventionCard"), 0, 'intervention');
-
-		/*
-		 *   Fiche intervention
-		 */
-		print '<table class="border" width="100%">';
-
-    	$linkback = '<a href="'.DOL_URL_ROOT.'/fichinter/list.php'.(! empty($socid)?'?socid='.$socid:'').'">'.$langs->trans("BackToList").'</a>';
-    
-    	// Ref
-    	print '<tr><td width="25%">'.$langs->trans("Ref").'</td><td colspan="3">';
-    	print $form->showrefnav($object, 'ref', $linkback, 1, 'ref', 'ref');
-    	print '</td></tr>';
-
-		$nbrow=3;
-		// Client
-		print "<tr><td>".$langs->trans("Customer")."</td>";
-		print '<td>';
-		print '<a href="'.DOL_URL_ROOT.'/comm/card.php?socid='.$soc->id.'">'.$soc->name.'</a>';
-		print '</td>';
-		print '<td rowspan="'.$nbrow.'" valign="top" width="50%">';
-		
-		/*
-		 * Documents
-		 */
-		$objectref = dol_sanitizeFileName($object->ref);
-		$dir_output = $conf->ficheinter->dir_output . "/";
-		$filepath = $dir_output . $objectref . "/";
-		$file = $filepath . $objectref . ".pdf";
-		$filedetail = $filepath . $objectref . "-detail.pdf";
-		$relativepath = "${objectref}/${objectref}.pdf";
-		$relativepathdetail = "${objectref}/${objectref}-detail.pdf";
-
-        // Define path to preview pdf file (preview precompiled "file.ext" are "file.ext_preview.png")
-        $fileimage = $file.'_preview.png';          	// If PDF has 1 page
-        $fileimagebis = $file.'_preview-0.pdf.png';     // If PDF has more than one page
-        $relativepathimage = $relativepath.'_preview.png';
-
-		$var=true;
-
-		// Si fichier PDF existe
-		if (file_exists($file))
-		{
-			$encfile = urlencode($file);
-			print load_fiche_titre($langs->trans("Documents"));
-			print '<table class="border" width="100%">';
-
-			print "<tr ".$bc[$var]."><td>".$langs->trans("Intervention")." PDF</td>";
-
-			print '<td><a data-ajax="false" href="'.DOL_URL_ROOT . '/document.php?modulepart=ficheinter&file='.urlencode($relativepath).'">'.$object->ref.'.pdf</a></td>';
-			print '<td align="right">'.dol_print_size(dol_filesize($file)).'</td>';
-			print '<td align="right">'.dol_print_date(dol_filemtime($file),'dayhour').'</td>';
-			print '</tr>';
-
-			// Si fichier detail PDF existe
-			if (file_exists($filedetail))
-			{
-				print "<tr ".$bc[$var]."><td>Fiche d'intervention detaillee</td>";
-
-				print '<td><a data-ajax="false" href="'.DOL_URL_ROOT . '/document.php?modulepart=ficheinter&file='.urlencode($relativepathdetail).'">'.$object->ref.'-detail.pdf</a></td>';
-				print '<td align="right">'.dol_print_size(dol_filesize($filedetail)).'</td>';
-				print '<td align="right">'.dol_print_date(dol_filemtime($filedetail),'dayhour').'</td>';
-				print '</tr>';
-			}
-			print "</table>\n";
-
-			// Conversion du PDF en image png si fichier png non existant
-			if ((! file_exists($fileimage) && ! file_exists($fileimagebis)) || (filemtime($fileimage) < filemtime($file)))
-			{
-				if (class_exists("Imagick"))
-				{
-					$ret = dol_convert_file($file,'png',$fileimage);
-					if ($ret < 0) $error++;
-				}
-				else
-				{
-					$langs->load("errors");
-					print '<font class="error">'.$langs->trans("ErrorNoImagickReadimage").'</font>';
-				}
-			}
-		}
-
-		print "</td></tr>";
-
-		// Statut
-		print '<tr><td>'.$langs->trans("Status").'</td>';
-		print "<td>".$object->getLibStatut(4)."</td>\n";
-		print '</tr>';
-
-		// Date
-		print '<tr><td>'.$langs->trans("Date").'</td>';
-		print "<td>".dol_print_date($object->datec,"daytext")."</td>\n";
-		print '</tr>';
-
-		print '</table>';
-
-		dol_fiche_end();
-	}
-	else
-	{
-		// Object not found
-		print $langs->trans("ErrorFichinterNotFound",$id);
-	}
-}
-
-// Si fichier png PDF d'1 page trouve
-if (file_exists($fileimage))
-{
-	print '<img style="background: #FFF" src="'.DOL_URL_ROOT . '/viewimage.php?modulepart=apercufichinter&file='.urlencode($relativepathimage).'">';
-}
-// Si fichier png PDF de plus d'1 page trouve
-elseif (file_exists($fileimagebis))
-{
-	$multiple = $relativepath . "-";
-
-	for ($i = 0; $i < 20; $i++)
-	{
-		$preview = $multiple.$i.'.png';
-
-		if (file_exists($dir_output.$preview))
-		{
-			print '<img style="background: #FFF" src="'.DOL_URL_ROOT . '/viewimage.php?modulepart=apercufichinter&file='.urlencode($preview).'"><p>';
-		}
-	}
-}
-
-
-llxFooter();
-
-$db->close();
diff --git a/htdocs/fichinter/card.php b/htdocs/fichinter/card.php
index 31f72e18075b96104071731b35c93c6aedfb3029..cd10e704d90774f4354a5c1161a04b0120208a43 100644
--- a/htdocs/fichinter/card.php
+++ b/htdocs/fichinter/card.php
@@ -1079,7 +1079,7 @@ else if ($id > 0 || ! empty($ref))
 
 	$head = fichinter_prepare_head($object);
 
-	dol_fiche_head($head, 'card', $langs->trans("InterventionCard"), 0, 'intervention');
+	dol_fiche_head($head, 'card', $langs->trans("InterventionCard"), -1, 'intervention');
 
 	$formconfirm='';
 
diff --git a/htdocs/fichinter/contact.php b/htdocs/fichinter/contact.php
index 83825b08a907dae6da784a95a14429de2166d423..2b40553a3d9efac71f3b149b96e728ef366867bc 100644
--- a/htdocs/fichinter/contact.php
+++ b/htdocs/fichinter/contact.php
@@ -122,7 +122,7 @@ if ($id > 0 || ! empty($ref))
 	$object->fetch_thirdparty();
 
 	$head = fichinter_prepare_head($object);
-	dol_fiche_head($head, 'contact', $langs->trans("InterventionCard"), 0, 'intervention');
+	dol_fiche_head($head, 'contact', $langs->trans("InterventionCard"), -1, 'intervention');
 
 
 	// Intervention card
diff --git a/htdocs/fichinter/document.php b/htdocs/fichinter/document.php
index 2e53d6ebc629b377870f0df062ec084427d64162..f24283e8aa17297a7a608c249a160191476a215e 100644
--- a/htdocs/fichinter/document.php
+++ b/htdocs/fichinter/document.php
@@ -89,7 +89,7 @@ if ($object->id)
 
 	$head=fichinter_prepare_head($object);
 
-	dol_fiche_head($head, 'documents',  $langs->trans("InterventionCard"), 0, 'intervention');
+	dol_fiche_head($head, 'documents',  $langs->trans("InterventionCard"), -1, 'intervention');
 
 
 	// Construit liste des fichiers
diff --git a/htdocs/fichinter/info.php b/htdocs/fichinter/info.php
index de2317eeccab3345b2fd68e050b5c8456fb7f6c6..8753364489329d1ce30f288599ba02349cd8ec81 100644
--- a/htdocs/fichinter/info.php
+++ b/htdocs/fichinter/info.php
@@ -58,7 +58,7 @@ $object->fetch_thirdparty();
 $object->info($object->id);
 
 $head = fichinter_prepare_head($object);
-dol_fiche_head($head, 'info', $langs->trans('InterventionCard'), 0, 'intervention');
+dol_fiche_head($head, 'info', $langs->trans('InterventionCard'), -1, 'intervention');
 
 // Intervention card
 $linkback = '<a href="'.DOL_URL_ROOT.'/fichinter/list.php'.(! empty($socid)?'?socid='.$socid:'').'">'.$langs->trans("BackToList").'</a>';
diff --git a/htdocs/fichinter/note.php b/htdocs/fichinter/note.php
index 1da0b0c425ccb8a6d5f7031cbff336898b953016..43a2654d1fda4b9966f3398d6cfbae61f9574271 100644
--- a/htdocs/fichinter/note.php
+++ b/htdocs/fichinter/note.php
@@ -63,7 +63,7 @@ if ($id > 0 || ! empty($ref))
 	$object->fetch_thirdparty();
 	
 	$head = fichinter_prepare_head($object);
-	dol_fiche_head($head, 'note', $langs->trans('InterventionCard'), 0, 'intervention');
+	dol_fiche_head($head, 'note', $langs->trans('InterventionCard'), -1, 'intervention');
 
 	// Intervention card
 	$linkback = '<a href="'.DOL_URL_ROOT.'/fichinter/list.php'.(! empty($socid)?'?socid='.$socid:'').'">'.$langs->trans("BackToList").'</a>';
diff --git a/htdocs/fourn/class/fournisseur.commande.class.php b/htdocs/fourn/class/fournisseur.commande.class.php
index a4deab90768118d220a376ef0bfddefe90d71b32..1da9854791bb9eaccc34931316bffe073ff83820 100644
--- a/htdocs/fourn/class/fournisseur.commande.class.php
+++ b/htdocs/fourn/class/fournisseur.commande.class.php
@@ -2624,7 +2624,7 @@ class CommandeFournisseur extends CommonOrder
 	        $response->warning_delay=$conf->commande->fournisseur->warning_delay/60/60/24;
 	        $response->label=$langs->trans("SuppliersOrdersToProcess");
 	        $response->url=DOL_URL_ROOT.'/fourn/commande/list.php?statut=1,2,3&mainmenu=commercial&leftmenu=orders_suppliers';
-	        $response->img=img_object($langs->trans("Orders"),"order");
+	        $response->img=img_object('',"order");
 
             while ($obj=$this->db->fetch_object($resql))
             {
diff --git a/htdocs/fourn/class/fournisseur.facture.class.php b/htdocs/fourn/class/fournisseur.facture.class.php
index 009f765e5cddce66a0bd2a597de843ed03f19a99..5f435da9daf88677eb84253b63775ff2b66eea72 100644
--- a/htdocs/fourn/class/fournisseur.facture.class.php
+++ b/htdocs/fourn/class/fournisseur.facture.class.php
@@ -1787,7 +1787,7 @@ class FactureFournisseur extends CommonInvoice
 	        $response->warning_delay=$conf->facture->fournisseur->warning_delay/60/60/24;
 	        $response->label=$langs->trans("SupplierBillsToPay");
 	        $response->url=DOL_URL_ROOT.'/fourn/facture/list.php?filtre=fac.fk_statut:1,paye:0&mainmenu=accountancy&leftmenu=suppliers_bills';
-	        $response->img=img_object($langs->trans("Bills"),"bill");
+	        $response->img=img_object('',"bill");
 
             $facturestatic = new FactureFournisseur($this->db);
 
diff --git a/htdocs/index.php b/htdocs/index.php
index 943914ebd1552321074975a078954ae516496dd1..e0609c91274dd33169fda04aedc87d749ec3fb04 100644
--- a/htdocs/index.php
+++ b/htdocs/index.php
@@ -561,13 +561,14 @@ if (! empty($valid_dashboardlines))
         
         $boxwork .='<div class="boxstatsindicator thumbstat150 nobold nounderline"><div class="boxstats130 boxstatsborder">';
         $boxwork .= '<div class="boxstatscontent">';
-        $boxwork .= '<span class="boxstatstext">'.$board->img.' '.$board->label.'</span><br>';
+        $boxwork .= '<span class="boxstatstext" title="'.dol_escape_htmltag($board->label).'">'.$board->img.' '.$board->label.'</span><br>';
         $boxwork .= '<a class="valignmiddle dashboardlineindicator" href="'.$board->url.'"><span class="dashboardlineindicator'.(($board->nbtodo == 0)?' dashboardlineok':'').'">'.$board->nbtodo.'</span></a>';
         $boxwork .= '</div>';
         if ($board->nbtodolate > 0)
         {
             $boxwork .= '<div class="dashboardlinelatecoin nowrap">';
             $boxwork .= '<a title="'.dol_escape_htmltag($textlate).'" class="valignmiddle dashboardlineindicatorlate'.($board->nbtodolate>0?' dashboardlineko':' dashboardlineok').'" href="'.((!$board->url_late) ? $board->url : $board->url_late ).'">';
+            //$boxwork .= img_picto($textlate, "warning_white", 'class="valigntextbottom"').'';
             $boxwork .= img_picto($textlate, "warning_white", 'class="valigntextbottom"').'';
             $boxwork .= '<span class="dashboardlineindicatorlate'.($board->nbtodolate>0?' dashboardlineko':' dashboardlineok').'">';
             $boxwork .= $board->nbtodolate;
@@ -600,8 +601,6 @@ $boxwork.='</td></tr>';
 $boxwork.='</table>';   // End table array of working board
 $boxwork.='</div>';
 
-//print $boxwork;
-
 print '</div></div></div><div class="clearboth"></div>';
 
 print '<div class="fichecenter fichecenterbis">';
diff --git a/htdocs/install/mysql/migration/5.0.0-6.0.0.sql b/htdocs/install/mysql/migration/5.0.0-6.0.0.sql
index 25145dc7cfe3608267a427a133c780a7e176474f..6e098e4f59d0751e863957693bb566867b83e248 100644
--- a/htdocs/install/mysql/migration/5.0.0-6.0.0.sql
+++ b/htdocs/install/mysql/migration/5.0.0-6.0.0.sql
@@ -125,6 +125,9 @@ INSERT INTO llx_const (name, entity, value, type, visible, note) VALUES ('USER_A
 ALTER TABLE llx_chargesociales ADD COLUMN ref varchar(16);
 ALTER TABLE llx_chargesociales ADD COLUMN fk_projet integer DEFAULT NULL;
 
+ALTER TABLE llx_cronjob ADD COLUMN processing integer NOT NULL DEFAULT 0;
+
+
 create table llx_payment_various
 (
   rowid                 integer AUTO_INCREMENT PRIMARY KEY,
@@ -144,3 +147,6 @@ create table llx_payment_various
   fk_user_author        integer,
   fk_user_modif         integer
 )ENGINE=innodb;
+
+
+
diff --git a/htdocs/install/mysql/tables/llx_cronjob.sql b/htdocs/install/mysql/tables/llx_cronjob.sql
index f9d2ac1ab7abd30486b66f18e6f031a2f347d907..96458de842049bd409ad5e9e5c3242dfbb56dac2 100644
--- a/htdocs/install/mysql/tables/llx_cronjob.sql
+++ b/htdocs/install/mysql/tables/llx_cronjob.sql
@@ -46,6 +46,7 @@ CREATE TABLE llx_cronjob
 	nbrun			integer,						-- nb of run complete (failed or not)
     autodelete      integer DEFAULT 0,				-- 0=Job is kept unchanged once nbrun > maxrun or date > dateend, 2=Job must be archived (archive = status 2) once nbrun > maxrun or date > dateend 
   	status 			integer NOT NULL DEFAULT 1,		-- 0=disabled, 1=enabled, 2=archived
+  	processing 		integer NOT NULL DEFAULT 0,		-- 1=process currently running
   	test		    varchar(255) DEFAULT '1',
   	fk_user_author 	integer DEFAULT NULL,
   	fk_user_mod 	integer DEFAULT NULL,
diff --git a/htdocs/main.inc.php b/htdocs/main.inc.php
index 7d5e5dfa64cf288456728017b2b5742b4d3d0302..8d1138e57589a5f2947136546e73e2ff846b4ff2 100644
--- a/htdocs/main.inc.php
+++ b/htdocs/main.inc.php
@@ -848,9 +848,9 @@ if (! defined('NOREQUIRETRAN'))
 
 // Define some constants used for style of arrays
 $bc=array(0=>'class="impair"',1=>'class="pair"');
-$bcdd=array(0=>'class="impair drag drop"',1=>'class="pair drag drop"');
-$bcnd=array(0=>'class="impair nodrag nodrop nohover"',1=>'class="pair nodrag nodrop nohoverpair"');		// Used for tr to add new lines
-$bctag=array(0=>'class="impair tagtr"',1=>'class="pair tagtr"');
+$bcdd=array(0=>'class="drag drop"',1=>'class="drag drop"');
+$bcnd=array(0=>'class="nodrag nodrop nohover"',1=>'class="nodrag nodrop nohoverpair"');		// Used for tr to add new lines
+$bctag=array(0=>'class="tagtr"',1=>'class="pair tagtr"');
 
 // Define messages variables
 $mesg=''; $warning=''; $error=0;
diff --git a/htdocs/projet/class/project.class.php b/htdocs/projet/class/project.class.php
index eeb10281c3a33cb0a9baa862c248ae6446f9349d..7748534c970205015ce27328d7cb924800461c90 100644
--- a/htdocs/projet/class/project.class.php
+++ b/htdocs/projet/class/project.class.php
@@ -1694,7 +1694,7 @@ class Project extends CommonObject
             $response->label = $langs->trans("OpenedProjects");
             if ($user->rights->projet->all->lire) $response->url = DOL_URL_ROOT.'/projet/list.php?search_status=1&mainmenu=project';
             else $response->url = DOL_URL_ROOT.'/projet/list.php?search_project_user=-1&search_status=1&mainmenu=project';
-            $response->img = img_object($langs->trans("Projects"),"projectpub");
+            $response->img = img_object('',"projectpub");
 
             // This assignment in condition is not a bug. It allows walking the results.
             while ($obj=$this->db->fetch_object($resql))
diff --git a/htdocs/projet/class/task.class.php b/htdocs/projet/class/task.class.php
index 905098d202a8bf0ae0adfd7caf5786a654c5e690..7c986e4d9a23dc3616c5e5202cb0ac3ee045c030 100644
--- a/htdocs/projet/class/task.class.php
+++ b/htdocs/projet/class/task.class.php
@@ -1713,7 +1713,7 @@ class Task extends CommonObject
 	        $response->label = $langs->trans("OpenedTasks");
 	        if ($user->rights->projet->all->lire) $response->url = DOL_URL_ROOT.'/projet/tasks/list.php?mainmenu=project';
 	        else $response->url = DOL_URL_ROOT.'/projet/tasks/list.php?mode=mine&amp;mainmenu=project';
-	        $response->img = img_object($langs->trans("Tasks"),"task");
+	        $response->img = img_object('',"task");
 	
 	        // This assignment in condition is not a bug. It allows walking the results.
 	        while ($obj=$this->db->fetch_object($resql))
diff --git a/htdocs/public/cron/cron_run_jobs.php b/htdocs/public/cron/cron_run_jobs.php
index fc8e15aeed68365b39db1064368a9668b3d88782..a7d3d4b3fcd0b0fad93466aa3cb766ad4430f945 100644
--- a/htdocs/public/cron/cron_run_jobs.php
+++ b/htdocs/public/cron/cron_run_jobs.php
@@ -111,7 +111,7 @@ if (! empty($id))
 	$filter['t.rowid']=$id;
 }
 
-$result = $object->fetch_all('DESC','t.rowid', 0, 0, 1, $filter);
+$result = $object->fetch_all('DESC','t.rowid', 0, 0, 1, $filter, 0);
 if ($result<0)
 {
 	echo "Error: ".$cronjob->error;
diff --git a/htdocs/resource/element_resource.php b/htdocs/resource/element_resource.php
index a09e9d3db39e42413ac82cdba174f88a614f6aea..fbb75e021ff0f86d45359811891345964afe2e9d 100644
--- a/htdocs/resource/element_resource.php
+++ b/htdocs/resource/element_resource.php
@@ -197,7 +197,7 @@ else
 
 			$head=actions_prepare_head($act);
 
-			dol_fiche_head($head, 'resources', $langs->trans("Action"),0,'action');
+			dol_fiche_head($head, 'resources', $langs->trans("Action"), -1, 'action');
 
 			$linkback =img_picto($langs->trans("BackToList"),'object_list','class="hideonsmartphone pictoactionview"');
 			$linkback.= '<a href="'.DOL_URL_ROOT.'/comm/action/listactions.php">'.$langs->trans("BackToList").'</a>';
@@ -327,7 +327,7 @@ else
 			require_once DOL_DOCUMENT_ROOT . '/core/lib/company.lib.php';
 			$head = societe_prepare_head($socstatic);
 
-			dol_fiche_head($head, 'resources', $langs->trans("ThirdParty"), 0, 'company');
+			dol_fiche_head($head, 'resources', $langs->trans("ThirdParty"), -1, 'company');
 
 			dol_banner_tab($socstatic, 'socid', '', ($user->societe_id ? 0 : 1), 'rowid', 'nom', '', '&element='.$element);
 
@@ -363,7 +363,7 @@ else
 		if (is_object($fichinter)) 
 		{
 			$head=fichinter_prepare_head($fichinter);
-			dol_fiche_head($head, 'resource', $langs->trans("InterventionCard"),0,'intervention');
+			dol_fiche_head($head, 'resource', $langs->trans("InterventionCard"), -1, 'intervention');
 
 			// Intervention card
 			$linkback = '<a href="'.DOL_URL_ROOT.'/fichinter/list.php'.(! empty($socid)?'?socid='.$socid:'').'">'.$langs->trans("BackToList").'</a>';
diff --git a/htdocs/societe/class/companybankaccount.class.php b/htdocs/societe/class/companybankaccount.class.php
index ec770d628a0b243ed330875b57d695340710aa70..72f237999f81eb23981db46a4511be1227adc488 100644
--- a/htdocs/societe/class/companybankaccount.class.php
+++ b/htdocs/societe/class/companybankaccount.class.php
@@ -235,24 +235,49 @@ class CompanyBankAccount extends Account
     /**
      *  Delete a rib from database
      *
-     *	@param	User	$user	User deleting
-     *  @return int         	<0 if KO, >0 if OK
+     *	@param		User	$user		User deleting
+     *	@param  	int		$notrigger	1=Disable triggers
+     *  @return		int		            <0 if KO, >0 if OK
      */
-    function delete(User $user = null)
+    function delete(User $user = null, $notrigger=0)
     {
         global $conf;
+        
+        $error = 0;
+        
+        dol_syslog(get_class($this) . "::delete ".$this->id, LOG_DEBUG);
+        
+        $this->db->begin();
+        
+        if (! $error && ! $notrigger)
+        {
+            // Call trigger
+            $result=$this->call_trigger('COMAPNY_RIB_DELETE',$user);
+            if ($result < 0) $error++;
+            // End call triggers
+        }
 
-        $sql = "DELETE FROM ".MAIN_DB_PREFIX."societe_rib";
-        $sql.= " WHERE rowid  = ".$this->id;
-
-        dol_syslog(get_class($this)."::delete", LOG_DEBUG);
-        $result = $this->db->query($sql);
-        if ($result) {
+        if (! $error)
+        {
+            $sql = "DELETE FROM " . MAIN_DB_PREFIX . "societe_rib";
+            $sql .= " WHERE rowid  = " . $this->id;
+            
+            if (! $this->db->query($sql))
+        	{
+        		$error++;
+        		$this->errors[]=$this->db->lasterror();
+        	}
+        }
+        
+        if (! $error)
+        {
+            $this->db->commit();
             return 1;
         }
-        else {
-            dol_print_error($this->db);
-            return -1;
+        else
+        {
+            $this->db->rollback();
+            return -1*$error;
         }
     }
 
diff --git a/htdocs/supplier_proposal/class/supplier_proposal.class.php b/htdocs/supplier_proposal/class/supplier_proposal.class.php
index 0ec7710ee704a5e56278dfb5226c5ba109aa24db..65efb97f824c0df9d14ece861689f84bf4ac1d53 100644
--- a/htdocs/supplier_proposal/class/supplier_proposal.class.php
+++ b/htdocs/supplier_proposal/class/supplier_proposal.class.php
@@ -2143,7 +2143,7 @@ class SupplierProposal extends CommonObject
 	        $response->warning_delay = $delay_warning/60/60/24;
 	        $response->label = $label;
 	        $response->url = DOL_URL_ROOT.'/supplier_proposal/list.php?viewstatut='.$statut;
-	        $response->img = img_object($langs->trans("SupplierProposals"),"propal");
+	        $response->img = img_object('',"propal");
             
             // This assignment in condition is not a bug. It allows walking the results.
             while ($obj=$this->db->fetch_object($resql))
diff --git a/htdocs/theme/eldy/graph-color.php b/htdocs/theme/eldy/graph-color.php
index 4346d00715807cd04805421f56ff9227caa97742..429899077475774f335cb21533bdda569f7d38ab 100644
--- a/htdocs/theme/eldy/graph-color.php
+++ b/htdocs/theme/eldy/graph-color.php
@@ -28,7 +28,7 @@
 
 global $theme_bordercolor, $theme_datacolor, $theme_bgcolor, $theme_bgcoloronglet;
 $theme_bordercolor = array(235,235,224);
-$theme_datacolor = array(array(140,140,220), array(190,120,120), array(0,160,140), array(190,190,100), array(115,125,150), array(100,170,20), array(250,190,30), array(150,135,125), array(85,135,150), array(150,135,80), array(150,80,150));
+$theme_datacolor = array(array(120,140,220), array(190,120,120), array(0,160,140), array(190,190,100), array(115,125,150), array(100,170,20), array(250,190,30), array(150,135,125), array(85,135,150), array(150,135,80), array(150,80,150));
 $theme_bgcolor = array(hexdec('F4'),hexdec('F4'),hexdec('F4'));
 $theme_bgcoloronglet = array(hexdec('DE'),hexdec('E7'),hexdec('EC'));
 
diff --git a/htdocs/theme/eldy/style.css.php b/htdocs/theme/eldy/style.css.php
index babc2a190e28226f051b4a93907bfc838f621edf..8d3ea40cb1484c5b750e2787744251a5feb27c3a 100644
--- a/htdocs/theme/eldy/style.css.php
+++ b/htdocs/theme/eldy/style.css.php
@@ -585,7 +585,7 @@ div.myavailability {
 	padding-bottom: 4px;
 }
 .checkallactions {
-	vertical-align: top;
+	vertical-align: text-bottom;
     margin-top: 6px;
     margin-left: 4px;
 }
@@ -2463,7 +2463,7 @@ div.refidpadding  {
 }
 div.refid  {
 	font-weight: bold;
-  	color: #866;
+  	color: #868;
   	font-size: 160%;
 }
 div.refidno  {
@@ -2506,7 +2506,6 @@ div.pagination li {
 div.pagination li.pagination a,
 div.pagination li.pagination span {
   padding: 6px 12px;
-  margin-left: -1px;
   line-height: 1.42857143;
   color: #000;
   text-decoration: none;
@@ -2917,6 +2916,7 @@ span.boxstatstext {
 span.boxstatsindicator {
 	font-size: 130%;
 	font-weight: normal;
+	line-height: 29px;
 }
 span.dashboardlineindicator, span.dashboardlineindicatorlate {
 	font-size: 130%;
@@ -2930,17 +2930,32 @@ span.dashboardlineok {
 }
 span.dashboardlineko {
 	color: #FFF;
-	font-size: 80%;	
+	/*color: #8c4446 ! important;
+	padding-left: 1px;*/
+	
+	font-size: 80%;
 }
 .dashboardlinelatecoin {
 	float: right;
 	position: relative;
     text-align: right;
-    top: -28px;
-    padding: 1px 6px 1px 6px;
+    top: -24px;
+    padding: 1px 2px 1px 2px;
+    border-radius: .25em;    
+
+    background-color: #af4705;
+    padding: 0px 5px 0px 5px;
+    top: -26px;
+}
+.imglatecoin {
+    padding: 1px 3px 1px 1px;
+    margin-left: 4px;
+    margin-right: 2px;
     background-color: #8c4446;
     color: #FFFFFF ! important;
     border-radius: .25em;    
+	display: inline-block;
+	vertical-align: middle;
 }
 .boxtable {
     margin-bottom: 8px !important;
diff --git a/htdocs/theme/md/style.css.php b/htdocs/theme/md/style.css.php
index 4c1d32c31ad4b1de745f5dd25807dfd5d5683846..d80630f0501dca94d7108feb324946b7b466ded8 100644
--- a/htdocs/theme/md/style.css.php
+++ b/htdocs/theme/md/style.css.php
@@ -587,7 +587,7 @@ div.myavailability {
 	padding-bottom: 4px;
 }
 .checkallactions {
-	vertical-align: top;
+	vertical-align: text-bottom;
     margin-top: 6px;
     margin-left: 4px;
 }
@@ -2413,7 +2413,6 @@ div.pagination li {
 div.pagination li.pagination a,
 div.pagination li.pagination span {
   padding: 6px 12px;
-  margin-left: -1px;
   line-height: 1.42857143;
   color: #000;
   text-decoration: none;
diff --git a/scripts/cron/cron_run_jobs.php b/scripts/cron/cron_run_jobs.php
index d60218fba22176bd2ee15f918dbed861e17db2e2..4360e74cae59c7f7204ddb1f9104ae586604fe86 100755
--- a/scripts/cron/cron_run_jobs.php
+++ b/scripts/cron/cron_run_jobs.php
@@ -128,7 +128,7 @@ if (! empty($id)) {
 	$filter['t.rowid']=$id;
 }
 
-$result = $object->fetch_all('DESC','t.rowid', 0, 0, 1, $filter);
+$result = $object->fetch_all('DESC','t.rowid', 0, 0, 1, $filter, 0);
 if ($result<0)
 {
 	echo "Error: ".$object->error;
@@ -136,7 +136,7 @@ if ($result<0)
 	exit(-1);
 }
 
-// TODO This sequence of code must be shared with code into cron_run_jobs.php php page.
+// TODO This sequence of code must be shared with code into public/cron/cron_run_jobs.php php page.
 
 // current date
 $now=dol_now();