From 7e8a61eab4ca1bdfe807c0919d420c3b447ab246 Mon Sep 17 00:00:00 2001 From: root Date: Thu, 29 Sep 2022 16:42:40 +0530 Subject: [PATCH] report revert --- .../report/project_revenue_custom_report3.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/project_report/report/project_revenue_custom_report3.py b/project_report/report/project_revenue_custom_report3.py index 536be08..1daa9e3 100644 --- a/project_report/report/project_revenue_custom_report3.py +++ b/project_report/report/project_revenue_custom_report3.py @@ -102,8 +102,8 @@ cons_data1 as ( date_trunc('month', min(PRO_EMP.start_date)) AS min, date_trunc('month', coalesce(max(PRO_EMP.end_date), current_date AT TIME ZONE 'UTC')) AS max, PRO_EMP.start_date as start_date, - PRO_EMP.end_date as end_date, - --coalesce(PRO_EMP.end_date, current_date AT TIME ZONE 'UTC') as end_date, + --PRO_EMP.end_date as end_date, + coalesce(PRO_EMP.end_date, current_date AT TIME ZONE 'UTC') as end_date, PRO_EMP.project_id, PRO_EMP.employee_id, PRO_EMP.role, @@ -443,11 +443,11 @@ SELECT FROM pro_data left join account_analytic_line AAL on AAL.project_id=pro_data.pproject_id left join cons_data1 on cons_data1.project_id=AAL.project_id and cons_data1.employee_id=AAL.employee_id - and (AAL.start_datetime, AAL.end_datetime) OVERLAPS (cons_data1.start_date::date, cons_data1.end_date::date) - --and AAL.start_datetime --at time zone 'utc' at time zone (select tz from res_partner where id=3) - -- >= cons_data1.start_date::date + '00:00:00'::time AT TIME ZONE 'UTC' - --and AAL.end_datetime --at time zone 'utc' at time zone (select tz from res_partner where id=3) - -- <= cons_data1.end_date::date + '23:59:59'::time AT TIME ZONE 'UTC' + --and (AAL.start_datetime, AAL.end_datetime) OVERLAPS (cons_data1.start_date::date, cons_data1.end_date::date) + and AAL.start_datetime --at time zone 'utc' at time zone (select tz from res_partner where id=3) + >= cons_data1.start_date::date + '00:00:00'::time AT TIME ZONE 'UTC' + and AAL.end_datetime --at time zone 'utc' at time zone (select tz from res_partner where id=3) + <= cons_data1.end_date::date + '23:59:59'::time AT TIME ZONE 'UTC' where pro_data.pricing_type='employee_rate' and pro_data.project_type='hours_in_consultant' and COALESCE(pro_data.is_sub_project, FALSE) = False group by