diff --git a/htdocs/comm/action/index.php b/htdocs/comm/action/index.php index 08e7d071cab28..5be3c9fa4e90b 100644 --- a/htdocs/comm/action/index.php +++ b/htdocs/comm/action/index.php @@ -4,6 +4,7 @@ * Copyright (C) 2004-2011 Laurent Destailleur * Copyright (C) 2005-2011 Regis Houssin * Copyright (C) 2011 Juanjo Menent + * Copyright (C) 2010-2011 Herve Prot * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -280,6 +281,7 @@ $sql.= ', '.MAIN_DB_PREFIX.'user as u'; $sql.= ' WHERE a.fk_action = ca.id'; $sql.= ' AND a.fk_user_author = u.rowid'; +$sql.= ' AND ca.type=1'; // limite aux rendez-vous $sql.= ' AND u.entity in (0,'.$conf->entity.')'; // To limit to entity $sql.= ' AND a.entity = '.$conf->entity; if ($user->societe_id) $sql.= ' AND a.fk_soc = '.$user->societe_id; // To limit to external user company