diff -BNaur --exclude=CVS --exclude='*.patch' --exclude='.#*' --exclude='*~' --exclude='*.rej' --exclude='*.orig' --exclude='*.bak' --exclude=conf.php --exclude=documents langs/fr_FR/projects.lang langs/fr_FR/projects.lang --- langs/fr_FR/projects.lang 2011-01-17 02:46:07.000000000 +0100 +++ langs/fr_FR/projects.lang 2011-04-15 11:30:40.000000000 +0200 @@ -93,3 +93,7 @@ TypeContact_project_task_external_CONTRIBUTOR=Intervenant # Documents models DocumentModelBaleine=Modèle de rapport de projet complet (logo...) + +#TIME GROUP BY PEOPLE +TIME_GROUP_BY_USER=Temps consommés par personne +TIME_LIST_BY_USER=Listing des temps consommés \ No newline at end of file diff -BNaur --exclude=CVS --exclude='*.patch' --exclude='.#*' --exclude='*~' --exclude='*.rej' --exclude='*.orig' --exclude='*.bak' --exclude=conf.php --exclude=documents lib/date.lib.php lib/date.lib.php --- lib/date.lib.php 2011-01-17 02:46:36.000000000 +0100 +++ lib/date.lib.php 2011-04-15 11:30:24.000000000 +0200 @@ -66,9 +66,13 @@ */ function ConvertSecondToTime($iSecond,$format='all',$lengthOfDay=86400) { - global $langs; - - if (empty($lengthOfDay)) $lengthOfDay = 86400; + global $langs,$conf; + + if(isset($conf->global->HOURS_BY_DAY)) { + $lengthOfDay = $conf->global->HOURS_BY_DAY*60*60; + } else { + if (empty($lengthOfDay)) $lengthOfDay = 86400; + } if ($format == 'all') { diff -BNaur --exclude=CVS --exclude='*.patch' --exclude='.#*' --exclude='*~' --exclude='*.rej' --exclude='*.orig' --exclude='*.bak' --exclude=conf.php --exclude=documents projet/tasks/time.php projet/tasks/time.php --- projet/tasks/time.php 2010-08-04 01:24:39.000000000 +0200 +++ projet/tasks/time.php 2011-04-15 11:30:35.000000000 +0200 @@ -294,6 +294,38 @@ dol_print_error($db); } + $users_time = array(); + foreach($tasks as $taskk): + $user_id = $taskk->fk_user; + $users_time[$user_id] += $taskk->task_duration; + endforeach; + + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + foreach($users_time as $key => $user_time): + // User infos from Dolibarr core + $userfee=new User($db); + $userfee->fetch($key); + + $var=!$var; + print ""; + print ''; + print ''; + print ''; + endforeach; + print '
'.$langs->trans("By").''.$langs->trans("TimeSpent").'
'; + print $userfee->getNomUrl(1); + print ''; + print ConvertSecondToTime($user_time,'all'); + print '
'; + + print '
'; + print ''; + print '
'; print ''; print '';