[minor] fixes #6074;

This commit is contained in:
Rushabh Mehta 2016-08-12 10:36:59 +05:30
parent 730f3e7aba
commit d643f2b249

View File

@ -18,8 +18,10 @@ class Project(Document):
if not self.get('__unsaved') and not self.get("tasks"):
self.load_tasks()
self.set_onload('activity_summary', frappe.db.sql('''select activity_type, sum(hours) as total_hours
from `tabTimesheet Detail` where project=%s group by activity_type order by total_hours desc''', self.name, as_dict=True))
self.set_onload('activity_summary', frappe.db.sql('''select activity_type,
sum(hours) as total_hours
from `tabTimesheet Detail` where project=%s and docstatus < 2 group by activity_type
order by total_hours desc''', self.name, as_dict=True))
def __setup__(self):
self.onload()