From ae6523c68463af69948f5edfd18dd524d46c3dff Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 12 Jan 2010 11:01:15 +0000 Subject: [PATCH] Fix: Action was lost if done by first user. --- htdocs/comm/action/rapport/index.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/htdocs/comm/action/rapport/index.php b/htdocs/comm/action/rapport/index.php index d1f4db517cb..24ecbc43ea3 100644 --- a/htdocs/comm/action/rapport/index.php +++ b/htdocs/comm/action/rapport/index.php @@ -75,7 +75,10 @@ $sql.= " date_format(a.datep, '%Y') as year"; $sql.= " FROM ".MAIN_DB_PREFIX."actioncomm as a,"; $sql.= " ".MAIN_DB_PREFIX."user as u"; $sql.= " WHERE a.fk_user_author = u.rowid"; -$sql.= " AND u.entity in (0, ".$conf->entity.")"; +if (! empty($conf->global->MAIN_MODULE_MULTICOMPANY)) +{ + $sql.= " AND u.entity in (0, ".$conf->entity.")"; +} $sql.= " AND percent = 100"; $sql.= " GROUP BY year, month, df"; $sql.= " ORDER BY year DESC, month DESC, df DESC";