add condition for divisant 0.0 value
This commit is contained in:
parent
8820fb9115
commit
53958f97a5
|
@ -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:
|
||||
|
|
Loading…
Reference in New Issue