';
@@ -227,12 +229,11 @@ if ($resql)
print '
';
print '';
print ' | ';
- print '
';
- print '';
- if (! empty($_REQUEST['bid'])) print '';
- print '';
- print '';
- print " | \n";
+ print '
';
+ $searchpitco=$form->showFilterAndCheckAddButtons(0);
+ print $searchpitco;
+ print ' | ';
+ print "\n";
// Loop on each record
$total_debit=0;
diff --git a/htdocs/compta/deplacement/list.php b/htdocs/compta/deplacement/list.php
index a5684891ca8..497de98fa72 100644
--- a/htdocs/compta/deplacement/list.php
+++ b/htdocs/compta/deplacement/list.php
@@ -164,9 +164,11 @@ if ($resql)
print '
';
// print '';
print ' | ';
- print '
';
- print '';
- print " | \n";
+ print '
';
+ $searchpitco=$form->showFilterAndCheckAddButtons(0);
+ print $searchpitco;
+ print ' | ';
+ print "\n";
$var=true;
while ($i < min($num,$limit))
diff --git a/htdocs/compta/facture/list.php b/htdocs/compta/facture/list.php
index a680886827a..1c32462b884 100644
--- a/htdocs/compta/facture/list.php
+++ b/htdocs/compta/facture/list.php
@@ -783,9 +783,11 @@ if ($resql)
$liststatus=array('0'=>$langs->trans("BillShortStatusDraft"), '1'=>$langs->trans("BillShortStatusNotPaid"), '2'=>$langs->trans("BillShortStatusPaid"), '3'=>$langs->trans("BillShortStatusCanceled"));
print $form->selectarray('search_status', $liststatus, $search_status, 1);
print '';
- print '
';
- print '';
- print " | \n";
+ print '
';
+ $searchpitco=$form->showFilterAndCheckAddButtons(0);
+ print $searchpitco;
+ print ' | ';
+ print "\n";
if ($num > 0)
{
diff --git a/htdocs/compta/facture/mergepdftool.php b/htdocs/compta/facture/mergepdftool.php
index cff600d3a57..19c1d083018 100644
--- a/htdocs/compta/facture/mergepdftool.php
+++ b/htdocs/compta/facture/mergepdftool.php
@@ -814,17 +814,7 @@ if ($resql)
print_liste_field_titre($langs->trans("Received"),$_SERVER["PHP_SELF"],"am","",$param,'align="right"',$sortfield,$sortorder);
print_liste_field_titre($langs->trans("Rest"),$_SERVER["PHP_SELF"],"","",$param,'align="right"',$sortfield,$sortorder);
print_liste_field_titre($langs->trans("Status"),$_SERVER["PHP_SELF"],"fk_statut,paye,am","",$param,'align="right"',$sortfield,$sortorder);
-
- $searchpitco='
';
- $searchpitco.='
';
- if (empty($mode))
- {
- print_liste_field_titre($searchpitco,$_SERVER["PHP_SELF"],"","",$param,'align="center"',$sortfield,$sortorder);
- }
- else
- {
- print_liste_field_titre($searchpitco,$_SERVER["PHP_SELF"],"","",$param,'align="center"',$sortfield,$sortorder);
- }
+ print_liste_field_titre('',$_SERVER["PHP_SELF"],"","",$param,'align="center"',$sortfield,$sortorder);
print "\n";
// Lignes des champs de filtre
@@ -858,6 +848,8 @@ if ($resql)
print $form->selectarray('filtre', $liststatus, $filter, 1);
print '';
print '
';
+ $searchpitco=$form->showFilterAndCheckAddButtons(0);
+ print $searchpitco;
if (empty($mode))
{
if ($conf->use_javascript_ajax) print ''.$langs->trans("All").' / '.$langs->trans("None").'';
diff --git a/htdocs/compta/paiement/cheque/list.php b/htdocs/compta/paiement/cheque/list.php
index 5e404a76242..2b3a7153793 100644
--- a/htdocs/compta/paiement/cheque/list.php
+++ b/htdocs/compta/paiement/cheque/list.php
@@ -151,9 +151,11 @@ if ($resql)
print ' | ';
print '';
print ' | ';
- print '
';
- print '';
- print " | \n";
+ print '
';
+ $searchpitco=$form->showFilterAndCheckAddButtons(0);
+ print $searchpitco;
+ print ' | ';
+ print "\n";
if ($num > 0)
{
diff --git a/htdocs/compta/paiement/list.php b/htdocs/compta/paiement/list.php
index 8ad94817699..33576328786 100644
--- a/htdocs/compta/paiement/list.php
+++ b/htdocs/compta/paiement/list.php
@@ -257,9 +257,10 @@ if ($resql)
print '';
print '
';
print '';
- print ' | ';
- print '';
- print '';
+ print ' | ';
+ print '
';
+ $searchpitco=$form->showFilterAndCheckAddButtons(0);
+ print $searchpitco;
print ' | ';
if (! empty($conf->global->BILL_ADD_PAYMENT_VALIDATION))
{
diff --git a/htdocs/compta/prelevement/list.php b/htdocs/compta/prelevement/list.php
index d0c6792a785..e7cef1a50ad 100644
--- a/htdocs/compta/prelevement/list.php
+++ b/htdocs/compta/prelevement/list.php
@@ -114,6 +114,7 @@ if ($result)
print_barre_liste($langs->trans("WithdrawalsLines"), $page, $_SERVER["PHP_SELF"], $urladd, $sortfield, $sortorder, '', $num);
print"\n\n";
+ print '
';
+
$db->free($result);
}
else
diff --git a/htdocs/compta/salaries/index.php b/htdocs/compta/salaries/index.php
index 52f1938a857..18554f30de8 100644
--- a/htdocs/compta/salaries/index.php
+++ b/htdocs/compta/salaries/index.php
@@ -167,9 +167,12 @@ if ($result)
print '';
// Amount
print '
| ';
- print '
';
- print '';
- print " | \n";
+
+ print '
';
+ $searchpitco=$form->showFilterAndCheckAddButtons(0);
+ print $searchpitco;
+ print ' | ';
+ print "\n";
while ($i < min($num,$limit))
{
diff --git a/htdocs/compta/sociales/index.php b/htdocs/compta/sociales/index.php
index 63c156609c8..2dbb3fd22d7 100644
--- a/htdocs/compta/sociales/index.php
+++ b/htdocs/compta/sociales/index.php
@@ -193,9 +193,12 @@ if ($resql)
print '
| ';
// Status
print '
| ';
- print '
';
- print '';
- print " | \n";
+
+ print '
';
+ $searchpitco=$form->showFilterAndCheckAddButtons(0);
+ print $searchpitco;
+ print ' | ';
+ print "\n";
while ($i < min($num,$limit))
{
diff --git a/htdocs/compta/tva/reglement.php b/htdocs/compta/tva/reglement.php
index 91140bb97ca..3dee569b0ff 100644
--- a/htdocs/compta/tva/reglement.php
+++ b/htdocs/compta/tva/reglement.php
@@ -162,9 +162,12 @@ if ($result)
$form->select_types_paiements($typeid,'typeid','',0,0,1,16);
print '';
print '
| ';
- print '
';
- print '';
- print " | \n";
+
+ print '
';
+ $searchpitco=$form->showFilterAndCheckAddButtons(0);
+ print $searchpitco;
+ print ' | ';
+ print "\n";
while ($i < min($num,$limit))
{
diff --git a/htdocs/contrat/list.php b/htdocs/contrat/list.php
index 040a623fe98..f9e7351ed87 100644
--- a/htdocs/contrat/list.php
+++ b/htdocs/contrat/list.php
@@ -254,11 +254,12 @@ if ($resql)
print '
';
print '';
print '
| ';
- //print '
| ';
- print '
| ';
- print '
';
- print '';
- print " | \n";
+ print '
| ';
+ print '
';
+ $searchpitco=$form->showFilterAndCheckAddButtons(0);
+ print $searchpitco;
+ print ' | ';
+ print "\n";
$var=true;
while ($i < min($num,$limit))
diff --git a/htdocs/contrat/services.php b/htdocs/contrat/services.php
index b7b257ca07a..2f1c3697058 100644
--- a/htdocs/contrat/services.php
+++ b/htdocs/contrat/services.php
@@ -238,9 +238,11 @@ if ($resql)
);
print $form->selectarray('search_status',$arrayofstatus,(strstr($search_status, ',')?-1:$search_status),1);
print '';
- print '
';
- print '';
- print " | \n";
+ print '
';
+ $searchpitco=$form->showFilterAndCheckAddButtons(0);
+ print $searchpitco;
+ print ' | ';
+ print "\n";
$contractstatic=new Contrat($db);
$productstatic=new Product($db);
diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php
index e60883c7149..aac6d0714f2 100644
--- a/htdocs/core/class/html.form.class.php
+++ b/htdocs/core/class/html.form.class.php
@@ -5676,5 +5676,24 @@ class Form
return $out;
}
+ /**
+ * Return HTML to show the search and clear seach button
+ *
+ * @param int $addcheckuncheckall Add the check all uncheck al button
+ * @return string
+ */
+ function showFilterAndCheckAddButtons($addcheckuncheckall=0)
+ {
+ global $langs;
+
+ $out='';
+ $out.='
';
+ if ($addcheckuncheckall)
+ {
+
+ }
+ $out.='
';
+ return $out;
+ }
}
diff --git a/htdocs/don/list.php b/htdocs/don/list.php
index 83e1db184a5..372e60b5f96 100644
--- a/htdocs/don/list.php
+++ b/htdocs/don/list.php
@@ -111,7 +111,7 @@ if (trim($search_name) != '')
{
$sql .= natural_search(array('d.lastname', 'd.firstname'), $search_name);
}
-if ($search_amount) $sql.=" AND d.amount='".$db->escape(price2num(trim($search_amount)))."'";
+if ($search_amount) $sql.= natural_search(array('d.amount'), price2num(trim($search_amount)), 1);
$sql.= $db->order($sortfield,$sortorder);
$sql.= $db->plimit($limit+1, $offset);
@@ -188,9 +188,12 @@ if ($resql)
print '';
}
print '
| ';
- print '
';
- print '';
- print " | \n";
+
+ print '
';
+ $searchpitco=$form->showFilterAndCheckAddButtons(0);
+ print $searchpitco;
+ print ' | ';
+ print "\n";
$var=True;
while ($i < min($num,$limit))
diff --git a/htdocs/expedition/list.php b/htdocs/expedition/list.php
index 4d1764ad0cf..c8dd6445ae2 100644
--- a/htdocs/expedition/list.php
+++ b/htdocs/expedition/list.php
@@ -189,12 +189,10 @@ if ($resql)
print '
';
print $form->selectarray('viewstatut', array('0'=>$langs->trans('StatusSendingDraftShort'),'1'=>$langs->trans('StatusSendingValidatedShort'),'2'=>$langs->trans('StatusSendingProcessedShort')),$viewstatut,1);
print ' | ';
- // Search
- print '
';
- print '';
- print '';
+ print ' | ';
+ $searchpitco=$form->showFilterAndCheckAddButtons(0);
+ print $searchpitco;
print ' | ';
-
print "\n";
$var=True;
diff --git a/htdocs/expensereport/list.php b/htdocs/expensereport/list.php
index efa6572dd10..b7f5be64455 100644
--- a/htdocs/expensereport/list.php
+++ b/htdocs/expensereport/list.php
@@ -265,10 +265,10 @@ if ($resql)
select_expensereport_statut($search_status,'search_status',1,1);
print '';
- print '
';
- print '';
- print '';
- print ' | ';
+ print '
';
+ $searchpitco=$form->showFilterAndCheckAddButtons(0);
+ print $searchpitco;
+ print ' | ';
print "\n";
diff --git a/htdocs/fichinter/list.php b/htdocs/fichinter/list.php
index 74edaf72099..cf40a285996 100644
--- a/htdocs/fichinter/list.php
+++ b/htdocs/fichinter/list.php
@@ -196,9 +196,11 @@ if ($result)
$liststatus=$interventionstatic->statuts_short;
print $form->selectarray('search_status', $liststatus, $search_status, 1, 0, 0, '', 1);
print '';
- print '
';
- print '';
- print " | \n";
+ print '
';
+ $searchpitco=$form->showFilterAndCheckAddButtons(0);
+ print $searchpitco;
+ print ' | ';
+ print "\n";
$companystatic=new Societe($db);
diff --git a/htdocs/fourn/commande/list.php b/htdocs/fourn/commande/list.php
index a3e0d8c9c33..3f4aee09bcd 100644
--- a/htdocs/fourn/commande/list.php
+++ b/htdocs/fourn/commande/list.php
@@ -269,9 +269,11 @@ if ($resql)
print '
';
print $form->selectyesno('billed', $billed, 1, 0, 1);
print ' | ';
- print '
';
- print '';
- print " | \n";
+ print '
';
+ $searchpitco=$form->showFilterAndCheckAddButtons(0);
+ print $searchpitco;
+ print ' | ';
+ print "\n";
$var=true;
diff --git a/htdocs/fourn/commande/orderstoinvoice.php b/htdocs/fourn/commande/orderstoinvoice.php
index d0502ed927a..3f75bca3a35 100644
--- a/htdocs/fourn/commande/orderstoinvoice.php
+++ b/htdocs/fourn/commande/orderstoinvoice.php
@@ -500,7 +500,8 @@ if (($action != 'create' && $action != 'add') && !$error) {
// print '
';
print ' | ';
print '';
-
+ print ' | ';
+
// DATE ORDER
print '
';
print $period;
@@ -512,8 +513,9 @@ if (($action != 'create' && $action != 'add') && !$error) {
print ' | ';
// SEARCH BUTTON
- print '
';
+ print ' | ';
print '';
+ print ' | ';
// ALL/NONE
print '
';
diff --git a/htdocs/fourn/facture/impayees.php b/htdocs/fourn/facture/impayees.php
index ccb6671ba3a..a5ea3b88286 100644
--- a/htdocs/fourn/facture/impayees.php
+++ b/htdocs/fourn/facture/impayees.php
@@ -214,10 +214,12 @@ if ($user->rights->fournisseur->facture->lire)
print '';
print ' | ';
print '';
- print ' | ';
- print '';
- print '';
- print " | \n";
+ print '';
+ print '
';
+ $searchpitco=$form->showFilterAndCheckAddButtons(0);
+ print $searchpitco;
+ print ' | ';
+ print "\n";
if ($num > 0)
{
diff --git a/htdocs/fourn/facture/list.php b/htdocs/fourn/facture/list.php
index 6731c70d328..3c238a2f6f8 100644
--- a/htdocs/fourn/facture/list.php
+++ b/htdocs/fourn/facture/list.php
@@ -332,10 +332,11 @@ if ($resql)
print '
';
$liststatus=array('0'=>$langs->trans("Draft"),'1'=>$langs->trans("Unpaid"), '2'=>$langs->trans("Paid"));
print $form->selectarray('filtre', $liststatus, $search_status, 1);
- print ' | ';
- print '';
- print '';
print ' | ';
+ print '
';
+ $searchpitco=$form->showFilterAndCheckAddButtons(0);
+ print $searchpitco;
+ print ' | ';
print "\n";
$facturestatic=new FactureFournisseur($db);
diff --git a/htdocs/fourn/facture/paiement.php b/htdocs/fourn/facture/paiement.php
index 36f3fc2ffb3..3753001cf23 100644
--- a/htdocs/fourn/facture/paiement.php
+++ b/htdocs/fourn/facture/paiement.php
@@ -564,10 +564,11 @@ if (empty($action))
print '';
print '
';
print '';
- print ' | ';
- print '';
- print '';
- print ' | ';
+ print '';
+ print '
';
+ $searchpitco=$form->showFilterAndCheckAddButtons(0);
+ print $searchpitco;
+ print ' | ';
print "\n";
while ($i < min($num,$limit))
diff --git a/htdocs/holiday/list.php b/htdocs/holiday/list.php
index a92945ce502..3e74c7e14f5 100644
--- a/htdocs/holiday/list.php
+++ b/htdocs/holiday/list.php
@@ -368,9 +368,9 @@ $holiday->selectStatutCP($search_statut);
print '';
// ACTION
-print '
';
-print '';
-print '';
+print ' | ';
+$searchpitco=$form->showFilterAndCheckAddButtons(0);
+print $searchpitco;
print ' | ';
print "\n";
diff --git a/htdocs/loan/calc.php b/htdocs/loan/calc.php
index e73b5e0f255..681d0721f0a 100644
--- a/htdocs/loan/calc.php
+++ b/htdocs/loan/calc.php
@@ -115,6 +115,8 @@ if (! empty($errors)) {
$form_complete = false;
}
+
+
/*
* View
*/
@@ -125,31 +127,34 @@ print load_fiche_titre($langs->trans("LoanCalc"));
print $langs->trans('LoanCalcDesc');
print '