Welcome, Guest
Username: Password: Remember me

TOPIC: Activity reporting by user

Activity reporting by user 2 weeks 2 days ago #33641

Hi !

Every user uses the agenda to report their activity (visits, calls, etc...).

Now, I would like to get an activity report by user, this can be a weekly or monthly report....for instance for a salesman...

In Agenda/report, it only gives a report of all the activities by all the users...

Any idea on how to get this ?

Thanks for your help

Eric
The administrator has disabled public write access.

Activity reporting by user 2 weeks 1 day ago #33645

  • delcroip
  • delcroip's Avatar
  • OFFLINE
  • Expert Boarder
  • Posts: 108
  • Thank you received: 20
  • Karma: 7
Hi,

a code change is required in the comm/action/rapport/index.php

A quick & durty way is to show only the activity of the connected user:
line 79
$sql = "SELECT count(*) as cc,";
$sql.= " date_format(a.datep, '%m/%Y') as df,";
$sql.= " date_format(a.datep, '%m') as month,";
$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 = ".$user->id.' ';
$sql.= ' AND a.entity IN ('.getEntity('agenda').')';
//$sql.= " AND percent = 100";
$sql.= " GROUP BY year, month, df";
$sql.= " ORDER BY year DESC, month DESC, df DESC";

br
The administrator has disabled public write access.

Activity reporting by user 2 weeks 1 day ago #33646

  • delcroip
  • delcroip's Avatar
  • OFFLINE
  • Expert Boarder
  • Posts: 108
  • Thank you received: 20
  • Karma: 7
hi,

Anyway don't hesitate to create a feature request on the github:https://github.com/Dolibarr/dolibarr/issues

br
The administrator has disabled public write access.
Time to create page: 0.090 seconds