mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-02-20 13:46:52 +01:00
Modif de la recherche
This commit is contained in:
parent
6cc0c909cb
commit
ca73da2b90
|
|
@ -21,10 +21,6 @@
|
|||
*/
|
||||
require("./pre.inc.php");
|
||||
|
||||
$page = $_GET["page"];
|
||||
$sortorder = $_GET["sortorder"];
|
||||
$sortfield = $_GET["sortfield"];
|
||||
|
||||
llxHeader('','Prélèvements');
|
||||
/*
|
||||
* Sécurité accés client
|
||||
|
|
@ -35,21 +31,17 @@ if ($user->societe_id > 0)
|
|||
$socidp = $user->societe_id;
|
||||
}
|
||||
|
||||
if ($sortorder == "") {
|
||||
$sortorder="DESC";
|
||||
}
|
||||
if ($sortfield == "") {
|
||||
$sortfield="p.datec";
|
||||
}
|
||||
|
||||
/*
|
||||
* Recherche
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
if ($page == -1) { $page = 0 ; }
|
||||
|
||||
$page = $_GET["page"];
|
||||
$sortorder = $_GET["sortorder"];
|
||||
$sortfield = $_GET["sortfield"];
|
||||
if ($sortorder == "") $sortorder="DESC";
|
||||
if ($sortfield == "") $sortfield="p.datec";
|
||||
$offset = $conf->liste_limit * $page ;
|
||||
$pageprev = $page - 1;
|
||||
$pagenext = $page + 1;
|
||||
|
|
@ -70,6 +62,11 @@ $sql .= " , ".MAIN_DB_PREFIX."societe as s";
|
|||
$sql .= " WHERE s.idp = f.fk_soc";
|
||||
$sql .= " AND pf.fk_facture = f.rowid AND pf.fk_prelevement = p.rowid";
|
||||
|
||||
if ($_GET["search_bon"])
|
||||
{
|
||||
$sql .= " AND p.ref LIKE '%".$_GET["search_bon"]."%'";
|
||||
}
|
||||
|
||||
|
||||
if ($_GET["search_societe"])
|
||||
{
|
||||
|
|
@ -77,6 +74,12 @@ if ($_GET["search_societe"])
|
|||
$sql .= " AND s.nom LIKE '%".$sel."%'";
|
||||
}
|
||||
|
||||
if ($_GET["search_facture"])
|
||||
{
|
||||
$sql .= " AND f.facnumber LIKE '%".$_GET["search_facture"]."%'";
|
||||
}
|
||||
|
||||
|
||||
$sql .= " ORDER BY $sortfield $sortorder " . $db->plimit($conf->liste_limit+1, $offset);
|
||||
|
||||
$result = $db->query($sql);
|
||||
|
|
@ -85,7 +88,8 @@ if ($result)
|
|||
$num = $db->num_rows();
|
||||
$i = 0;
|
||||
|
||||
$urladd= "&statut=".$_GET["statut"];
|
||||
$urladd = "&statut=".$_GET["statut"];
|
||||
$urladd .= "&search_bon=".$_GET["search_bon"];
|
||||
|
||||
print_barre_liste("Prélèvements", $page, "liste.php", $urladd, $sortfield, $sortorder, '', $num);
|
||||
print"\n<!-- debut table -->\n";
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user