#12768 group all no show all inventory

This commit is contained in:
Jonathan 2024-01-17 09:50:06 +01:00
parent f33865542c
commit 0f159e0fce
1 changed files with 9 additions and 0 deletions

View File

@ -890,6 +890,15 @@ function get_data_basic_info_sql($params, $count=false)
if ($params['id_group'] > 0) { if ($params['id_group'] > 0) {
$where .= sprintf(' AND id_grupo = %d', $params['id_group']); $where .= sprintf(' AND id_grupo = %d', $params['id_group']);
} else {
global $config;
$user_groups = implode(',', array_keys(users_get_groups($config['id_user'])));
// Avoid errors if there are no groups.
if (empty($user_groups) === true) {
$user_groups = '"0"';
}
$where .= sprintf(' AND id_grupo IN (%s)', $user_groups);
} }
if ($params['search'] > 0) { if ($params['search'] > 0) {