Commit fa5ece05 authored by Frank Bergmann's avatar Frank Bergmann

- fixed "REST My Hours" report

parent cd7ffe6b
...@@ -370,7 +370,9 @@ drop function inline_0 (); ...@@ -370,7 +370,9 @@ drop function inline_0 ();
-- Create freelance report -- Create a report showing all projects into
-- which the %user_id% can log hours.
--
SELECT im_report_new ( SELECT im_report_new (
'REST My Timesheet Projects', -- report_name 'REST My Timesheet Projects', -- report_name
'rest_my_timesheet_projects', -- report_code 'rest_my_timesheet_projects', -- report_code
...@@ -408,3 +410,35 @@ child projects. ...@@ -408,3 +410,35 @@ child projects.
' '
where report_code = 'rest_my_timesheet_projects'; where report_code = 'rest_my_timesheet_projects';
-- Create a report showing all hours logged by
-- the current user today.
--
SELECT im_report_new (
'REST My Hours', -- report_name
'rest_my_hours', -- report_code
'intranet-rest', -- package_key
110, -- report_sort_order
(select menu_id from im_menus where label = 'reporting-rest'), -- parent_menu_id
'
select h.*
from im_hours h
where h.user_id = %user_id% and
h.day = now()::date
'
);
update im_reports
set report_description = '
Returns all hours logged today by the current user.
'
where report_code = 'rest_my_hours';
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment