From 53958f97a526e421c36cd2c6e0d2eba49aef93b1 Mon Sep 17 00:00:00 2001 From: "pawan.sharma" Date: Mon, 28 Mar 2022 14:35:19 +0530 Subject: [PATCH] add condition for divisant 0.0 value --- cor_custom/models/project.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cor_custom/models/project.py b/cor_custom/models/project.py index 0ccbb0f..a333a27 100755 --- a/cor_custom/models/project.py +++ b/cor_custom/models/project.py @@ -140,7 +140,7 @@ class Project(models.Model): ##### CR Changes record.profit_amt = record.actual_revenue - record.consultant_cost - if record.profit_amt > 0: + if record.profit_amt > 0.0 and record.actual_revenue > 0.0: record.profit_per = (record.profit_amt / record.actual_revenue) * 100 ######################## if record.project_type == 'hours_in_consultant' and record.budgeted_hours > 0.0: