diff --git a/htdocs/accountancy/admin/categories_list.php b/htdocs/accountancy/admin/categories_list.php
index 7b1eb44545abf76adc470db6e7b5dbc1001c1a65..86be6aa52abd2fe44a84723b696915c1e31f1406 100644
--- a/htdocs/accountancy/admin/categories_list.php
+++ b/htdocs/accountancy/admin/categories_list.php
@@ -661,8 +661,8 @@ if ($id)
         print '<td class="liste_titre" align="center">';
     	if ($filterfound)
     	{
-        	$searchpitco=$form->showFilterAndCheckAddButtons(0);
-        	print $searchpitco;
+        	$searchpicto=$form->showFilterAndCheckAddButtons(0);
+        	print $searchpicto;
     	}
     	print '</td>';
     	print '</tr>';
diff --git a/htdocs/accountancy/admin/journals_list.php b/htdocs/accountancy/admin/journals_list.php
index 0b13bfc7d4d2fbdc9d176a6d45134060aa74b981..facb507c530e8b64f2dcad708df7d437d8479050 100644
--- a/htdocs/accountancy/admin/journals_list.php
+++ b/htdocs/accountancy/admin/journals_list.php
@@ -577,8 +577,8 @@ if ($id)
         print '<td class="liste_titre" align="center">';
     	if ($filterfound)
     	{
-        	$searchpitco=$form->showFilterAndCheckAddButtons(0);
-        	print $searchpitco;
+        	$searchpicto=$form->showFilterAndCheckAddButtons(0);
+        	print $searchpicto;
     	}
     	print '</td>';
     	print '</tr>';
diff --git a/htdocs/accountancy/admin/productaccount.php b/htdocs/accountancy/admin/productaccount.php
index dda7d5450437e0f548d420529c1fab4682549d20..4f82db33e9478d04fc0efa7352d71835380d9060 100644
--- a/htdocs/accountancy/admin/productaccount.php
+++ b/htdocs/accountancy/admin/productaccount.php
@@ -329,8 +329,8 @@ if ($result)
 	print '</td>';
 	print '<td class="liste_titre">&nbsp;</td>';
 	print '<td align="center" class="liste_titre">';
-	$searchpitco=$form->showFilterButtons();
-	print $searchpitco;
+	$searchpicto=$form->showFilterButtons();
+	print $searchpicto;
 	print '</td>';
 	print '</tr>';
 	
diff --git a/htdocs/accountancy/bookkeeping/balance.php b/htdocs/accountancy/bookkeeping/balance.php
index 5f4801da32caa32299f0cb4b6a97017fa842034f..9e5be25eb73f4397cf4d2b0479c6573daff7403a 100644
--- a/htdocs/accountancy/bookkeeping/balance.php
+++ b/htdocs/accountancy/bookkeeping/balance.php
@@ -192,8 +192,8 @@ else {
     print $formventilation->select_account($search_accountancy_code_end, 'search_accountancy_code_end', 1, array(), 1, 1, '');
     print '</td>';
     print '<td align="right" class="liste_titre">';
-	$searchpitco=$form->showFilterAndCheckAddButtons(0);
-	print $searchpitco;
+	$searchpicto=$form->showFilterAndCheckAddButtons(0);
+	print $searchpicto;
     print '</td>';
     
     print '</tr>';
diff --git a/htdocs/accountancy/bookkeeping/listbyaccount.php b/htdocs/accountancy/bookkeeping/listbyaccount.php
index 2323f3afcb88ae288edce400103f1f3a6732760e..eb8a53561d2bfda0c23893a8e0f895c18d2f2b82 100644
--- a/htdocs/accountancy/bookkeeping/listbyaccount.php
+++ b/htdocs/accountancy/bookkeeping/listbyaccount.php
@@ -239,8 +239,8 @@ print '<td class="liste_titre">&nbsp;</td>';
 print '<td class="liste_titre">&nbsp;</td>';
 print '<td class="liste_titre" align="right"><input type="text" name="search_ledger_code" size="3" value="' . $search_ledger_code . '"></td>';
 print '<td class="liste_titre" align="right" colspan="2">';
-$searchpitco=$form->showFilterAndCheckAddButtons(0);
-print $searchpitco;
+$searchpicto=$form->showFilterAndCheckAddButtons(0);
+print $searchpicto;
 print '</td>';
 
 print '<tr class="liste_titre">';
diff --git a/htdocs/adherents/list.php b/htdocs/adherents/list.php
index 33d175e6350010bbf04de10328243e00b3da4662..9e0de6f1d7532c9345af34579378b6ffc324eb7e 100644
--- a/htdocs/adherents/list.php
+++ b/htdocs/adherents/list.php
@@ -560,8 +560,8 @@ if (! empty($arrayfields['d.statut']['checked']))
 }
 // Action column
 print '<td class="liste_titre" align="middle">';
-$searchpitco=$form->showFilterButtons();
-print $searchpitco;
+$searchpicto=$form->showFilterButtons();
+print $searchpicto;
 print '</td>';
 
 print "</tr>\n";
diff --git a/htdocs/adherents/subscription/list.php b/htdocs/adherents/subscription/list.php
index 750ad483461a8193856574d0097a1d0ce41bdeba..206f5ebf8c909dceaaa72f173a736631b42ace9e 100644
--- a/htdocs/adherents/subscription/list.php
+++ b/htdocs/adherents/subscription/list.php
@@ -239,8 +239,8 @@ if ($result)
 	
     // Action column
     print '<td class="liste_titre" align="right">';
-    $searchpitco=$form->showFilterButtons();
-    print $searchpitco;
+    $searchpicto=$form->showFilterButtons();
+    print $searchpicto;
     print '</td>';  
 
 	print "</tr>\n";
diff --git a/htdocs/admin/dict.php b/htdocs/admin/dict.php
index 28e99d02606f7128c23bcb20d926aa2a4840594e..46a8001b02ac62872f444f6696d7a683832e2029 100644
--- a/htdocs/admin/dict.php
+++ b/htdocs/admin/dict.php
@@ -1188,8 +1188,8 @@ if ($id)
     	print '<td class="liste_titre" colspan="2" align="right">';
     	if ($filterfound)
     	{
-        	$searchpitco=$form->showFilterAndCheckAddButtons(0);
-        	print $searchpitco;
+        	$searchpicto=$form->showFilterAndCheckAddButtons(0);
+        	print $searchpicto;
     	}
     	print '</td>';
         print '</tr>';
diff --git a/htdocs/admin/tools/listevents.php b/htdocs/admin/tools/listevents.php
index f5e6afd36b1f50e14c8f182f466b0b3a4ef84037..47f4af17dcff60355d42aaf7b65312861dba75b1 100644
--- a/htdocs/admin/tools/listevents.php
+++ b/htdocs/admin/tools/listevents.php
@@ -249,8 +249,8 @@ if ($result)
 	print '</td>';
 
 	print '<td align="right" class="liste_titre">';
-	$searchpitco=$form->showFilterAndCheckAddButtons(0);
-	print $searchpitco;
+	$searchpicto=$form->showFilterAndCheckAddButtons(0);
+	print $searchpicto;
 	print '</td>';
 
 	print "</tr>\n";
diff --git a/htdocs/admin/translation.php b/htdocs/admin/translation.php
index 44387bc2041bc6cfeb4d3ddfe432076b74408203..c9488f919fe6b93afe7e5883b0f713215f9a7987 100644
--- a/htdocs/admin/translation.php
+++ b/htdocs/admin/translation.php
@@ -421,8 +421,8 @@ if ($mode == 'searchkey')
     print '</td>';    
     // Action column
     print '<td class="liste_titre nowrap" align="right">';
-    $searchpitco=$form->showFilterAndCheckAddButtons($massactionbutton?1:0, 'checkforselect', 1);
-    print $searchpitco;
+    $searchpicto=$form->showFilterAndCheckAddButtons($massactionbutton?1:0, 'checkforselect', 1);
+    print $searchpicto;
     print '</td>';
     print '</tr>';
     
diff --git a/htdocs/comm/action/listactions.php b/htdocs/comm/action/listactions.php
index 3e6224e0c41063cc12868c5cc65aac460250e056..232eb0fc9b1ee019699b5a8d59a639cc759ba772 100644
--- a/htdocs/comm/action/listactions.php
+++ b/htdocs/comm/action/listactions.php
@@ -361,8 +361,8 @@ if ($resql)
     print '</td>';
 	// Action column
 	print '<td class="liste_titre" align="middle">';
-	$searchpitco=$form->showFilterButtons();
-	print $searchpitco;
+	$searchpicto=$form->showFilterButtons();
+	print $searchpicto;
 	print '</td>';
 	print "</tr>\n";
 	
diff --git a/htdocs/comm/mailing/cibles.php b/htdocs/comm/mailing/cibles.php
index 0020a8fd771bf519fc3ccd28a6245c8de150e38c..c302dea1e4332ed514c91e28464254a653b34152 100644
--- a/htdocs/comm/mailing/cibles.php
+++ b/htdocs/comm/mailing/cibles.php
@@ -484,8 +484,8 @@ if ($object->fetch($id) >= 0)
 		print '</td>';
 		// Action column
 		print '<td class="liste_titre" align="right">';
-		$searchpitco=$form->showFilterAndCheckAddButtons($massactionbutton?1:0, 'checkforselect', 1);
-		print $searchpitco;
+		$searchpicto=$form->showFilterAndCheckAddButtons($massactionbutton?1:0, 'checkforselect', 1);
+		print $searchpicto;
 		print '</td>';
 		print '</tr>';
 		
diff --git a/htdocs/comm/mailing/list.php b/htdocs/comm/mailing/list.php
index 8a9c01787d1317d80f7e17e7b55992a59e487aad..f5efbf543834f26455efcdfad9e7bf9627b7d7f9 100644
--- a/htdocs/comm/mailing/list.php
+++ b/htdocs/comm/mailing/list.php
@@ -135,8 +135,8 @@ if ($result)
 	print '<td class="liste_titre">&nbsp;</td>';
 	print '<td class="liste_titre">&nbsp;</td>';
 	print '<td class="liste_titre" align="right">';
-	$searchpitco=$form->showFilterAndCheckAddButtons(0);
-	print $searchpitco;
+	$searchpicto=$form->showFilterAndCheckAddButtons(0);
+	print $searchpicto;
 	print '</td>';
 	print "</tr>\n";
 
diff --git a/htdocs/comm/propal/list.php b/htdocs/comm/propal/list.php
index 3595d871c728fed6d2bb2d6af1cb85818a655843..ac5cee3bebc0cb55de35b1356a2bd0135967a884 100644
--- a/htdocs/comm/propal/list.php
+++ b/htdocs/comm/propal/list.php
@@ -696,8 +696,8 @@ if ($resql)
 	}
 	// Action column
 	print '<td class="liste_titre" align="middle">';
-	$searchpitco=$form->showFilterButtons();
-	print $searchpitco;
+	$searchpicto=$form->showFilterButtons();
+	print $searchpicto;
 	print '</td>';
 	
 	print "</tr>\n";
