From 912cf53fff5a974f6528f1e27ea933e6806041e5 Mon Sep 17 00:00:00 2001 From: prakash Date: Thu, 28 Apr 2022 12:55:09 +0530 Subject: [PATCH] Revenue report updated --- project_report/report/project_revenue_custom_report.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/project_report/report/project_revenue_custom_report.py b/project_report/report/project_revenue_custom_report.py index 7adae6c..42d811c 100755 --- a/project_report/report/project_revenue_custom_report.py +++ b/project_report/report/project_revenue_custom_report.py @@ -237,10 +237,10 @@ class ProjectRevenueCustomReport(models.Model): actual_cost = line['actual_cost'] if 'pro_hourly_rate' in line: hourly_rate = line['pro_hourly_rate'] - if 'unit_amount' in line and 'pro_hourly_rate' in line: # and 'id' in line + if 'unit_amount' in line and not 'id' in line: # and 'pro_hourly_rate' in line and 'id' in line if hourly_rate != 0: line['actual_revenue'] = hourly_rate * line['unit_amount'] - if 'unit_amount' in line and 'timesheet_cost' in line: + if 'unit_amount' in line and 'timesheet_cost' in line and not 'id' in line: line['actual_cost'] = line['timesheet_cost'] * line['unit_amount'] if 'overall_budgeted_revenue' in line and 'budgeted_hours' in line: if line['budgeted_hours'] > 0: