diff --git a/htdocs/comm/action/listactions.php b/htdocs/comm/action/listactions.php
index c330540cb03..53243d0c165 100644
--- a/htdocs/comm/action/listactions.php
+++ b/htdocs/comm/action/listactions.php
@@ -99,6 +99,13 @@ if (! $user->rights->agenda->allactions->read || $filter=='mine') // If no permi
$filterd=$user->id;
}
+// Purge search criteria
+if (GETPOST("button_removefilter"))
+{
+ $datestart='';
+ $dateend='';
+}
+
// Initialize technical object to manage hooks of thirdparties. Note that conf->hooks_modules contains array array
$hookmanager->initHooks(array('agendalist'));
@@ -278,8 +285,7 @@ if ($resql)
//print '
| ';
print ' | ';
print '';
- //print ' ';
- //print '';
+ print '';
print ' | ';
print "\n";
diff --git a/htdocs/comm/propal/list.php b/htdocs/comm/propal/list.php
index 2b8e478d37d..96d633bd834 100644
--- a/htdocs/comm/propal/list.php
+++ b/htdocs/comm/propal/list.php
@@ -323,10 +323,9 @@ if ($result)
$formpropal->selectProposalStatus($viewstatut,1);
print '';
print '';
- print '';
- print ' ';
- print '';
- print ' | ';
+ print '';
+ print '';
+ print '';
print "\n";
$var=true;
diff --git a/htdocs/commande/list.php b/htdocs/commande/list.php
index 84f8e455d11..ea17d895b95 100644
--- a/htdocs/commande/list.php
+++ b/htdocs/commande/list.php
@@ -43,9 +43,9 @@ $orderyear=GETPOST("orderyear","int");
$ordermonth=GETPOST("ordermonth","int");
$deliveryyear=GETPOST("deliveryyear","int");
$deliverymonth=GETPOST("deliverymonth","int");
-$sref=GETPOST('sref','alpha');
-$sref_client=GETPOST('sref_client','alpha');
-$snom=GETPOST('snom','alpha');
+$search_ref=GETPOST('search_ref','alpha');
+$search_ref_customer=GETPOST('search_ref_customer','alpha');
+$search_company=GETPOST('search_company','alpha');
$sall=GETPOST('sall');
$socid=GETPOST('socid','int');
$search_user=GETPOST('search_user','int');
@@ -69,6 +69,20 @@ $limit = $conf->liste_limit;
$viewstatut=GETPOST('viewstatut');
+// Purge search criteria
+if (GETPOST("button_removefilter"))
+{
+ $search_categ='';
+ $search_user='';
+ $search_sale='';
+ $search_ref='';
+ $search_ref_customer='';
+ $search_company='';
+ $orderyear='';
+ $ordermonth='';
+ $deliverymonth='';
+ $deliveryyear='';
+}
// Initialize technical object to manage hooks of thirdparties. Note that conf->hooks_modules contains array array
$hookmanager->initHooks(array('orderlist'));
@@ -81,24 +95,6 @@ $parameters=array('socid'=>$socid);
$reshook=$hookmanager->executeHooks('doActions',$parameters,$object,$action); // Note that $action and $object may have been modified by some hook
if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
-// Do we click on purge search criteria ?
-if (GETPOST("button_removefilter_x"))
-{
- $search_categ='';
- $search_user='';
- $search_sale='';
- $search_ref='';
- $search_refcustomer='';
- $search_societe='';
- $search_montant_ht='';
- $orderyear='';
- $ordermonth='';
- $deliverymonth='';
- $deliveryyear='';
-}
-
-
-
/*
* View
*/
@@ -128,8 +124,8 @@ $sql.= ' WHERE c.fk_soc = s.rowid';
$sql.= ' AND c.entity = '.$conf->entity;
if ($socid) $sql.= ' AND s.rowid = '.$socid;
if (!$user->rights->societe->client->voir && !$socid) $sql.= " AND s.rowid = sc.fk_soc AND sc.fk_user = " .$user->id;
-if ($sref) {
- $sql .= natural_search('c.ref', $sref);
+if ($search_ref) {
+ $sql .= natural_search('c.ref', $search_ref);
}
if ($sall)
{
@@ -188,13 +184,13 @@ else if ($deliveryyear > 0)
{
$sql.= " AND c.date_livraison BETWEEN '".$db->idate(dol_get_first_day($deliveryyear,1,false))."' AND '".$db->idate(dol_get_last_day($deliveryyear,12,false))."'";
}
-if (!empty($snom))
+if (!empty($search_company))
{
- $sql .= natural_search('s.nom', $snom);
+ $sql .= natural_search('s.nom', $search_company);
}
-if (!empty($sref_client))
+if (!empty($search_ref_customer))
{
- $sql.= ' AND c.ref_client LIKE \'%'.$db->escape($sref_client).'%\'';
+ $sql.= ' AND c.ref_client LIKE \'%'.$db->escape($search_ref_customer).'%\'';
}
if ($search_sale > 0) $sql.= " AND s.rowid = sc.fk_soc AND sc.fk_user = " .$search_sale;
if ($search_user > 0)
@@ -246,15 +242,15 @@ if ($resql)
$title.=' - '.$langs->trans('StatusOrderValidated').', '.(empty($conf->expedition->enabled)?'':$langs->trans("StatusOrderSent").', ').$langs->trans('StatusOrderToBill');
$param='&socid='.$socid.'&viewstatut='.$viewstatut;
- if ($ordermonth) $param.='&ordermonth='.$ordermonth;
- if ($orderyear) $param.='&orderyear='.$orderyear;
- if ($deliverymonth) $param.='&deliverymonth='.$deliverymonth;
- if ($deliveryyear) $param.='&deliveryyear='.$deliveryyear;
- if ($sref) $param.='&sref='.$sref;
- if ($snom) $param.='&snom='.$snom;
- if ($sref_client) $param.='&sref_client='.$sref_client;
- if ($search_user > 0) $param.='&search_user='.$search_user;
- if ($search_sale > 0) $param.='&search_sale='.$search_sale;
+ if ($ordermonth) $param.='&ordermonth='.$ordermonth;
+ if ($orderyear) $param.='&orderyear='.$orderyear;
+ if ($deliverymonth) $param.='&deliverymonth='.$deliverymonth;
+ if ($deliveryyear) $param.='&deliveryyear='.$deliveryyear;
+ if ($search_ref) $param.='&search_ref='.$search_ref;
+ if ($search_company) $param.='&search_company='.$search_company;
+ if ($search_ref_customer) $param.='&search_ref_customer='.$search_ref_customer;
+ if ($search_user > 0) $param.='&search_user='.$search_user;
+ if ($search_sale > 0) $param.='&search_sale='.$search_sale;
$num = $db->num_rows($resql);
print_barre_liste($title, $page,$_SERVER["PHP_SELF"],$param,$sortfield,$sortorder,'',$num,$nbtotalofrecords);
@@ -294,33 +290,35 @@ if ($resql)
print_liste_field_titre($langs->trans('Ref'),$_SERVER["PHP_SELF"],'c.ref','',$param,'width="25%"',$sortfield,$sortorder);
print_liste_field_titre($langs->trans('RefCustomerOrder'),$_SERVER["PHP_SELF"],'c.ref_client','',$param,'',$sortfield,$sortorder);
print_liste_field_titre($langs->trans('Company'),$_SERVER["PHP_SELF"],'s.nom','',$param,'',$sortfield,$sortorder);
- print_liste_field_titre($langs->trans('OrderDate'),$_SERVER["PHP_SELF"],'c.date_commande','',$param, 'align="right"',$sortfield,$sortorder);
- print_liste_field_titre($langs->trans('DeliveryDate'),$_SERVER["PHP_SELF"],'c.date_livraison','',$param, 'align="right"',$sortfield,$sortorder);
+ print_liste_field_titre($langs->trans('OrderDate'),$_SERVER["PHP_SELF"],'c.date_commande','',$param, 'align="center"',$sortfield,$sortorder);
+ print_liste_field_titre($langs->trans('DeliveryDate'),$_SERVER["PHP_SELF"],'c.date_livraison','',$param, 'align="center"',$sortfield,$sortorder);
print_liste_field_titre($langs->trans('AmountHT'),$_SERVER["PHP_SELF"],'c.total_ht','',$param, 'align="right"',$sortfield,$sortorder);
print_liste_field_titre($langs->trans('Status'),$_SERVER["PHP_SELF"],'c.fk_statut','',$param,'align="right"',$sortfield,$sortorder);
print '';
+
print '';
print '| ';
- print '';
+ print '';
print ' | ';
print '';
- print '';
+ print '';
print ' | ';
print '';
- print '';
+ print '';
print ' | ';
- print '';
+ print ' | ';
if (! empty($conf->global->MAIN_LIST_FILTER_ON_DAY)) print '';
print '';
$formother->select_year($orderyear?$orderyear:-1,'orderyear',1, 20, 5);
- print ' | ';
+ print ' | ';
if (! empty($conf->global->MAIN_LIST_FILTER_ON_DAY)) print '';
print '';
$formother->select_year($deliveryyear?$deliveryyear:-1,'deliveryyear',1, 20, 5);
- print ' | ';
- print ' | ';
- print '';
- print ' |
';
+ print '';
+ print ' | ';
+ print '';
+ print '';
+ print " | \n";
$var=true;
$total=0;
@@ -443,12 +441,12 @@ if ($resql)
print '';
// Order date
- print '';
+ print ' | ';
print dol_print_date($db->jdate($objp->date_commande), 'day');
print ' | ';
// Delivery date
- print '';
+ print ' | ';
print dol_print_date($db->jdate($objp->date_livraison), 'day');
print ' | ';
diff --git a/htdocs/compta/deplacement/list.php b/htdocs/compta/deplacement/list.php
index da0e3e21dcd..42a6713c1ce 100644
--- a/htdocs/compta/deplacement/list.php
+++ b/htdocs/compta/deplacement/list.php
@@ -115,7 +115,7 @@ if ($month > 0)
}
else if ($year > 0)
{
- $sql.= " AND bc.date_bordereau BETWEEN '".$db->idate(dol_get_first_day($year,1,false))."' AND '".$db->idate(dol_get_last_day($year,12,false))."'";
+ $sql.= " AND d.dated BETWEEN '".$db->idate(dol_get_first_day($year,1,false))."' AND '".$db->idate(dol_get_last_day($year,12,false))."'";
}
$sql.= $db->order($sortfield,$sortorder);
diff --git a/htdocs/contact/list.php b/htdocs/contact/list.php
index a311c87cffc..2e28328085a 100644
--- a/htdocs/contact/list.php
+++ b/htdocs/contact/list.php
@@ -357,7 +357,6 @@ if ($result)
print '';
print '';
print '';
- print ' ';
print '';
print ' | ';
print '';
diff --git a/htdocs/fourn/commande/list.php b/htdocs/fourn/commande/list.php
index 58abe457831..ab0fd08d3f0 100644
--- a/htdocs/fourn/commande/list.php
+++ b/htdocs/fourn/commande/list.php
@@ -39,12 +39,11 @@ $langs->load("sendings");
$search_ref=GETPOST('search_ref');
$search_refsupp=GETPOST('search_refsupp');
-$search_nom=GETPOST('search_nom');
+$search_company=GETPOST('search_company');
$search_user=GETPOST('search_user');
$search_ttc=GETPOST('search_ttc');
$sall=GETPOST('search_all');
$search_status=GETPOST('search_status','int');
-if ($search_status == '') $search_status=-1;
$page = GETPOST('page','int');
$socid = GETPOST('socid','int');
@@ -58,6 +57,18 @@ $orderid = GETPOST('orderid');
if ($user->societe_id) $socid=$user->societe_id;
$result = restrictedArea($user, 'fournisseur', $orderid, '', 'commande');
+// Purge search criteria
+if (GETPOST("button_removefilter"))
+{
+ $search_ref='';
+ $search_refsupp='';
+ $search_company='';
+ $search_user='';
+ $search_ttc='';
+ $search_status='';
+}
+
+if ($search_status == '') $search_status=-1;
/*
* View
@@ -102,9 +113,9 @@ if ($search_ref)
{
$sql .= natural_search('cf.ref', $search_ref);
}
-if ($search_nom)
+if ($search_company)
{
- $sql .= natural_search('s.nom', $search_nom);
+ $sql .= natural_search('s.nom', $search_company);
}
if ($search_user)
{
@@ -154,13 +165,14 @@ if ($resql)
$i = 0;
$param="";
- if ($search_ref) $param.="&search_ref=".$search_ref;
- if ($search_nom) $param.="&search_nom=".$search_nom;
- if ($search_user) $param.="&search_user=".$search_user;
- if ($search_ttc) $param.="&search_ttc=".$search_ttc;
- if ($search_refsupp) $param.="&search_refsupp=".$search_refsupp;
- if ($socid) $param.="&socid=".$socid;
- if ($search_status >= 0) $param.="&search_status=".$search_status;
+ if ($search_ref) $param.="&search_ref=".$search_ref;
+ if ($search_company) $param.="&search_company=".$search_company;
+ if ($search_user) $param.="&search_user=".$search_user;
+ if ($search_ttc) $param.="&search_ttc=".$search_ttc;
+ if ($search_refsupp) $param.="&search_refsupp=".$search_refsupp;
+ if ($socid) $param.="&socid=".$socid;
+ if ($search_status >= 0) $param.="&search_status=".$search_status;
+
print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $nbtotalofrecords);
print '