ADD - Option Products to buy only
This commit is contained in:
parent
2671bd6433
commit
64bc7a93c3
@ -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 '<input type="checkbox" name="productobuy"'.(!empty($productobuy)?'value="productobuychecked" checked':'' ).'><label for="productobuy">'.$langs->trans("productobuy").'</label>';
|
||||
print '<input type="checkbox" name="productonly"'.(!empty($productonly)?'value="productonlychecked" checked':'' ).'><label for="productonly">'.$langs->trans("productonly").'</label>';
|
||||
print '<input type="checkbox" name="disablelinefree"'.(!empty($disablelinefree)?'value="disablelinefreechecked" checked':'' ).'><label for="disablelinefree">'.$langs->trans("disablelinefree").'</label>';
|
||||
|
||||
|
||||
@ -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.
|
||||
|
||||
Loading…
Reference in New Issue
Block a user