diff --git a/htdocs/product/list.php b/htdocs/product/list.php index db77e7714f1..ad2e034e3c5 100644 --- a/htdocs/product/list.php +++ b/htdocs/product/list.php @@ -79,6 +79,7 @@ $search_accountancy_code_buy_export = GETPOST("search_accountancy_code_buy_expor $search_finished = GETPOST("search_finished", 'int'); $optioncss = GETPOST('optioncss', 'alpha'); $type = GETPOST("type", "int"); +$search_units = GETPOST('search_units', 'int'); //Show/hide child products if (!empty($conf->variants->enabled) && !empty($conf->global->PRODUIT_ATTRIBUTES_HIDECHILD)) { @@ -299,6 +300,7 @@ if (empty($reshook)) $search_accountancy_code_buy_intra = ''; $search_accountancy_code_buy_export = ''; $search_array_options = array(); + $search_units = ''; } // Mass actions @@ -420,6 +422,7 @@ if ($search_accountancy_code_sell_export) $sql .= natural_search('p.accountancy_ if ($search_accountancy_code_buy) $sql .= natural_search('p.accountancy_code_buy', $search_accountancy_code_buy); if ($search_accountancy_code_buy_intra) $sql .= natural_search('p.accountancy_code_buy_intra', $search_accountancy_code_buy_intra); if ($search_accountancy_code_buy_export) $sql .= natural_search('p.accountancy_code_buy_export', $search_accountancy_code_buy_export); +if(!empty($conf->global->PRODUCT_USE_UNITS) && $search_units) $sql .= natural_search('cu.rowid', $search_units); // Add where from extra fields include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_sql.tpl.php'; @@ -756,6 +759,7 @@ if ($resql) if (!empty($arrayfields['cu.label']['checked'])) { print '