diff --git a/htdocs/societe/list.php b/htdocs/societe/list.php index 70fe8a2f34f..ab2571bfcfb 100644 --- a/htdocs/societe/list.php +++ b/htdocs/societe/list.php @@ -420,7 +420,7 @@ if (empty($reshook)) { $searchCategorySupplierOperator = 0; $searchCategoryCustomerList = array(); $searchCategorySupplierList = array(); - $search_sale = ''; + $search_sale = array(); $search_barcode = ""; $search_customer_code = ''; $search_supplier_code = ''; @@ -617,7 +617,7 @@ if (!$user->hasRight('fournisseur', 'lire')) { // Force the sales representative if they don't have permissions if (!$user->hasRight('societe', 'client', 'voir') && !$socid) { - $search_sale = $user->id; + $search_sale = array($user->id); } // Search on sale representative if (!empty($search_sale) && $search_sale != '-1') {