diff --git a/htdocs/product/reassort.php b/htdocs/product/reassort.php index b1b612d1a39..fe087fd16a3 100644 --- a/htdocs/product/reassort.php +++ b/htdocs/product/reassort.php @@ -92,11 +92,15 @@ if (GETPOST('button_removefilter_x','alpha') || GETPOST('button_removefilter.x', $sref=""; $snom=""; $sall=""; + $tosell=""; + $tobuy=""; $search_sale=""; $search_categ=""; $type=""; $catid=''; $toolowstock=''; + $fourn_id=''; + $sbarcode=''; } @@ -183,6 +187,20 @@ if ($resql) } $texte.=' ('.$langs->trans("Stocks").')'; + $param=''; + if ($limit > 0 && $limit != $conf->liste_limit) $param.='&limit='.$limit; + if ($sall) $param.="&sall=".$sall; + if ($tosell) $param.="&tosell=".$tosell; + if ($tobuy) $param.="&tobuy=".$tobuy; + if ($type) $param.="&type=".$type; + if ($fourn_id) $param.="&fourn_id=".$fourn_id; + if ($snom) $param.="&snom=".$snom; + if ($sref) $param.="&sref=".$sref; + if ($search_sale) $param.="&search_sale=".$search_sale; + if ($search_categ) $param.="&search_categ=".$search_categ; + if ($toolowstock) $param.="&toolowstock=".$toolowstock; + if ($sbarcode) $param.="&sbarcode=".$sbarcode; + if ($catid) $param.="&catid=".$catid; llxHeader("", $texte, $helpurl); @@ -193,14 +211,7 @@ if ($resql) print ''; print ''; - if ($sref || $snom || $sall || GETPOST('search')) - { - print_barre_liste($texte, $page, $_SERVER["PHP_SELF"], "&sref=".$sref."&snom=".$snom."&sall=".$sall."&tosell=".$tosell."&tobuy=".$tobuy.(!empty($search_categ) ? '&search_categ='.$search_categ : '').(!empty($toolowstock) ? '&toolowstock='.$toolowstock : ''), $sortfield, $sortorder,'',$num, $nbtotalofrecords, 'title_products', 0, '', '', $limit); - } - else - { - print_barre_liste($texte, $page, $_SERVER["PHP_SELF"], "&sref=$sref&snom=$snom&fourn_id=$fourn_id".(isset($type)?"&type=$type":"").(!empty($search_categ) ? '&search_categ='.$search_categ : '').(!empty($toolowstock) ? '&toolowstock='.$toolowstock : ''), $sortfield, $sortorder,'',$num, $nbtotalofrecords, 'title_products', 0, '', '', $limit); - } + print_barre_liste($texte, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder,'',$num, $nbtotalofrecords, 'title_products', 0, '', '', $limit); if (! empty($catid)) { @@ -236,14 +247,6 @@ if ($resql) print ''; } - $param=''; - if ($tosell) $param.="&tosell=".$tosell; - if ($tobuy) $param.="&tobuy=".$tobuy; - if ($type) $param.="&type=".$type; - if ($fourn_id) $param.="&fourn_id=".$fourn_id; - if ($snom) $param.="&snom=".$snom; - if ($sref) $param.="&sref=".$sref; - $formProduct = new FormProduct($db); $formProduct->loadWarehouses(); $warehouses_list = $formProduct->cache_warehouses; diff --git a/htdocs/product/reassortlot.php b/htdocs/product/reassortlot.php index e1b6c82c8f3..7cedbcd3981 100644 --- a/htdocs/product/reassortlot.php +++ b/htdocs/product/reassortlot.php @@ -89,6 +89,8 @@ if (GETPOST('button_removefilter_x','alpha') || GETPOST('button_removefilter.x', $sref=""; $snom=""; $sall=""; + $tosell=""; + $tobuy=""; $search_sale=""; $search_categ=""; $type=""; @@ -96,6 +98,8 @@ if (GETPOST('button_removefilter_x','alpha') || GETPOST('button_removefilter.x', $toolowstock=''; $search_batch=''; $search_warehouse=''; + $fourn_id=''; + $sbarcode=''; } @@ -194,6 +198,24 @@ if ($resql) } $texte.=' ('.$langs->trans("StocksByLotSerial").')'; + $param=''; + if ($limit > 0 && $limit != $conf->liste_limit) $param.='&limit='.$limit; + if ($sall) $param.="&sall=".$sall; + if ($tosell) $param.="&tosell=".$tosell; + if ($tobuy) $param.="&tobuy=".$tobuy; + if ($type) $param.="&type=".$type; + if ($fourn_id) $param.="&fourn_id=".$fourn_id; + if ($snom) $param.="&snom=".$snom; + if ($sref) $param.="&sref=".$sref; + if ($search_batch) $param.="&search_batch=".$search_batch; + if ($sbarcode) $param.="&sbarcode=".$sbarcode; + if ($search_warehouse) $param.="&search_warehouse=".$search_warehouse; + if ($catid) $param.="&catid=".$catid; + if ($toolowstock) $param.="&toolowstock=".$toolowstock; + if ($search_sale) $param.="&search_sale=".$search_sale; + if ($search_categ) $param.="&search_categ=".$search_categ; + /*if ($eatby) $param.="&eatby=".$eatby; + if ($sellby) $param.="&sellby=".$sellby;*/ llxHeader("",$title,$helpurl,$texte); @@ -204,14 +226,8 @@ if ($resql) print ''; print ''; - if ($sref || $snom || $sall || GETPOST('search')) - { - print_barre_liste($texte, $page, $_SERVER["PHP_SELF"], "&sref=".$sref."&snom=".$snom."&sall=".$sall."&tosell=".$tosell."&tobuy=".$tobuy, $sortfield, $sortorder,'',$num, $nbtotalofrecords, 'title_products', 0, '', '', $limit); - } - else - { - print_barre_liste($texte, $page, $_SERVER["PHP_SELF"], "&sref=$sref&snom=$snom&fourn_id=$fourn_id".(isset($type)?"&type=$type":""), $sortfield, $sortorder,'',$num, $nbtotalofrecords, 'title_products', 0, '', '', $limit); - } + print_barre_liste($texte, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder,'',$num, $nbtotalofrecords, 'title_products', 0, '', '', $limit); + if (! empty($catid)) { @@ -245,17 +261,6 @@ if ($resql) } - $param=''; - if ($tosell) $param.="&tosell=".$tosell; - if ($tobuy) $param.="&tobuy=".$tobuy; - if ($type) $param.="&type=".$type; - if ($fourn_id) $param.="&fourn_id=".$fourn_id; - if ($snom) $param.="&snom=".$snom; - if ($sref) $param.="&sref=".$sref; - if ($search_batch) $param.="&search_batch=".$search_batch; - /*if ($eatby) $param.="&eatby=".$eatby; - if ($sellby) $param.="&sellby=".$sellby;*/ - print '
'; print '';