diff --git a/htdocs/ticket/class/api_tickets.class.php b/htdocs/ticket/class/api_tickets.class.php index 3151f75877b..629eab03d77 100644 --- a/htdocs/ticket/class/api_tickets.class.php +++ b/htdocs/ticket/class/api_tickets.class.php @@ -242,6 +242,7 @@ class Tickets extends DolibarrApi $socid = DolibarrApiAccess::$user->socid; } + $search_sale = null; // If the internal user must only see his customers, force searching by him if (!DolibarrApiAccess::$user->rights->societe->client->voir && !$socid) { $search_sale = DolibarrApiAccess::$user->id;