diff --git a/htdocs/commande/list.php b/htdocs/commande/list.php
index 8cab07c978022770e684a88c8a58fdba0fcdf6c7..c73258cff897fedc8a7af969744aa446ed558054 100644
--- a/htdocs/commande/list.php
+++ b/htdocs/commande/list.php
@@ -989,8 +989,8 @@ if ($resql)
 	}
 	// Action column
 	print '<td class="liste_titre" align="middle">';
-	$searchpitco=$form->showFilterButtons();
-	print $searchpitco;
+	$searchpicto=$form->showFilterButtons();
+	print $searchpicto;
 	print '</td>';
 	
     print "</tr>\n";
diff --git a/htdocs/compta/bank/bankentries.php b/htdocs/compta/bank/bankentries.php
index 286836b010322c2ee3d47c747b22470cc5d312b3..ed8241de427f21a8298e8ba5a98cf076266a1e29 100644
--- a/htdocs/compta/bank/bankentries.php
+++ b/htdocs/compta/bank/bankentries.php
@@ -797,8 +797,8 @@ if ($resql)
 	print '<td class="liste_titre" align="middle">';
 	print '</td>';
 	print '<td class="liste_titre" align="middle">';
-	$searchpitco=$form->showFilterAndCheckAddButtons($massactionbutton?1:0, 'checkforselect', 1);
-	print $searchpitco;
+	$searchpicto=$form->showFilterAndCheckAddButtons($massactionbutton?1:0, 'checkforselect', 1);
+	print $searchpicto;
     print '</td>';
 	print "</tr>\n";
 
diff --git a/htdocs/compta/bank/card.php b/htdocs/compta/bank/card.php
index be16e1f8bd6b17cf0adf8bb0156674e03840200a..a8263a74916dab5432a4a3ad84c99e1691455828 100644
--- a/htdocs/compta/bank/card.php
+++ b/htdocs/compta/bank/card.php
@@ -101,7 +101,8 @@ if ($action == 'add')
 
 	$account_number 		 = GETPOST('account_number','alpha');
 	if ($account_number <= 0) { $object->account_number = ''; } else { $object->account_number = $account_number; }
-	$object->fk_accountancy_journal  = trim($_POST["fk_accountancy_journal"]);
+	$fk_accountancy_journal  = GETPOST('fk_accountancy_journal','int');
+	if ($fk_accountancy_journal <= 0) { $object->fk_accountancy_journal = ''; } else { $object->fk_accountancy_journal = $fk_accountancy_journal; }
 
     $object->solde           = $_POST["solde"];
     $object->date_solde      = dol_mktime(12,0,0,$_POST["remonth"],$_POST["reday"],$_POST["reyear"]);
@@ -199,7 +200,8 @@ if ($action == 'update')
 
 	$account_number 		 = GETPOST('account_number', 'int');
 	if ($account_number <= 0) { $object->account_number = ''; } else { $object->account_number = $account_number; }
-	$object->fk_accountancy_journal = trim($_POST["fk_accountancy_journal"]);
+	$fk_accountancy_journal  = GETPOST('fk_accountancy_journal','int');
+	if ($fk_accountancy_journal <= 0) { $object->fk_accountancy_journal = ''; } else { $object->fk_accountancy_journal = $fk_accountancy_journal; }
 
     $object->currency_code   = trim($_POST["account_currency_code"]);
 
@@ -502,35 +504,20 @@ if ($action == 'create')
 
 	print '<table class="border" width="100%">';
 	// Accountancy code
-    if (! empty($conf->global->MAIN_BANK_ACCOUNTANCY_CODE_ALWAYS_REQUIRED))
-    {
-		if (! empty($conf->accounting->enabled))
-		{
-			print '<tr><td class="fieldrequired titlefieldcreate">'.$langs->trans("AccountancyCode").'</td>';
-			print '<td>';
-			print $formaccountancy->select_account($object->account_number, 'account_number', 1, '', 1, 1);
-			print '</td></tr>';
-		}
-		else
-		{
-			print '<tr><td class="fieldrequired titlefieldcreate">'.$langs->trans("AccountancyCode").'</td>';
-			print '<td colspan="3"><input type="text" name="account_number" value="'.(GETPOST("account_number")?GETPOST('account_number', 'alpha'):$object->account_number).'"></td></tr>';
-		}
+	$fieldrequired='';
+    if (! empty($conf->global->MAIN_BANK_ACCOUNTANCY_CODE_ALWAYS_REQUIRED)) $fieldrequired='fieldrequired '; 
+    
+	if (! empty($conf->accounting->enabled))
+	{
+		print '<tr><td class="'.$fieldrequired.'titlefieldcreate">'.$langs->trans("AccountancyCode").'</td>';
+		print '<td>';
+		print $formaccountancy->select_account($object->account_number, 'account_number', 1, '', 1, 1);
+		print '</td></tr>';
 	}
-    else
-    {
-		if (! empty($conf->accounting->enabled))
-		{
-			print '<tr><td class="titlefieldcreate">'.$langs->trans("AccountancyCode").'</td>';
-			print '<td>';
-			print $formaccountancy->select_account($object->account_number, 'account_number', 1, '', 1, 1);
-			print '</td></tr>';
-		}
-		else
-		{
-			print '<tr><td class="titlefieldcreate">'.$langs->trans("AccountancyCode").'</td>';
-			print '<td colspan="3"><input type="text" name="account_number" value="'.(GETPOST("account_number")?GETPOST('account_number', 'alpha'):$object->account_number).'"></td></tr>';
-		}
+	else
+	{
+		print '<tr><td class="'.$fieldrequired.'titlefieldcreate">'.$langs->trans("AccountancyCode").'</td>';
+		print '<td colspan="3"><input type="text" name="account_number" value="'.(GETPOST("account_number")?GETPOST('account_number', 'alpha'):$object->account_number).'"></td></tr>';
 	}
 
 	// Accountancy journal
@@ -538,7 +525,7 @@ if ($action == 'create')
 	{
 		print '<tr><td>'.$langs->trans("AccountancyJournal").'</td>';
 	    print '<td>';
-		print $formaccountancy2->select_journal($object->fk_accountancy_journal, 'fk_accountancy_journal', 4, 1, '', 1, 1);
+		print $formaccountancy2->select_journal($object->fk_accountancy_journal, 'fk_accountancy_journal', 4, 1, '', 0, 0);
 		print '</td></tr>';
 	}
 
@@ -994,7 +981,7 @@ else
 		{
 			print '<tr><td>'.$langs->trans("AccountancyJournal").'</td>';
 			print '<td>';
-			print $formaccountancy2->select_journal($object->fk_accountancy_journal, 'fk_accountancy_journal', 4, 1, '', 1, 1);
+			print $formaccountancy2->select_journal($object->fk_accountancy_journal, 'fk_accountancy_journal', 4, 1, '', 0, 0);
 			print '</td></tr>';
 		}
 		
diff --git a/htdocs/compta/bank/class/account.class.php b/htdocs/compta/bank/class/account.class.php
index 9fdd329fd3dcdb2187d0855ad6ce5146b83a5f90..2a615ad4b6952070fbcc972fe271698b1bcfc5f4 100644
--- a/htdocs/compta/bank/class/account.class.php
+++ b/htdocs/compta/bank/class/account.class.php
@@ -1259,7 +1259,7 @@ class Account extends CommonObject
             include_once DOL_DOCUMENT_ROOT.'/core/lib/accounting.lib.php';
             $langs->load("accountancy");
             $label .= '<br><b>' . $langs->trans('AccountAccounting') . ':</b> ' . length_accountg($this->account_number);
-            $label .= '<br><b>' . $langs->trans('AccountancyJournal') . ':</b> ' . $this->fk_accountancy_journal;
+            $label .= '<br><b>' . $langs->trans('AccountancyJournal') . ':</b> ' . $this->accountancy_journal;
         }
         $linkclose = '" title="'.dol_escape_htmltag($label, 1).'" class="classfortooltip">';
 
diff --git a/htdocs/compta/bank/index.php b/htdocs/compta/bank/index.php
index f5d4fee1fc0f7c83784e7e994780f14f11d49fb8..37883c29c0fca0faccebdc726e1ee3378293cc86 100644
--- a/htdocs/compta/bank/index.php
+++ b/htdocs/compta/bank/index.php
@@ -393,8 +393,8 @@ if (! empty($arrayfields['balance']['checked']))
 }
 // Action column
 print '<td class="liste_titre" align="middle">';
-$searchpitco=$form->showFilterAndCheckAddButtons($massactionbutton?1:0, 'checkforselect', 1);
-print $searchpitco;
+$searchpicto=$form->showFilterAndCheckAddButtons($massactionbutton?1:0, 'checkforselect', 1);
+print $searchpicto;
 print '</td>';
 print '</tr>';
 
diff --git a/htdocs/compta/deplacement/list.php b/htdocs/compta/deplacement/list.php
index 95f4082e08281cc39ba0c746d9c6f5765b0372b7..1cf976325ecc5a245065f6069b9addaef09dca40 100644
--- a/htdocs/compta/deplacement/list.php
+++ b/htdocs/compta/deplacement/list.php
@@ -165,8 +165,8 @@ if ($resql)
     // print '<input class="flat" size="10" type="text" name="search_amount" value="'.$search_amount.'">';
     print '</td>';
     print '<td class="liste_titre" align="right">';
-    $searchpitco=$form->showFilterAndCheckAddButtons(0);
-    print $searchpitco;
+    $searchpicto=$form->showFilterAndCheckAddButtons(0);
+    print $searchpicto;
     print '</td>';
     print "</tr>\n";
 
diff --git a/htdocs/compta/facture/card.php b/htdocs/compta/facture/card.php
index 176806541144993a0d63558ef4fc364e22883ecf..02b67c814efed103b9bc564f7e4ecb2e1c7ee3aa 100644
--- a/htdocs/compta/facture/card.php
+++ b/htdocs/compta/facture/card.php
@@ -59,6 +59,9 @@ require_once DOL_DOCUMENT_ROOT . '/core/class/doleditor.class.php';
 if (!empty($conf->variants->enabled)) {
 	require_once DOL_DOCUMENT_ROOT.'/variants/class/ProductCombination.class.php';
 }
+if (! empty($conf->accounting->enabled)) {
+	require_once DOL_DOCUMENT_ROOT . '/accountancy/class/accountingjournal.class.php';
+}
 
 $langs->load('bills');
 $langs->load('companies');
@@ -3685,7 +3688,7 @@ else if ($id > 0 || ! empty($ref))
     $sql = 'SELECT p.datep as dp, p.ref, p.num_paiement, p.rowid, p.fk_bank,';
     $sql .= ' c.code as payment_code, c.libelle as payment_label,';
     $sql .= ' pf.amount,';
