We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents dbbeca6 + a378fee commit 42f2abfCopy full SHA for 42f2abf
1 file changed
erpnext/projects/doctype/project/project.py
@@ -308,6 +308,8 @@ def calculate_gross_margin(self):
308
self.gross_margin = flt(self.total_billed_amount) - expense_amount
309
if self.total_billed_amount:
310
self.per_gross_margin = (self.gross_margin / flt(self.total_billed_amount)) * 100
311
+ else:
312
+ self.per_gross_margin = 0
313
314
def update_purchase_costing(self):
315
total_purchase_cost = calculate_total_purchase_cost(self.name)
0 commit comments