From 54da864d9d8022ab75ee38f6c7fba9857cbf55dc Mon Sep 17 00:00:00 2001 From: root Date: Fri, 30 Sep 2022 15:52:02 +0530 Subject: [PATCH] Parent sub project wrong field issue fixed --- .../report/project_revenue_custom_report3.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/project_report/report/project_revenue_custom_report3.py b/project_report/report/project_revenue_custom_report3.py index 1daa9e3..a6ff7c7 100644 --- a/project_report/report/project_revenue_custom_report3.py +++ b/project_report/report/project_revenue_custom_report3.py @@ -472,7 +472,8 @@ data3_sub_project as ( SELECT min(sub_pro_data.pro_sdate) as start_date, max(sub_pro_data.pro_edate) as end_date, - sub_pro_data.parent_project as project_id, + --sub_pro_data.parent_project as project_id, + sub_pro_data.pproject_id as project_id, sub_pro_data.project_active, sub_pro_data.project_type, sub_pro_data.pricing_type, @@ -500,7 +501,7 @@ SELECT where sub_pro_data.pricing_type='employee_rate' and sub_pro_data.project_type='hours_in_consultant' and sub_pro_data.is_sub_project = True group by - sub_pro_data.parent_project, + sub_pro_data.pproject_id, sub_pro_data.project_active, sub_pro_data.project_type, sub_pro_data.parent_project, @@ -515,7 +516,8 @@ UNION SELECT drange_data2.start_date, drange_data2.end_date, - sub_pro_data.parent_project as project_id, + sub_pro_data.pproject_id as project_id, + --sub_pro_data.parent_project as project_id, --drange_data2.project_id, sub_pro_data.project_active, sub_pro_data.project_type, @@ -552,7 +554,8 @@ SELECT group by drange_data2.start_date, drange_data2.end_date, - sub_pro_data.parent_project, + sub_pro_data.pproject_id, + --sub_pro_data.parent_project, drange_data2.employee_id, sub_pro_data.project_active, sub_pro_data.project_type,