-    $sql .= ' ba.rowid as baid, ba.ref as baref, ba.label';
+    $sql .= ' ba.rowid as baid, ba.ref as baref, ba.label, ba.number as banumber, ba.account_number, ba.fk_accountancy_journal';
     $sql .= ' FROM ' . MAIN_DB_PREFIX . 'c_paiement as c, ' . MAIN_DB_PREFIX . 'paiement_facture as pf, ' . MAIN_DB_PREFIX . 'paiement as p';
     $sql .= ' LEFT JOIN ' . MAIN_DB_PREFIX . 'bank as b ON p.fk_bank = b.rowid';
     $sql .= ' LEFT JOIN ' . MAIN_DB_PREFIX . 'bank_account as ba ON b.fk_account = ba.rowid';
@@ -3717,7 +3720,17 @@ else if ($id > 0 || ! empty($ref))
                     $bankaccountstatic->id = $objp->baid;
                     $bankaccountstatic->ref = $objp->baref;
                     $bankaccountstatic->label = $objp->baref;
-                    print '<td align="right">';
+					$bankaccountstatic->number = $objp->banumber;
+
+					if (! empty($conf->accounting->enabled)) {
+						$bankaccountstatic->account_number = $objp->account_number;
+
+						$accountingjournal = new AccountingJournal($db);
+						$accountingjournal->fetch($objp->fk_accountancy_journal);
+						$bankaccountstatic->accountancy_journal = $accountingjournal->getNomUrl(0,1,1,'',1);
+					}
+
+					print '<td align="right">';
                     if ($bankaccountstatic->id)
                         print $bankaccountstatic->getNomUrl(1, 'transactions');
                     print '</td>';
diff --git a/htdocs/compta/facture/fiche-rec.php b/htdocs/compta/facture/fiche-rec.php
index 773f04d2ca03184b2b35b34f09f02e54e46c44fc..3c22b96a1d4064006819f6e6cf3753a6e7b234b6 100644
--- a/htdocs/compta/facture/fiche-rec.php
+++ b/htdocs/compta/facture/fiche-rec.php
@@ -1770,8 +1770,8 @@ else
 			}
 			// Action column
 			print '<td class="liste_titre" align="middle">';
-			$searchpitco=$form->showFilterAndCheckAddButtons(0, 'checkforselect', 1);
-			print $searchpitco;
+			$searchpicto=$form->showFilterAndCheckAddButtons(0, 'checkforselect', 1);
+			print $searchpicto;
 			print '</td>';
 			print "</tr>\n";
 
diff --git a/htdocs/compta/facture/list.php b/htdocs/compta/facture/list.php
index 5b01c4459606df836d07abbe5693d8e480eaf124..638ca033e1af1771183c83781640f3ac99048124 100644
--- a/htdocs/compta/facture/list.php
+++ b/htdocs/compta/facture/list.php
@@ -936,8 +936,8 @@ if ($resql)
 	}
 	// Action column
 	print '<td class="liste_titre" align="middle">';
-	$searchpitco=$form->showFilterButtons();
-	print $searchpitco;
+	$searchpicto=$form->showFilterButtons();
+	print $searchpicto;
     print '</td>';
     print "</tr>\n";
 
diff --git a/htdocs/compta/paiement/cheque/list.php b/htdocs/compta/paiement/cheque/list.php
index f1a9a839792069bce83db9a09cf2569e413bda94..9798e2d28b4dbfa0db011a504d3d6cb62013b025 100644
--- a/htdocs/compta/paiement/cheque/list.php
+++ b/htdocs/compta/paiement/cheque/list.php
@@ -175,8 +175,8 @@ if ($resql)
 	print '</td>';
 	print '<td class="liste_titre"></td>';
     print '<td class="liste_titre" align="right">';
-    $searchpitco=$form->showFilterAndCheckAddButtons(0);
-    print $searchpitco;
+    $searchpicto=$form->showFilterAndCheckAddButtons(0);
+    print $searchpicto;
     print '</td>';
     print "</tr>\n";
 
diff --git a/htdocs/compta/paiement/list.php b/htdocs/compta/paiement/list.php
index d0ba03734570e977418fd353439abc3477d6b82f..ab4189d53385b993be95a234150fd30caa891d47 100644
--- a/htdocs/compta/paiement/list.php
+++ b/htdocs/compta/paiement/list.php
@@ -254,8 +254,8 @@ if ($resql)
     print '<input class="flat" type="text" size="4" name="search_amount" value="'.$search_amount.'">';
 	print '</td>';
     print '<td class="liste_titre" align="right">';
