Merge pull request #6343 from PawanMeh/fixes_6195
[fix] #6195
diff --git a/erpnext/projects/doctype/timesheet/timesheet.py b/erpnext/projects/doctype/timesheet/timesheet.py
index 63cb898..31a98d9 100644
--- a/erpnext/projects/doctype/timesheet/timesheet.py
+++ b/erpnext/projects/doctype/timesheet/timesheet.py
@@ -311,7 +311,7 @@
filters = json.loads(filters)
conditions = get_conditions(filters)
- return frappe.db.sql("""select `tabTimesheet Detail`.name as name, `tabTimesheet Detail`.parent as parent,
+ return frappe.db.sql("""select `tabTimesheet Detail`.name as name, `tabTimesheet Detail`.docstatus as status, `tabTimesheet Detail`.parent as parent,
from_time, hours, activity_type, project, to_time from `tabTimesheet Detail`,
`tabTimesheet` where `tabTimesheet Detail`.parent = `tabTimesheet`.name and `tabTimesheet`.docstatus < 2 and
(from_time between %(start)s and %(end)s) {conditions}""".format(conditions=conditions),
diff --git a/erpnext/projects/doctype/timesheet/timesheet_calendar.js b/erpnext/projects/doctype/timesheet/timesheet_calendar.js
index 6db3e5a..a41ba38 100644
--- a/erpnext/projects/doctype/timesheet/timesheet_calendar.js
+++ b/erpnext/projects/doctype/timesheet/timesheet_calendar.js
@@ -8,6 +8,11 @@
"allDay": "allDay",
"child_name": "name"
},
+ style_map: {
+ "0": "info",
+ "1": "standard",
+ "2": "danger"
+ },
gantt: true,
filters: [
{