diff --git a/htdocs/commande/list_line.php b/htdocs/commande/list_line.php index 4b20250e6de..a569d7a56e1 100644 --- a/htdocs/commande/list_line.php +++ b/htdocs/commande/list_line.php @@ -57,6 +57,7 @@ $show_files = GETPOST('show_files', 'int'); $confirm = GETPOST('confirm', 'alpha'); $toselect = GETPOST('toselect', 'array'); $contextpage = GETPOST('contextpage', 'aZ') ?GETPOST('contextpage', 'aZ') : 'orderlist'; +$productobuy = GETPOST('productobuy', 'alpha'); $productonly = GETPOST('productonly', 'alpha'); $disablelinefree = GETPOST('disablelinefree', 'alpha'); @@ -247,6 +248,7 @@ if (empty($reshook)) { // Purge search criteria if (GETPOST('button_removefilter_x', 'alpha') || GETPOST('button_removefilter.x', 'alpha') || GETPOST('button_removefilter', 'alpha')) { // All tests are required to be compatible with all browsers + $productobuy = ''; $productonly = ''; $disablelinefree = ''; $search_categ = ''; @@ -424,6 +426,9 @@ $sql .= ' WHERE c.fk_soc = s.rowid'; $sql .= ' AND c.entity IN ('.getEntity('commande').')'; $sql .= ' AND cdet.product_type <> 9'; +if (!empty($productobuy)) { + $sql .= " AND pr.tobuy = 1"; +} if (!empty($productonly)) { $sql .= " AND (cdet.product_type = 0 OR cdet.product_type = 1)"; } @@ -842,6 +847,7 @@ if ($resql) { print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'order', 0, $newcardbutton, '', $limit, 0, 0, 1); + print ''; print ''; print ''; diff --git a/htdocs/langs/en_US/orders.lang b/htdocs/langs/en_US/orders.lang index a465fc41ea6..f988cd62f19 100644 --- a/htdocs/langs/en_US/orders.lang +++ b/htdocs/langs/en_US/orders.lang @@ -97,7 +97,8 @@ NumberOfOrdersByMonth=Number of orders by month AmountOfOrdersByMonthHT=Amount of orders by month (excl. tax) ListOfOrders=List of orders ListOrderLigne=Lines of orders -productonly=Lines products only +productobuy=Products to buy only +productonly=Products only disablelinefree=No lines free CloseOrder=Close order ConfirmCloseOrder=Are you sure you want to set this order to delivered? Once an order is delivered, it can be set to billed.