-    $searchpitco=$form->showFilterAndCheckAddButtons(0);
-    print $searchpitco;
+    $searchpicto=$form->showFilterAndCheckAddButtons(0);
+    print $searchpicto;
     print '</td>';
     if (! empty($conf->global->BILL_ADD_PAYMENT_VALIDATION))
     {
diff --git a/htdocs/compta/prelevement/bons.php b/htdocs/compta/prelevement/bons.php
index 973135765dc3d332752ed6fffb891cf12158c4e9..7319de4a7bd861a04b76e3bb87e1f9f32937ec8e 100644
--- a/htdocs/compta/prelevement/bons.php
+++ b/htdocs/compta/prelevement/bons.php
@@ -124,8 +124,8 @@ if ($result)
   print '<td class="liste_titre"><input type="text" class="flat maxwidth100" name="search_ref" value="'. $db->escape($search_ref).'"></td>';
   print '<td class="liste_titre">&nbsp;</td>';
   print '<td class="liste_titre" align="right">';
-  $searchpitco=$form->showFilterAndCheckAddButtons(0);
-  print $searchpitco;
+  $searchpicto=$form->showFilterAndCheckAddButtons(0);
+  print $searchpicto;
   print '</td>';
   print '</tr>';
 
diff --git a/htdocs/compta/prelevement/demandes.php b/htdocs/compta/prelevement/demandes.php
index c1c8bd7e929d0baa962f9791dd0a97a702ce2ad4..e619b28e994c4bca27e7217dcb6cd9a91f6e18d5 100644
--- a/htdocs/compta/prelevement/demandes.php
+++ b/htdocs/compta/prelevement/demandes.php
@@ -124,8 +124,8 @@ if ($resql)
 	print '<td class="liste_titre"></td>';
 	// Action column
 	print '<td class="liste_titre" align="middle">';
-	$searchpitco=$form->showFilterAndCheckAddButtons($massactionbutton?1:0, 'checkforselect', 1);
-	print $searchpitco;
+	$searchpicto=$form->showFilterAndCheckAddButtons($massactionbutton?1:0, 'checkforselect', 1);
+	print $searchpicto;
 	print '</td>';
 	print '</tr>';
 
diff --git a/htdocs/compta/prelevement/list.php b/htdocs/compta/prelevement/list.php
index 2fa8a2554070348c7f8ab021cbe0c1cf30f6bad0..9b1f1ff461e46dd0d8e3768caeade01645ec3d66 100644
--- a/htdocs/compta/prelevement/list.php
+++ b/htdocs/compta/prelevement/list.php
@@ -154,8 +154,8 @@ if ($result)
     print '<td class="liste_titre">&nbsp;</td>';
     print '<td class="liste_titre">&nbsp;</td>';
     print '<td class="liste_titre" align="right">';
-    $searchpitco=$form->showFilterAndCheckAddButtons(0);
-    print $searchpitco;
+    $searchpicto=$form->showFilterAndCheckAddButtons(0);
+    print $searchpicto;
     print '</td>';
     print '</tr>';
 
diff --git a/htdocs/compta/resultat/clientfourn.php b/htdocs/compta/resultat/clientfourn.php
index 5c77bbba21d269b59587f4c2ea3684bab262b38c..1b5a232b81277e184c72881b88366664b5785a92 100644
--- a/htdocs/compta/resultat/clientfourn.php
+++ b/htdocs/compta/resultat/clientfourn.php
@@ -231,13 +231,11 @@ $result = $db->query($sql);
 if ($result) {
     $num = $db->num_rows($result);
     $i = 0;
-    $var=true;
     while ($i < $num)
     {
         $objp = $db->fetch_object($result);
         
-
-        print "<tr ".$bc[$var]."><td>&nbsp;</td>";
+        print '<tr class="oddeven"><td>&nbsp;</td>';
         print "<td>".$langs->trans("Bills").' <a href="'.DOL_URL_ROOT.'/compta/facture/list.php?socid='.$objp->socid.'">'.$objp->name."</td>\n";
 
         if ($modecompta == 'CREANCES-DETTES')
@@ -282,7 +280,7 @@ if ($modecompta != 'CREANCES-DETTES')
                 $objp = $db->fetch_object($result);
                 
 
-                print "<tr ".$bc[$var]."><td>&nbsp;</td>";
+                print '<tr class="oddeven"><td>&nbsp;</td>';
                 print "<td>".$langs->trans("Bills")." ".$langs->trans("Other")." (".$langs->trans("PaymentsNotLinkedToInvoice").")\n";
 
                 if ($modecompta == 'CREANCES-DETTES')
@@ -303,9 +301,8 @@ if ($modecompta != 'CREANCES-DETTES')
 }
 
 if ($total_ttc == 0)
-{
-    
-    print "<tr ".$bc[$var]."><td>&nbsp;</td>";
+{    
+    print '<tr class="oddeven"><td>&nbsp;</td>';
     print '<td colspan="3" class="opacitymedium">'.$langs->trans("None").'</td>';
     print '</tr>';
 }
@@ -361,15 +358,13 @@ $result = $db->query($sql);
 if ($result) {
     $num = $db->num_rows($result);
     $i = 0;
-    $var=true;
     if ($num > 0)
     {
         while ($i < $num)
         {
             $objp = $db->fetch_object($result);
             
-
-            print "<tr ".$bc[$var]."><td>&nbsp;</td>";
+            print '<tr class="oddeven"><td>&nbsp;</td>';
             print "<td>".$langs->trans("Bills")." <a href=\"".DOL_URL_ROOT."/fourn/facture/list.php?socid=".$objp->socid."\">".$objp->name."</a></td>\n";
 
             if ($modecompta == 'CREANCES-DETTES')
@@ -386,9 +381,8 @@ if ($result) {
         }
     }
     else
-    {
-        
-        print "<tr ".$bc[$var]."><td>&nbsp;</td>";
+    {        
+        print '<tr class="oddeven"><td>&nbsp;</td>';
         print '<td colspan="3" class="opacitymedium">'.$langs->trans("None").'</td>';
         print '</tr>';
     }
@@ -447,7 +441,6 @@ $subtotal_ht = 0;
 $subtotal_ttc = 0;
 if ($result) {
     $num = $db->num_rows($result);
-    $var=true;
     $i = 0;
     if ($num) {
         while ($i < $num) {
@@ -458,8 +451,7 @@ if ($result) {
             $subtotal_ht += $obj->amount;
             $subtotal_ttc += $obj->amount;
 
-            $var = !$var;
-            print "<tr ".$bc[$var]."><td>&nbsp;</td>";
+            print '<tr class="oddeven"><td>&nbsp;</td>';
             print '<td>'.$obj->label.'</td>';
             if ($modecompta == 'CREANCES-DETTES') print '<td align="right">'.price(-$obj->amount).'</td>';
             print '<td align="right">'.price(-$obj->amount).'</td>';
@@ -468,8 +460,7 @@ if ($result) {
         }
     }
     else {
-        $var = !$var;
-        print "<tr ".$bc[$var]."><td>&nbsp;</td>";
+        print '<tr class="oddeven"><td>&nbsp;</td>';
         print '<td colspan="3" class="opacitymedium">'.$langs->trans("None").'</td>';
         print '</tr>';
     }
@@ -526,7 +517,6 @@ $subtotal_ht = 0;
 $subtotal_ttc = 0;
 if ($result) {
     $num = $db->num_rows($result);
-    $var=true;
     $i = 0;
     if ($num) {
         while ($i < $num) {
@@ -537,8 +527,7 @@ if ($result) {
             $subtotal_ht += $obj->amount;
             $subtotal_ttc += $obj->amount;
 
-            $var = !$var;
-            print "<tr ".$bc[$var]."><td>&nbsp;</td>";
+            print '<tr class="oddeven"><td>&nbsp;</td>';
             print '<td>'.$obj->label.'</td>';
             if ($modecompta == 'CREANCES-DETTES')
             	print '<td align="right">'.price(-$obj->amount).'</td>';
@@ -548,8 +537,7 @@ if ($result) {
         }
     }
     else {
-        $var = !$var;
-        print "<tr ".$bc[$var]."><td>&nbsp;</td>";
+        print '<tr class="oddeven"><td>&nbsp;</td>';
         print '<td colspan="3" class="opacitymedium">'.$langs->trans("None").'</td>';
         print '</tr>';
     }
@@ -615,7 +603,6 @@ if (! empty($conf->salaries->enabled))
 	if ($result)
 	{
 	    $num = $db->num_rows($result);
-	    $var=true;
 	    $i = 0;
 	    if ($num)
 	    {
@@ -628,8 +615,7 @@ if (! empty($conf->salaries->enabled))
 	            $subtotal_ht += $obj->amount;
 	            $subtotal_ttc += $obj->amount;
 
-	            $var = !$var;
-	            print "<tr ".$bc[$var]."><td>&nbsp;</td>";
+	            print '<tr class="oddeven"><td>&nbsp;</td>';
 
 	            print "<td>".$langs->trans("Salary")." <a href=\"".DOL_URL_ROOT."/compta/salaries/index.php?filtre=s.fk_user=".$obj->fk_user."\">".$obj->firstname." ".$obj->lastname."</a></td>\n";
 
@@ -641,8 +627,7 @@ if (! empty($conf->salaries->enabled))
 	    }
 	    else
 	    {
-	        $var = !$var;
-	        print "<tr ".$bc[$var]."><td>&nbsp;</td>";
+	        print '<tr class="oddeven"><td>&nbsp;</td>';
 	        print '<td colspan="3" class="opacitymedium">'.$langs->trans("None").'</td>';
 	        print '</tr>';
 	    }
@@ -704,7 +689,6 @@ if (! empty($conf->expensereport->enabled))
 	if ($result)
 	{
 		$num = $db->num_rows($result);
-		$var=true;
 		if ($num)
 		{
 			while ($obj = $db->fetch_object($result))
@@ -714,8 +698,7 @@ if (! empty($conf->expensereport->enabled))
 				$subtotal_ht += $obj->amount_ht;
 				$subtotal_ttc += $obj->amount_ttc;
 
-				$var = !$var;
-				print "<tr ".$bc[$var]."><td>&nbsp;</td>";
+				print '<tr class="oddeven"><td>&nbsp;</td>';
 
 				print "<td>".$langs->trans("ExpenseReport")." <a href=\"".DOL_URL_ROOT."/expensereport/list.php?search_user=".$obj->userid."\">".$obj->firstname." ".$obj->lastname."</a></td>\n";
 
@@ -726,8 +709,7 @@ if (! empty($conf->expensereport->enabled))
 		}
 		else
 		{
-			$var = !$var;
-			print "<tr ".$bc[$var]."><td>&nbsp;</td>";
+			print '<tr class="oddeven"><td>&nbsp;</td>';
 			print '<td colspan="3" class="opacitymedium">'.$langs->trans("None").'</td>';
 			print '</tr>';
 		}
@@ -782,7 +764,6 @@ if (! empty($conf->don->enabled))
 	if ($result)
 	{
 		$num = $db->num_rows($result);
-		$var=true;
 		$i = 0;
 		if ($num)
 		{
@@ -795,8 +776,7 @@ if (! empty($conf->don->enabled))
 				$subtotal_ht += $obj->amount;
 				$subtotal_ttc += $obj->amount;
 
-				$var = !$var;
-				print "<tr ".$bc[$var]."><td>&nbsp;</td>";
+				print '<tr class="oddeven"><td>&nbsp;</td>';
 
 				print "<td>".$langs->trans("Donation")." <a href=\"".DOL_URL_ROOT."/don/list.php?search_company=".$obj->name."&search_name=".$obj->firstname." ".$obj->lastname."\">".$obj->name. " ".$obj->firstname." ".$obj->lastname."</a></td>\n";
 
@@ -808,8 +788,7 @@ if (! empty($conf->don->enabled))
 		}
 		else
 		{
-			$var = !$var;
-			print "<tr ".$bc[$var]."><td>&nbsp;</td>";
+			print '<tr class="oddeven"><td>&nbsp;</td>';
 			print '<td colspan="3" class="opacitymedium">'.$langs->trans("None").'</td>';
 			print '</tr>';
 		}
@@ -859,7 +838,6 @@ if ($modecompta == 'CREANCES-DETTES')
     if ($result)
     {
         $num = $db->num_rows($result);
-        $var=false;
         $i = 0;
         if ($num)
         {
@@ -878,7 +856,7 @@ if ($modecompta == 'CREANCES-DETTES')
     } else {
         dol_print_error($db);
     }
-    print "<tr ".$bc[$var]."><td>&nbsp;</td>";
+    print '<tr class="oddeven"><td>&nbsp;</td>';
     print "<td>".$langs->trans("VATToPay")."</td>\n";
     print "<td align=\"right\">&nbsp;</td>\n";
     print "<td align=\"right\">".price($amount)."</td>\n";
@@ -908,7 +886,6 @@ if ($modecompta == 'CREANCES-DETTES')
     if ($result)
     {
         $num = $db->num_rows($result);
-        $var=true;
         $i = 0;
         if ($num)
         {
@@ -928,7 +905,7 @@ if ($modecompta == 'CREANCES-DETTES')
     } else {
         dol_print_error($db);
     }
-    print "<tr ".$bc[$var]."><td>&nbsp;</td>";
+    print '<tr class="oddeven"><td>&nbsp;</td>';
     print "<td>".$langs->trans("VATToCollect")."</td>\n";
     print "<td align=\"right\">&nbsp;</td>\n";
     print "<td align=\"right\">".price($amount)."</td>\n";
@@ -955,7 +932,6 @@ else
     $result=$db->query($sql);
     if ($result) {
         $num = $db->num_rows($result);
-        $var=false;
         $i = 0;
         if ($num) {
             while ($i < $num) {
@@ -974,7 +950,7 @@ else
     } else {
         dol_print_error($db);
     }
-    print "<tr ".$bc[$var]."><td>&nbsp;</td>";
+    print '<tr class="oddeven"><td>&nbsp;</td>';
     print "<td>".$langs->trans("VATPaid")."</td>\n";
     if ($modecompta == 'CREANCES-DETTES')
     	print "<td align=\"right\">".price($amount)."</td>\n";
@@ -1000,7 +976,6 @@ else
     $result=$db->query($sql);
     if ($result) {
         $num = $db->num_rows($result);
-        $var=true;
         $i = 0;
         if ($num) {
             while ($i < $num) {
@@ -1021,7 +996,7 @@ else
     {
         dol_print_error($db);
     }
-    print "<tr ".$bc[$var]."><td>&nbsp;</td>";
+    print '<tr class="oddeven"><td>&nbsp;</td>';
     print "<td>".$langs->trans("VATCollected")."</td>\n";
     if ($modecompta == 'CREANCES-DETTES')
     	print "<td align=\"right\">".price($amount)."</td>\n";
diff --git a/htdocs/compta/salaries/index.php b/htdocs/compta/salaries/index.php
index 597b8aabad0737684f7dee26f167bdaf010728d5..e193374a5529e4b7ef7673a3ebff238a98159ff1 100644
--- a/htdocs/compta/salaries/index.php
+++ b/htdocs/compta/salaries/index.php
@@ -26,6 +26,7 @@
 require '../../main.inc.php';
 require_once DOL_DOCUMENT_ROOT.'/compta/salaries/class/paymentsalary.class.php';
 require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php';
+if (! empty($conf->accounting->enabled)) require_once DOL_DOCUMENT_ROOT . '/accountancy/class/accountingjournal.class.php';
 
 $langs->load("compta");
 $langs->load("salaries");
@@ -94,7 +95,7 @@ $accountstatic = new Account($db);
 
 $sql = "SELECT u.rowid as uid, u.lastname, u.firstname, u.login, u.email, u.admin, u.salary as current_salary, u.fk_soc as fk_soc,";
 $sql.= " s.rowid, s.fk_user, s.amount, s.salary, s.label, s.datep as datep, s.datev as datev, s.fk_typepayment as type, s.num_payment, s.fk_bank,";
-$sql.= " ba.rowid as bid, ba.ref as bref, ba.number as bnumber, ba.account_number, ba.accountancy_journal, ba.label as blabel,";
+$sql.= " ba.rowid as bid, ba.ref as bref, ba.number as bnumber, ba.account_number, ba.fk_accountancy_journal, ba.label as blabel,";
 $sql.= " pst.code as payment_code";
 $sql.= " FROM ".MAIN_DB_PREFIX."payment_salary as s";
 $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."c_paiement as pst ON s.fk_typepayment = pst.id";
@@ -183,8 +184,8 @@ if ($result)
 	print '<td class="liste_titre" align="right"><input name="search_amount" class="flat" type="text" size="8" value="'.$search_amount.'"></td>';
 
     print '<td class="liste_titre" align="right">';
-    $searchpitco=$form->showFilterAndCheckAddButtons(0);
-    print $searchpitco;
+    $searchpicto=$form->showFilterAndCheckAddButtons(0);
+    print $searchpicto;
     print '</td>';
     
     print '<tr class="liste_titre">';
@@ -236,8 +237,16 @@ if ($result)
 	            $accountstatic->id=$obj->bid;
 	            $accountstatic->ref=$obj->bref;
 	            $accountstatic->number=$obj->bnumber;
-	            $accountstatic->accountancy_number=$obj->account_number;
-	            $accountstatic->accountancy_journal=$obj->accountancy_journal;
+				
+				if (! empty($conf->accounting->enabled))
+				{
+					$accountstatic->account_number=$obj->account_number;
+					
+					$accountingjournal = new AccountingJournal($db);
+					$accountingjournal->fetch($obj->fk_accountancy_journal);
+
+					$accountstatic->accountancy_journal = $accountingjournal->getNomUrl(0,1,1,'',1);
+				}
 	            $accountstatic->label=$obj->blabel;
 	        	print $accountstatic->getNomUrl(1);
 	        }
diff --git a/htdocs/compta/sociales/index.php b/htdocs/compta/sociales/index.php
index e76a6edc49ab859e4abcff7091f08983825f1bb4..50e14823a5f55e4721076bb94016ae92fe196a27 100644
--- a/htdocs/compta/sociales/index.php
+++ b/htdocs/compta/sociales/index.php
@@ -202,8 +202,8 @@ if ($resql)
 		print '</td>';
 
         print '<td class="liste_titre" align="right">';
-        $searchpitco=$form->showFilterAndCheckAddButtons(0);
-        print $searchpitco;
+        $searchpicto=$form->showFilterAndCheckAddButtons(0);
+        print $searchpicto;
         print '</td>';
 		print "</tr>\n";
 
diff --git a/htdocs/compta/tva/reglement.php b/htdocs/compta/tva/reglement.php
index 15a6df0a7172dc7edf165e6154992967d45b08a5..94895062bc366832d463db81f1fc97e1f94a2da6 100644
--- a/htdocs/compta/tva/reglement.php
+++ b/htdocs/compta/tva/reglement.php
@@ -182,8 +182,8 @@ if ($result)
     }
 	print '<td class="liste_titre" align="right"><input name="search_amount" class="flat" type="text" size="8" value="'.$search_amount.'"></td>';
     print '<td class="liste_titre" align="right">';
-    $searchpitco=$form->showFilterAndCheckAddButtons(0);
-    print $searchpitco;
+    $searchpicto=$form->showFilterAndCheckAddButtons(0);
+    print $searchpicto;
     print '</td>';
 	print "</tr>\n";
 
diff --git a/htdocs/contrat/list.php b/htdocs/contrat/list.php
index 3bf4a45bb105b5e05b497d7c62d30ee74d000b70..318a24931bee51a2e51b5f8972405052957e4c66 100644
--- a/htdocs/contrat/list.php
+++ b/htdocs/contrat/list.php
@@ -509,8 +509,8 @@ if ($resql)
         print '<td class="liste_titre" colspan="4" align="right"></td>';
     }
     print '<td class="liste_titre" align="middle">';
-    $searchpitco=$form->showFilterButtons();
-    print $searchpitco;
+    $searchpicto=$form->showFilterButtons();
+    print $searchpicto;
     print '</td>';
     print "</tr>\n";
     
diff --git a/htdocs/contrat/services.php b/htdocs/contrat/services.php
index d92bcd166796fac4f16bf31a8e4258ea4d928e35..f283502bc3e4164ad35700a9d721720a8da64dbf 100644
--- a/htdocs/contrat/services.php
+++ b/htdocs/contrat/services.php
@@ -503,8 +503,8 @@ if (! empty($arrayfields['status']['checked']))
 }
 // Action column
 print '<td class="liste_titre" align="right">';
-$searchpitco=$form->showFilterAndCheckAddButtons(0);
-print $searchpitco;
+$searchpicto=$form->showFilterAndCheckAddButtons(0);
+print $searchpicto;
 print '</td>';
 print "</tr>\n";
 
diff --git a/htdocs/core/class/html.formaccounting.class.php b/htdocs/core/class/html.formaccounting.class.php
index a87b566d0d620cdd4f9725f6a56fbfcd4638bc5b..97f31f05e99da30a94b8bf2c38b1d7133fe31e49 100644
--- a/htdocs/core/class/html.formaccounting.class.php
+++ b/htdocs/core/class/html.formaccounting.class.php
@@ -1,5 +1,5 @@
 <?php
-/* Copyright (C) 2016 		Alexandre Spangaro <aspangaro.dolibarr@gmail.com>
+/* Copyright (C) 2016-2017	Alexandre Spangaro	<aspangaro@zendsi.com>
  *
  * 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
@@ -121,7 +121,7 @@ class FormAccounting extends Form
 			}
 		}
 
-		$out .= Form::selectarray($htmlname, $options, $select, $showempty, 0, 0, '', 0, 0, 0, '', $morecss, 1);
+		$out .= Form::selectarray($htmlname, $options, $selected, $showempty, 0, 0, '', 0, 0, 0, '', $morecss, 1);
 
 		return $out;
 	}
diff --git a/htdocs/core/lib/company.lib.php b/htdocs/core/lib/company.lib.php
index 6847cd7b9c2b7e61339c9ce5455e7a926d1bf635..3fef1265f9d62a92e17c75f7308dec157ecfdc7f 100644
--- a/htdocs/core/lib/company.lib.php
+++ b/htdocs/core/lib/company.lib.php
@@ -1264,8 +1264,8 @@ function show_actions_done($conf, $langs, $db, $filterobj, $objcon='', $noprint=
         $out.='<td class="liste_titre"></td>';
         // Action column
         $out.='<td class="liste_titre" align="middle">';
-        $searchpitco=$form->showFilterAndCheckAddButtons($massactionbutton?1:0, 'checkforselect', 1);
-        $out.=$searchpitco;
+        $searchpicto=$form->showFilterAndCheckAddButtons($massactionbutton?1:0, 'checkforselect', 1);
+        $out.=$searchpicto;
         $out.='</td>';
         $out.='</tr>';
         
diff --git a/htdocs/core/lib/functions2.lib.php b/htdocs/core/lib/functions2.lib.php
index b36da63163593c74f8d2d2269da9d3970e5ce7e3..2f46ad49b8030802b44764aaaa3a7efffa70ec6f 100644
--- a/htdocs/core/lib/functions2.lib.php
+++ b/htdocs/core/lib/functions2.lib.php
@@ -1530,8 +1530,10 @@ function getListOfModels($db,$type,$maxfilenamelength=0)
                 include_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
 
                 $const=$obj->description;
-                $dirtoscan.=($dirtoscan?',':'').preg_replace('/[\r\n]+/',',',trim($conf->global->$const));
-                $listoffiles=array();
+                //irtoscan.=($dirtoscan?',':'').preg_replace('/[\r\n]+/',',',trim($conf->global->$const));
+                $dirtoscan= preg_replace('/[\r\n]+/',',',trim($conf->global->$const));
+
+		$listoffiles=array();
 
                 // Now we add models found in directories scanned
                 $listofdir=explode(',',$dirtoscan);
@@ -2111,4 +2113,4 @@ function cartesianArray(array $input) {
     }
 
     return $result;
-}
\ No newline at end of file
+}
diff --git a/htdocs/don/list.php b/htdocs/don/list.php
index d271ea3e8945952c3231906a5d2515ea8e2901df..b0cd414ed286d1eaff535dbf84a527a586f58b68 100644
--- a/htdocs/don/list.php
+++ b/htdocs/don/list.php
@@ -183,8 +183,8 @@ if ($resql)
     print '<td class="liste_titre" align="right"><input name="search_amount" class="flat" type="text" size="8" value="'.$search_amount.'"></td>';
     print '<td class="liste_titre" align="right"></td>';
     print '<td class="liste_titre" align="right">';
-    $searchpitco=$form->showFilterAndCheckAddButtons(0);
-    print $searchpitco;
+    $searchpicto=$form->showFilterAndCheckAddButtons(0);
+    print $searchpicto;
     print '</td>';
 	print "</tr>\n";
 
diff --git a/htdocs/expedition/card.php b/htdocs/expedition/card.php
index cbe602f7313404ed279c1da4bbfb644b01130e40..a0280ce9e397498f3da29c9cee14df132ab6b2ba 100644
--- a/htdocs/expedition/card.php
+++ b/htdocs/expedition/card.php
@@ -1013,7 +1013,7 @@ if ($action == 'create')
 									{
 										$img=img_warning($langs->trans("StockTooLow"));
 									}
-									print "<tr ".$bc[$var]."><td>&nbsp; &nbsp; &nbsp; ->
+									print "<tr class=\"oddeven\"><td>&nbsp; &nbsp; &nbsp; ->
 										<a href=\"".DOL_URL_ROOT."/product/card.php?id=".$value['id']."\">".$value['fullpath']."
 										</a> (".$value['nb'].")</td><td align=\"center\"> ".$value['nb_total']."</td><td>&nbsp</td><td>&nbsp</td>
 										<td align=\"center\">".$value['stock']." ".$img."</td></tr>";
diff --git a/htdocs/expedition/index.php b/htdocs/expedition/index.php
index c3e277ad7b0e374973c19f12d36c6355db7567e0..039a038f18a33dfa83fd4fd2e9479e99704cacde 100644
--- a/htdocs/expedition/index.php
+++ b/htdocs/expedition/index.php
@@ -90,17 +90,15 @@ if ($resql)
 		print '<tr class="liste_titre">';
 		print '<th colspan="3">'.$langs->trans("SendingsToValidate").'</th></tr>';
 		$i = 0;
-		$var = True;
 		while ($i < $num)
 		{
 			$obj = $db->fetch_object($resql);
 			
 			$shipment->id=$obj->rowid;
 			$shipment->ref=$obj->ref;
-			$shipment->ref_customer=$obj->ref_customer;
-				
+			$shipment->ref_customer=$obj->ref_customer;				
 			
-			print "<tr ".$bc[$var].'><td class="nowrap">';
+			print '<tr class="oddeven"><td class="nowrap">';
 			print $shipment->getNomUrl(1);
 			print "</td>";
 			print '<td>';
@@ -142,7 +140,6 @@ if ($resql)
 		print '<table class="noborder" width="100%">';
 		print '<tr class="liste_titre">';
 		print '<th colspan="3">'.$langs->trans("OrdersToProcess").'</th></tr>';
-		$var = True;
 		while ($i < $num)
 		{
 			$obj = $db->fetch_object($resql);
@@ -154,8 +151,7 @@ if ($resql)
 			$orderstatic->facturee=0;
 			
 			$companystatic->name=$obj->name;
-			$companystatic->id=$obj->socid;
-			
+			$companystatic->id=$obj->socid;			
 			
 			print '<tr class="oddeven">';
 			print '<td class="nowrap">';
@@ -204,7 +200,6 @@ if ( $resql )
 		print '<table class="noborder" width="100%">';
 		print '<tr class="liste_titre">';
 		print '<th colspan="3">'.$langs->trans("OrdersInProcess").'</th></tr>';
-		$var = True;
 		while ($i < $num)
 		{
 			$obj = $db->fetch_object($resql);
@@ -216,10 +211,9 @@ if ( $resql )
             $orderstatic->facturee=$obj->billed;
 			
             $companystatic->name=$obj->name;
-			$companystatic->id=$obj->socid;
-				
+			$companystatic->id=$obj->socid;				
 			
-			print "<tr ".$bc[$var]."><td>";
+			print '<tr class="oddeven"><td>';
 			print $orderstatic->getNomUrl(1);
 			print '</td>';
 			print '<td>';
@@ -264,16 +258,14 @@ if ($resql)
 		$i = 0;
 		print '<table class="noborder" width="100%">';
 		print '<tr class="liste_titre">';
-		print '<th colspan="3">'.$langs->trans("LastSendings",$num).'</th></tr>';
-		$var = True;
+		print '<th colspan="3">'.$langs->trans("LastSendings", $num).'</th></tr>';
 		while ($i < $num)
 		{
 			$obj = $db->fetch_object($resql);
 		    
 			$shipment->id=$obj->rowid;
 			$shipment->ref=$obj->ref;
-			$shipment->ref_customer=$obj->ref_customer;
-				
+			$shipment->ref_customer=$obj->ref_customer;				
 			
 			print '<tr class="oddeven"><td>';
 			print $shipment->getNomUrl(1);
diff --git a/htdocs/expedition/list.php b/htdocs/expedition/list.php
index bff7991fdeb41ede48cfff29d11511fe2f9c0d26..50454e3f253fbf58df674fcf5faf2483d4e2d900 100644
--- a/htdocs/expedition/list.php
+++ b/htdocs/expedition/list.php
@@ -421,8 +421,8 @@ if ($resql)
 	}
 	// Action column
 	print '<td class="liste_titre" align="middle">';
-	$searchpitco=$form->showFilterAndCheckAddButtons(0);
-	print $searchpitco;
+	$searchpicto=$form->showFilterAndCheckAddButtons(0);
+	print $searchpicto;
     print '</td>';
 	print "</tr>\n";
 
diff --git a/htdocs/expedition/stats/index.php b/htdocs/expedition/stats/index.php
index cccfc0d90a0913bed122676e6825d76a64486a18..53837c76fd1dcb70ac97dd729ee567e1d4d7a829 100644
--- a/htdocs/expedition/stats/index.php
+++ b/htdocs/expedition/stats/index.php
@@ -269,7 +269,6 @@ print '<td align="center">'.$langs->trans("AmountAverage").'</td>';*/
 print '</tr>';
 
 $oldyear=0;
-$var=true;
 foreach ($data as $val)
 {
 	$year = $val['year'];
@@ -278,7 +277,7 @@ foreach ($data as $val)
 		$oldyear--;
 		
 		
-		print '<tr '.$bc[$var].' height="24">';
+		print '<tr class="oddeven" height="24">';
 		print '<td align="center"><a href="'.$_SERVER["PHP_SELF"].'?year='.$oldyear.'&amp;mode='.$mode.'">'.$oldyear.'</a></td>';
 	
 		print '<td align="right">0</td>';
@@ -286,9 +285,8 @@ foreach ($data as $val)
 		print '<td align="right">0</td>';*/
 		print '</tr>';
 	}
-
 	
-	print '<tr '.$bc[$var].' height="24">';
+	print '<tr class="oddeven" height="24">';
 	print '<td align="center">';
 	if ($year) print '<a href="'.$_SERVER["PHP_SELF"].'?year='.$year.'&amp;mode='.$mode.'">'.$year.'</a>';
 	else print $langs->trans("ValidationDateNotDefinedEvenIfShipmentValidated");
diff --git a/htdocs/expensereport/list.php b/htdocs/expensereport/list.php
index 204115d811242407ac7bb6c0adba4296a2e3db73..06998059aa573355a564789daabb111e04cba0e1 100644
--- a/htdocs/expensereport/list.php
+++ b/htdocs/expensereport/list.php
@@ -461,8 +461,8 @@ if ($resql)
 	}
 	// Action column
 	print '<td class="liste_titre" align="middle">';
-	$searchpitco=$form->showFilterButtons();
-	print $searchpitco;
+	$searchpicto=$form->showFilterButtons();
+	print $searchpicto;
 	print '</td>';
 
 	print "</tr>\n";
diff --git a/htdocs/fichinter/list.php b/htdocs/fichinter/list.php
index b5a6bcb0e94b1522a4ede35305e0cf06a4818b2b..9963794fd9ff8b7869f3bf3d7be50b8d4affe309 100644
--- a/htdocs/fichinter/list.php
+++ b/htdocs/fichinter/list.php
@@ -402,8 +402,8 @@ if ($resql)
 		print '</td>';
     }
 	print '<td class="liste_titre" align="right">';
-	$searchpitco=$form->showFilterButtons();
-	print $searchpitco;
+	$searchpicto=$form->showFilterButtons();
+	print $searchpicto;
 	print '</td>';
 	
     print "</tr>\n";
diff --git a/htdocs/fourn/commande/list.php b/htdocs/fourn/commande/list.php
index 80a98cc5886fc39f3ae212e1c9d5b3c18ab47843..8ca86a1e6c591ab75007bc299f6dde758b108a8b 100644
--- a/htdocs/fourn/commande/list.php
+++ b/htdocs/fourn/commande/list.php
@@ -1019,8 +1019,8 @@ if ($resql)
 	}
 	// Action column
 	print '<td class="liste_titre" align="middle">';
-	$searchpitco=$form->showFilterButtons();
-	print $searchpitco;
+	$searchpicto=$form->showFilterButtons();
+	print $searchpicto;
 	print '</td>';
 
 	print "</tr>\n";
diff --git a/htdocs/fourn/facture/card.php b/htdocs/fourn/facture/card.php
index c0851a44b6f2870f8c54c1d23d7cd26d28881bc5..bda155efe880007cf0eb40b340ec389e63889335 100644
--- a/htdocs/fourn/facture/card.php
+++ b/htdocs/fourn/facture/card.php
@@ -8,7 +8,7 @@
  * Copyright (C) 2013-2015	Philippe Grand			<philippe.grand@atoo-net.com>
  * Copyright (C) 2013		Florian Henry			<florian.henry@open-concept.pro>
  * Copyright (C) 2014-2016  Marcos GarcĂ­a			<marcosgdf@gmail.com>
- * Copyright (C) 2016		Alexandre Spangaro		<aspangaro@zendsi.com>
+ * Copyright (C) 2016-2017	Alexandre Spangaro		<aspangaro@zendsi.com>
  *
  * 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
@@ -49,6 +49,7 @@ if (!empty($conf->projet->enabled)) {
 if (!empty($conf->variants->enabled)) {
 	require_once DOL_DOCUMENT_ROOT.'/variants/class/ProductCombination.class.php';
 }
+if (! empty($conf->accounting->enabled)) require_once DOL_DOCUMENT_ROOT . '/accountancy/class/accountingjournal.class.php';
 
 
 $langs->load('bills');
@@ -2317,7 +2318,7 @@ else
     	$sql = 'SELECT p.datep as dp, p.ref, p.num_paiement, p.rowid, p.fk_bank,';
     	$sql.= ' c.id as paiement_type,';
     	$sql.= ' pf.amount,';
-    	$sql.= ' ba.rowid as baid, ba.ref as baref, ba.label';
+    	$sql.= ' ba.rowid as baid, ba.ref as baref, ba.label, ba.number as banumber, ba.account_number, ba.fk_accountancy_journal';
     	$sql.= ' FROM '.MAIN_DB_PREFIX.'paiementfourn as p';
     	$sql.= ' LEFT JOIN '.MAIN_DB_PREFIX.'bank as b ON p.fk_bank = b.rowid';
     	$sql.= ' LEFT JOIN '.MAIN_DB_PREFIX.'bank_account as ba ON b.fk_account = ba.rowid';
@@ -2365,6 +2366,16 @@ else
     	                $bankaccountstatic->id=$objp->baid;
     	                $bankaccountstatic->ref=$objp->baref;
     	                $bankaccountstatic->label=$objp->baref;
+						$bankaccountstatic->number = $objp->banumber;
+
+						if (! empty($conf->accounting->enabled)) {
+							$bankaccountstatic->account_number = $objp->account_number;
+
+							$accountingjournal = new AccountingJournal($db);
+							$accountingjournal->fetch($objp->fk_accountancy_journal);
+							$bankaccountstatic->accountancy_journal = $accountingjournal->getNomUrl(0,1,1,'',1);
+						}
+
     	                print '<td align="right">';
     	                if ($objp->baid > 0) print $bankaccountstatic->getNomUrl(1,'transactions');
     	                print '</td>';
diff --git a/htdocs/fourn/facture/impayees.php b/htdocs/fourn/facture/impayees.php
index 4538351b6ad83b9c2acbac2c09c81521e604cb62..4ade0a6dbb0a3ac5dd84386bb2f01ab7d2c07c10 100644
--- a/htdocs/fourn/facture/impayees.php
+++ b/htdocs/fourn/facture/impayees.php
@@ -216,8 +216,8 @@ if ($user->rights->fournisseur->facture->lire)
 		print '<input class="flat" type="text" size="8" name="search_amount_all_tax" value="'.$search_amount_all_tax.'">';
 		print '</td>';
         print '<td class="liste_titre" align="right">';
-        $searchpitco=$form->showFilterAndCheckAddButtons(0);
-        print $searchpitco;
+        $searchpicto=$form->showFilterAndCheckAddButtons(0);
+        print $searchpicto;
         print '</td>';
 		print "</tr>\n";
 
diff --git a/htdocs/fourn/facture/list.php b/htdocs/fourn/facture/list.php
index 2924a40001a263be5c3f3ad2c31ee5f2d3b5293f..9ad1bf63ce262fac7a9a8744d528a5ce08ce6c54 100644
--- a/htdocs/fourn/facture/list.php
+++ b/htdocs/fourn/facture/list.php
@@ -818,8 +818,8 @@ if ($resql)
 	}
 	// Action column
 	print '<td class="liste_titre" align="middle">';
-	$searchpitco=$form->showFilterButtons('checkforselect', 0);
-	print $searchpitco;
+	$searchpicto=$form->showFilterButtons('checkforselect', 0);
+	print $searchpicto;
 	print '</td>';
 
 	print "</tr>\n";
diff --git a/htdocs/fourn/facture/paiement.php b/htdocs/fourn/facture/paiement.php
index 5f1d8cd2d99f98a7b94c3784e8e3507f0bfbf193..b6825e93d821b1d805af5ab06b143892be2c6c40 100644
--- a/htdocs/fourn/facture/paiement.php
+++ b/htdocs/fourn/facture/paiement.php
@@ -722,8 +722,8 @@ if (empty($action))
         print '<input class="flat" type="text" size="4" name="search_amount" value="'.dol_escape_htmltag($search_amount).'">';
         print '</td>';
         print '<td class="liste_titre" align="right">';
-        $searchpitco=$form->showFilterAndCheckAddButtons(0);
-        print $searchpitco;
+        $searchpicto=$form->showFilterAndCheckAddButtons(0);
+        print $searchpicto;
         print '</td>';
         print "</tr>\n";
 
diff --git a/htdocs/holiday/list.php b/htdocs/holiday/list.php
index ab8a89670ae9fabb37c03704ba125ccc3b87a628..063c3042e3bf4ff87ebd58d5a7999224246d8c07 100644
--- a/htdocs/holiday/list.php
+++ b/htdocs/holiday/list.php
@@ -373,8 +373,8 @@ print '</td>';
 
 // ACTION
 print '<td class="liste_titre" align="right">';
-$searchpitco=$form->showFilterAndCheckAddButtons(0);
-print $searchpitco;
+$searchpicto=$form->showFilterAndCheckAddButtons(0);
+print $searchpicto;
 print '</td>';
 
 print "</tr>\n";
diff --git a/htdocs/modulebuilder/skeletons/skeleton_list.php b/htdocs/modulebuilder/skeletons/skeleton_list.php
index 51158664889dc7a7eadc9d639773ae2f2e837562..205fcf4be8c1e393199283641cd94f6a46f12472 100644
--- a/htdocs/modulebuilder/skeletons/skeleton_list.php
+++ b/htdocs/modulebuilder/skeletons/skeleton_list.php
@@ -420,8 +420,8 @@ if (! empty($arrayfields['t.tms']['checked']))
 }*/
 // Action column
 print '<td class="liste_titre" align="right">';
-$searchpitco=$form->showFilterAndCheckAddButtons($massactionbutton?1:0, 'checkforselect', 1);
-print $searchpitco;
+$searchpicto=$form->showFilterAndCheckAddButtons($massactionbutton?1:0, 'checkforselect', 1);
+print $searchpicto;
 print '</td>';
 print '</tr>'."\n";
     
diff --git a/htdocs/opensurvey/list.php b/htdocs/opensurvey/list.php
index 6f5beaf1277cb8b7c3f6a1130dc3c8d7a0a256b3..636611f91f07938876c6f4e4a1b45c851fd73bd0 100644
--- a/htdocs/opensurvey/list.php
+++ b/htdocs/opensurvey/list.php
@@ -105,8 +105,8 @@ $arraystatus=array(''=>'&nbsp;','expired'=>$langs->trans("Expired"),'opened'=>$l
 print '<td class="liste_titre" align="center">'. $form->selectarray('status', $arraystatus, $status).'</td>';
 print '<td class="liste_titre"></td>';
 print '<td class="liste_titre" align="right">';
-$searchpitco=$form->showFilterAndCheckAddButtons(0);
-print $searchpitco;
+$searchpicto=$form->showFilterAndCheckAddButtons(0);
+print $searchpicto;
 print '</td>';
 print '</tr>'."\n";
 
diff --git a/htdocs/product/canvas/product/tpl/list.tpl.php b/htdocs/product/canvas/product/tpl/list.tpl.php
index ad00d75259e3e742e65372caced6bcd31a03d8fc..db7cac7e51c9fca5b89d21670d330e95e74c5bba 100644
--- a/htdocs/product/canvas/product/tpl/list.tpl.php
+++ b/htdocs/product/canvas/product/tpl/list.tpl.php
@@ -71,8 +71,8 @@
   				<td class="liste_titre" align="<?php echo $searchfield['align']; ?>"><input class="flat" type="text" name="s<?php echo $searchfield['alias']; ?>" value=""></td>
 	<?php } else if ($key == $num) { 
         print '<td class="liste_titre" align="right">';
-        $searchpitco=$form->showFilterAndCheckAddButtons(0);
-        print $searchpitco;
+        $searchpicto=$form->showFilterAndCheckAddButtons(0);
+        print $searchpicto;
         print '</td>';
 	} else { ?>
   			<td class="liste_titre">&nbsp;</td>
diff --git a/htdocs/product/canvas/service/tpl/list.tpl.php b/htdocs/product/canvas/service/tpl/list.tpl.php
index a7efe4f86ba83d5c9f4baed4c8d62aed57e5f650..ee2a894de98256807ef85d564e283787b0460d5d 100644
--- a/htdocs/product/canvas/service/tpl/list.tpl.php
+++ b/htdocs/product/canvas/service/tpl/list.tpl.php
@@ -71,8 +71,8 @@
   				<td class="liste_titre" align="<?php echo $searchfield['align']; ?>"><input class="flat" type="text" name="s<?php echo $searchfield['alias']; ?>" value=""></td>
 	<?php } else if ($key == $num) { 	
         print '<td class="liste_titre" align="right">';
-        $searchpitco=$form->showFilterAndCheckAddButtons(0);
-        print $searchpitco;
+        $searchpicto=$form->showFilterAndCheckAddButtons(0);
+        print $searchpicto;
         print '</td>';
  			} else { ?>
   			<td class="liste_titre">&nbsp;</td>
diff --git a/htdocs/product/list.php b/htdocs/product/list.php
index d9e603c6706d4460c62e7b94c1687fc8155a964d..c957606b66a4c75886c65b5f0eb20b6dbb60deb9 100644
--- a/htdocs/product/list.php
+++ b/htdocs/product/list.php
@@ -611,8 +611,8 @@ else
 	            print '</td>';
     		}
             print '<td class="liste_titre" align="middle">';
-	        $searchpitco=$form->showFilterButtons();
-            print $searchpitco;
+	        $searchpicto=$form->showFilterButtons();
+            print $searchpicto;
             print '</td>';
 
     		print '</tr>';
diff --git a/htdocs/product/price.php b/htdocs/product/price.php
index d3e144b91ca7484485d43f0373ab0d8fc71f0b59..99184b89e72e53d641ae81e63faebcc8f16dd2c1 100644
--- a/htdocs/product/price.php
+++ b/htdocs/product/price.php
@@ -1800,8 +1800,8 @@ if (! empty($conf->global->PRODUIT_CUSTOMER_PRICES))
     		print '<td class="liste_titre" colspan="8">&nbsp;</td>';
     		// Print the search button
             print '<td class="liste_titre" align="right">';
-            $searchpitco=$form->showFilterAndCheckAddButtons(0);
-            print $searchpitco;
+            $searchpicto=$form->showFilterAndCheckAddButtons(0);
+            print $searchpicto;
             print '</td>';
     		print '</tr>';
 		}
diff --git a/htdocs/product/reassort.php b/htdocs/product/reassort.php
index ca335558899154bde1b4b2fdeaddb24d984d8159..a87fecd36b7166f0f80fe8b17baa266754b4e709 100644
--- a/htdocs/product/reassort.php
+++ b/htdocs/product/reassort.php
@@ -276,8 +276,8 @@ if ($resql)
 	print '<td class="liste_titre" colspan="'.$colspan_warehouse.'">&nbsp;</td>';
 	print '<td class="liste_titre"></td>';
 	print '<td class="liste_titre" align="right">';
-   	$searchpitco=$form->showFilterAndCheckAddButtons(0);
-   	print $searchpitco;
+   	$searchpicto=$form->showFilterAndCheckAddButtons(0);
+   	print $searchpicto;
 	print '</td>';
 	print '</tr>';
 
diff --git a/htdocs/product/reassortlot.php b/htdocs/product/reassortlot.php
index 183242c3c52de4fc4b4c611759d9355f63ae4326..660d0e78bd3de3db774b284e452342d801dc3885 100644
--- a/htdocs/product/reassortlot.php
+++ b/htdocs/product/reassortlot.php
@@ -280,8 +280,8 @@ if ($resql)
 	print '<td class="liste_titre">&nbsp;</td>';
     print '<td class="liste_titre">&nbsp;</td>';
     print '<td class="liste_titre" align="right">';
-    $searchpitco=$form->showFilterAndCheckAddButtons(0);
-    print $searchpitco;
+    $searchpicto=$form->showFilterAndCheckAddButtons(0);
+    print $searchpicto;
     print '</td>';
 	print '</tr>';
 
diff --git a/htdocs/product/stock/list.php b/htdocs/product/stock/list.php
index 78b5b612da164d0b6db52efd7e279405288e5187..b3361f0b3289e9ade15aa5d18698cc5b58862d0c 100644
--- a/htdocs/product/stock/list.php
+++ b/htdocs/product/stock/list.php
@@ -168,8 +168,8 @@ if ($result)
 	print '</td>';
 
     print '<td class="liste_titre" align="right">';
-    $searchpitco=$form->showFilterAndCheckAddButtons(0);
-    print $searchpitco;
+    $searchpicto=$form->showFilterAndCheckAddButtons(0);
+    print $searchpicto;
     print '</td>';
 
 	print '</tr>';
diff --git a/htdocs/product/stock/mouvement.php b/htdocs/product/stock/mouvement.php
index 8f512409f030e46e2fbba8298088e87d6c97803d..506ee68e42b6746eacdfefb423ad7b0df7f8ae8e 100644
--- a/htdocs/product/stock/mouvement.php
+++ b/htdocs/product/stock/mouvement.php
@@ -861,8 +861,8 @@ if ($resql)
 	}
     // Actions    
     print '<td class="liste_titre" align="right">';
-    $searchpitco=$form->showFilterAndCheckAddButtons(0);
-    print $searchpitco;
+    $searchpicto=$form->showFilterAndCheckAddButtons(0);
+    print $searchpicto;
     print '</td>';
     print "</tr>\n";
 
diff --git a/htdocs/product/stock/productlot_list.php b/htdocs/product/stock/productlot_list.php
index d8879d1fa28dcf283cc7f84010e4fdee2f60ef8b..df97621c07b36bc56c18caa82c525a49fce875e1 100644
--- a/htdocs/product/stock/productlot_list.php
+++ b/htdocs/product/stock/productlot_list.php
@@ -399,8 +399,8 @@ if ($resql)
      }*/
     // Action column
     print '<td class="liste_titre" align="right">';
-    $searchpitco=$form->showFilterAndCheckAddButtons($massactionbutton?1:0, 'checkforselect', 1);
-    print $searchpitco;
+    $searchpicto=$form->showFilterAndCheckAddButtons($massactionbutton?1:0, 'checkforselect', 1);
+    print $searchpicto;
     print '</td>';
     print '</tr>'."\n";
     
diff --git a/htdocs/product/stock/replenish.php b/htdocs/product/stock/replenish.php
index fabfe736683d7f5b6ac93fd7347aacf3223ed6da..1a3d7c9edb272a2101d3fbce21ca6ef2ba12357c 100644
--- a/htdocs/product/stock/replenish.php
+++ b/htdocs/product/stock/replenish.php
@@ -513,8 +513,8 @@ print '<td class="liste_titre" align="right">' . $langs->trans('AlertOnly') . '&
 print '<td class="liste_titre" align="right">' . $langs->trans('Draft') . '&nbsp;<input type="checkbox" id="draftorder" name="draftorder" ' . (!empty($draftchecked)?$draftchecked:'') . '></td>';
 print '<td class="liste_titre">&nbsp;</td>';
 print '<td class="liste_titre" align="right">';
-$searchpitco=$form->showFilterAndCheckAddButtons(0);
-print $searchpitco;
+$searchpicto=$form->showFilterAndCheckAddButtons(0);
+print $searchpicto;
 print '</td>';
 print '</tr>';
 
diff --git a/htdocs/product/stock/replenishorders.php b/htdocs/product/stock/replenishorders.php
index 8967fd672d6930fd57f5309eeb7e1c0cc599c407..d190c4d704da2567503365da2000086f4d76057e 100644
--- a/htdocs/product/stock/replenishorders.php
+++ b/htdocs/product/stock/replenishorders.php
@@ -179,8 +179,8 @@ if ($resql)
          $form->select_date('', 'search_date', 0, 0, 1, '', 1, 0, 1, 0, '').
          '</td>'.
          '<td class="liste_titre" align="right">';
-         $searchpitco=$form->showFilterAndCheckAddButtons(0);
-         print $searchpitco;
+         $searchpicto=$form->showFilterAndCheckAddButtons(0);
+         print $searchpicto;
          '</td>'.
          '</tr>';
 
diff --git a/htdocs/projet/activity/perday.php b/htdocs/projet/activity/perday.php
index 8a3494213ccc8f519f31944d4cac790614a9cd48..a2b3f1cc667e157aa7eadd62ac3ae73b728ac0b4 100644
--- a/htdocs/projet/activity/perday.php
+++ b/htdocs/projet/activity/perday.php
@@ -421,8 +421,8 @@ print '<td class="liste_titre"></td>';
 print '<td class="liste_titre"></td>';
 // Action column
 print '<td class="liste_titre nowrap" align="right">';
-$searchpitco=$form->showFilterAndCheckAddButtons(0);
-print $searchpitco;
+$searchpicto=$form->showFilterAndCheckAddButtons(0);
+print $searchpicto;
 print '</td>';
 print "</tr>\n";
 
diff --git a/htdocs/projet/activity/perweek.php b/htdocs/projet/activity/perweek.php
index c6949598ade3bdabcfb6fa0a57c4f486b39d0824..da5303511ad76b9742e897ffed6db11d931a59a0 100644
--- a/htdocs/projet/activity/perweek.php
+++ b/htdocs/projet/activity/perweek.php
@@ -417,8 +417,8 @@ for($i=0;$i<7;$i++)
 }
 // Action column
 print '<td class="liste_titre nowrap" align="right">';
-$searchpitco=$form->showFilterAndCheckAddButtons(0);
-print $searchpitco;
+$searchpicto=$form->showFilterAndCheckAddButtons(0);
+print $searchpicto;
 print '</td>';
 print "</tr>\n";
 
diff --git a/htdocs/projet/list.php b/htdocs/projet/list.php
index be43315cb85009458b34bbd293e49be08bc4e62c..cbf036ef7e3f1a3be2d42b9bfe84c3913f6aeed0 100644
--- a/htdocs/projet/list.php
+++ b/htdocs/projet/list.php
@@ -605,8 +605,8 @@ if (! empty($arrayfields['p.fk_statut']['checked']))
 }
 // Action column
 print '<td class="liste_titre" align="right">';
-$searchpitco=$form->showFilterButtons();
-print $searchpitco;
+$searchpicto=$form->showFilterButtons();
+print $searchpicto;
 print '</td>';
 
 print '</tr>'."\n";
diff --git a/htdocs/projet/tasks.php b/htdocs/projet/tasks.php
index fdeebd0ca69d53a38f260afcde44887552b25f1b..e8a949f3191e1c082c0c89d152dc80a7b83918a6 100644
--- a/htdocs/projet/tasks.php
+++ b/htdocs/projet/tasks.php
@@ -504,8 +504,8 @@ else if ($id > 0 || ! empty($ref))
 
         // Action column
         print '<td class="liste_titre" align="right">';
-        $searchpitco=$form->showFilterButtons();
-        print $searchpitco;
+        $searchpicto=$form->showFilterButtons();
+        print $searchpicto;
         print '</td>';
 	}
 	
diff --git a/htdocs/projet/tasks/list.php b/htdocs/projet/tasks/list.php
index 285aa182206b66f84032a3640930c5ed1efc6fbf..8c9f56f1d949d49f87295fd6ae866bd8bf8fff03 100644
--- a/htdocs/projet/tasks/list.php
+++ b/htdocs/projet/tasks/list.php
@@ -579,8 +579,8 @@ if (! empty($arrayfields['t.tms']['checked']))
 }
 // Action column
 print '<td class="liste_titre" align="right">';
-$searchpitco=$form->showFilterButtons();
-print $searchpitco;
+$searchpicto=$form->showFilterButtons();
+print $searchpicto;
 print '</td>';
 print "</tr>\n";
 
diff --git a/htdocs/projet/tasks/time.php b/htdocs/projet/tasks/time.php
index 0cbe660dd9e296e163c6072d6b358feee303e75d..ddbd59ed11ff65b66debccb22c580937531c95b8 100644
--- a/htdocs/projet/tasks/time.php
+++ b/htdocs/projet/tasks/time.php
@@ -779,8 +779,8 @@ if (($id > 0 || ! empty($ref)) || $projectidforalltimes > 0)
 		print $hookmanager->resPrint;
 		// Action column
 		print '<td class="liste_titre center">';
-		$searchpitco=$form->showFilterAndCheckAddButtons($massactionbutton?1:0, 'checkforselect', 1);
-		print $searchpitco;
+		$searchpicto=$form->showFilterAndCheckAddButtons($massactionbutton?1:0, 'checkforselect', 1);
+		print $searchpicto;
 		print '</td>';
 		print '</tr>'."\n";	
 		
diff --git a/htdocs/resource/list.php b/htdocs/resource/list.php
index 559dbce4b06e25caf292ea98ef70c7af370f248a..c0b58523994b5bb8dd8291034efa33a3b34dd5db 100644
--- a/htdocs/resource/list.php
+++ b/htdocs/resource/list.php
@@ -232,8 +232,8 @@ if (is_array($extrafields->attribute_label) && count($extrafields->attribute_lab
 }
 // Action column
 print '<td class="liste_titre" align="right">';
-$searchpitco=$form->showFilterAndCheckAddButtons(0);
-print $searchpitco;
+$searchpicto=$form->showFilterAndCheckAddButtons(0);
+print $searchpicto;
 print '</td>';
 print "</tr>\n";
 
diff --git a/htdocs/societe/consumption.php b/htdocs/societe/consumption.php
index d0f92bb9c1433f941662107e3f19b5a46af94592..170180919513e3c27b8f76772528f796686d0928 100644
--- a/htdocs/societe/consumption.php
+++ b/htdocs/societe/consumption.php
@@ -388,8 +388,8 @@ if ($sql_select)
     print '<td class="liste_titre" align="center">';
     print '</td>';
     print '<td class="liste_titre" align="right">';
-    $searchpitco=$form->showFilterAndCheckAddButtons(0);
-    print $searchpitco;
+    $searchpicto=$form->showFilterAndCheckAddButtons(0);
+    print $searchpicto;
     print '</td>';
     print '</tr>';
 
diff --git a/htdocs/societe/list.php b/htdocs/societe/list.php
index 421e9bc30956d31448566e5b2af8ed2cecc8fe04..4670036d70be855954ea1ebef4dc36abc72dda25 100644
--- a/htdocs/societe/list.php
+++ b/htdocs/societe/list.php
@@ -866,8 +866,8 @@ if (! empty($arrayfields['s.status']['checked']))
 }
 // Action column
 print '<td class="liste_titre" align="right">';
-$searchpitco=$form->showFilterButtons();
-print $searchpitco;
+$searchpicto=$form->showFilterButtons();
+print $searchpicto;
 print '</td>';
 
 print "</tr>\n";
diff --git a/htdocs/societe/price.php b/htdocs/societe/price.php
index e8dc595c6c3576b4c08980cd792ccaa6fbbb1b3f..952a34a9a5929d15e336914020b2162f9cf3e0ba 100644
--- a/htdocs/societe/price.php
+++ b/htdocs/societe/price.php
@@ -510,8 +510,8 @@ if (! empty($conf->global->PRODUIT_CUSTOMER_PRICES)) {
             print '<td colspan="8">&nbsp;</td>';
             // Print the search button
             print '<td class="liste_titre" align="right">';
-            $searchpitco=$form->showFilterAndCheckAddButtons(0);
-            print $searchpitco;
+            $searchpicto=$form->showFilterAndCheckAddButtons(0);
+            print $searchpicto;
             print '</td>';
             print '</tr>';
         }
diff --git a/htdocs/supplier_proposal/list.php b/htdocs/supplier_proposal/list.php
index efd0ae16647f6769afb0ede82b81619c8fa1a539..56f8df0f8256209f88d04953a90e01a5c4e74047 100644
--- a/htdocs/supplier_proposal/list.php
+++ b/htdocs/supplier_proposal/list.php
@@ -553,8 +553,8 @@ if ($result)
 	print '</td>';
 	// Check boxes
 	print '<td class="liste_titre" align="middle">';
-	$searchpitco=$form->showFilterButtons();
-	print $searchpitco;
+	$searchpicto=$form->showFilterButtons();
+	print $searchpicto;
 	print '</td>';
 
 	print "</tr>\n";
diff --git a/htdocs/user/hierarchy.php b/htdocs/user/hierarchy.php
index ef5380e967845c26aebabc8fe3612308e9ea9ddc..9e7f6583f6e508331005606096b99d865d132b4a 100644
--- a/htdocs/user/hierarchy.php
+++ b/htdocs/user/hierarchy.php
@@ -153,8 +153,8 @@ print '<td class="liste_titre" align="right">';
 print $form->selectarray('search_statut', array('-1'=>'','1'=>$langs->trans('Enabled')),$search_statut);
 print '</td>';
 print '<td class="liste_titre" align="right">';
-$searchpitco=$form->showFilterAndCheckAddButtons(0);
-print $searchpitco;
+$searchpicto=$form->showFilterAndCheckAddButtons(0);
+print $searchpicto;
 print '</td>';
 print '</tr>';
 
diff --git a/htdocs/user/index.php b/htdocs/user/index.php
index 9592eed863f7a8bb27ef8d0e83a314f1f19a6b54..04acb9b56f7666b9088338c9fd697ab72b3fa062 100644
--- a/htdocs/user/index.php
+++ b/htdocs/user/index.php
@@ -419,8 +419,8 @@ if (! empty($arrayfields['u.statut']['checked']))
 }
 // Action column
 print '<td class="liste_titre" align="right">';
-$searchpitco=$form->showFilterAndCheckAddButtons(0);
-print $searchpitco;
+$searchpicto=$form->showFilterAndCheckAddButtons(0);
+print $searchpicto;
 print '</td>';
 
 print "</tr>\n";
diff --git a/htdocs/variants/combinations.php b/htdocs/variants/combinations.php
index 4342b3524789e1a8aeabe27ff83ee1dac6a832d7..76a091ad8a284ecde74b51a88bb8038d5e0cfe70 100644
--- a/htdocs/variants/combinations.php
+++ b/htdocs/variants/combinations.php
@@ -638,8 +638,8 @@ if (! empty($id) || ! empty($ref))
 				<td class="liste_titre"></td>
         		<?php 
         		print '<td class="liste_titre" align="middle">';
-        		$searchpitco=$form->showCheckAddButtons('checkforselect', 1);
-        		print $searchpitco;
+        		$searchpicto=$form->showCheckAddButtons('checkforselect', 1);
+        		print $searchpicto;
         		print '</td>';
                 ?>
 			</tr>