diff --git a/htdocs/societe/price.php b/htdocs/societe/price.php index dce99d532c5..f9b924c9240 100644 --- a/htdocs/societe/price.php +++ b/htdocs/societe/price.php @@ -42,6 +42,7 @@ $langs->load("companies"); $langs->load("bills"); $action = GETPOST('action', 'alpha'); +$search_prod = GETPOST('search_prod'); // Security check $socid = GETPOST('socid', 'int')?GETPOST('socid', 'int'):GETPOST('id', 'int'); @@ -66,6 +67,11 @@ if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'e if (empty($reshook)) { + if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter.x") || GETPOST("button_removefilter")) // Both test are required to be compatible with all browsers + { + $search_prod = ''; + } + if ($action == 'add_customer_price_confirm' && ! $_POST ["cancel"] && ($user->rights->produit->creer || $user->rights->service->creer)) { $update_child_soc = GETPOST('updatechildprice'); @@ -212,7 +218,6 @@ if (! empty($conf->global->PRODUIT_CUSTOMER_PRICES)) { 't.fk_soc' => $object->id ); - $search_prod = GETPOST('search_prod'); if (! empty($search_prod)) { $filter ['prod.ref'] = $search_prod; } @@ -501,9 +506,8 @@ if (! empty($conf->global->PRODUIT_CUSTOMER_PRICES)) { print '