From f800892ec3f92ebc58579e8ec5477358990c8fc9 Mon Sep 17 00:00:00 2001 From: superlack Date: Fri, 24 Feb 2017 12:33:59 -0800 Subject: [PATCH] Update project.py --- erpnext/projects/doctype/project/project.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/erpnext/projects/doctype/project/project.py b/erpnext/projects/doctype/project/project.py index a7446a8dc8..918da46acd 100644 --- a/erpnext/projects/doctype/project/project.py +++ b/erpnext/projects/doctype/project/project.py @@ -178,8 +178,8 @@ class Project(Document): self.total_purchase_cost = total_purchase_cost and total_purchase_cost[0][0] or 0 def update_sales_costing(self): - total_sales_cost = frappe.db.sql("""select sum(base_net_amount) - from `tabSales Order Item` where project = %s and docstatus=1""", self.name) + total_sales_cost = frappe.db.sql("""select sum(total) + from `tabSales Order` where project = %s and docstatus=1""", self.name) self.total_sales_cost = total_sales_cost and total_sales_cost[0][0] or 0