add condition for divisant 0.0 value

This commit is contained in:
pawan.sharma 2022-03-28 14:35:19 +05:30
parent 8820fb9115
commit 53958f97a5
1 changed files with 1 additions and 1 deletions

View File

@ -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: