mirror of
https://github.com/frappe/erpnext.git
synced 2026-02-15 07:35:00 +00:00
Merge pull request #52329 from frappe/mergify/bp/version-15-hotfix/pr-51655
fix: include credit notes in project gross margin calculation (backport #51655)
This commit is contained in:
@@ -308,6 +308,8 @@ class Project(Document):
|
||||
self.gross_margin = flt(self.total_billed_amount) - expense_amount
|
||||
if self.total_billed_amount:
|
||||
self.per_gross_margin = (self.gross_margin / flt(self.total_billed_amount)) * 100
|
||||
else:
|
||||
self.per_gross_margin = 0
|
||||
|
||||
def update_purchase_costing(self):
|
||||
total_purchase_cost = calculate_total_purchase_cost(self.name)
|
||||
|
||||
Reference in New Issue
Block a user