diff --git a/htdocs/comm/propal.php b/htdocs/comm/propal.php index 016cd4b543f..dfdd45cccd9 100644 --- a/htdocs/comm/propal.php +++ b/htdocs/comm/propal.php @@ -829,6 +829,11 @@ if ($_GET["propalid"]) * * ****************************************************************************/ + $sortorder=$_GET["sortorder"]; + $sortfield=$_GET["sortfield"]; + $page=$_GET["page"]; + $viewstatut=$_GET["viewstatut"]; + if ($sortfield == "") { $sortfield="p.datep"; @@ -839,9 +844,9 @@ if ($_GET["propalid"]) } $limit = $conf->liste_limit; - $offset = $limit * $_GET["page"] ; - $pageprev = $_GET["page"] - 1; - $pagenext = $_GET["page"] + 1; + $offset = $limit * $page ; + $pageprev = $page - 1; + $pagenext = $page + 1; $sql = "SELECT s.nom, s.idp, s.client, p.rowid as propalid, p.price, p.ref,".$db->pdate("p.datep")." as dp,".$db->pdate("p.fin_validite")." as dfv, c.label as statut, c.id as statutid"; $sql .= " FROM ".MAIN_DB_PREFIX."societe as s, ".MAIN_DB_PREFIX."propal as p, ".MAIN_DB_PREFIX."c_propalst as c WHERE p.fk_soc = s.idp AND p.fk_statut = c.id"; @@ -876,7 +881,7 @@ if ($_GET["propalid"]) if ( $db->query($sql) ) { $num = $db->num_rows(); - print_barre_liste("Propositions commerciales", $_GET["page"],"propal.php","&socidp=$socidp",$sortfield,$sortorder,'',$num); + print_barre_liste("Propositions commerciales", $page,"propal.php","&socidp=$socidp",$sortfield,$sortorder,'',$num); $i = 0; @@ -884,14 +889,14 @@ if ($_GET["propalid"]) print '