diff --git a/erpnext/projects/doctype/timesheet/timesheet.py b/erpnext/projects/doctype/timesheet/timesheet.py index 63cb8981d02..31a98d9ec55 100644 --- a/erpnext/projects/doctype/timesheet/timesheet.py +++ b/erpnext/projects/doctype/timesheet/timesheet.py @@ -311,7 +311,7 @@ def get_events(start, end, filters=None): 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 6db3e5aacd4..a41ba38a7be 100644 --- a/erpnext/projects/doctype/timesheet/timesheet_calendar.js +++ b/erpnext/projects/doctype/timesheet/timesheet_calendar.js @@ -8,6 +8,11 @@ frappe.views.calendar["Timesheet"] = { "allDay": "allDay", "child_name": "name" }, + style_map: { + "0": "info", + "1": "standard", + "2": "danger" + }, gantt: true, filters: [ {