Merge pull request #7292 from frappe/bcornwellmott-patch-1
Add hours to calendar labels
This commit is contained in:
commit
4573029a5e
@ -359,7 +359,8 @@ def get_events(start, end, filters=None):
|
|||||||
conditions = get_conditions(filters)
|
conditions = get_conditions(filters)
|
||||||
return frappe.db.sql("""select `tabTimesheet Detail`.name as name,
|
return frappe.db.sql("""select `tabTimesheet Detail`.name as name,
|
||||||
`tabTimesheet Detail`.docstatus as status, `tabTimesheet Detail`.parent as parent,
|
`tabTimesheet Detail`.docstatus as status, `tabTimesheet Detail`.parent as parent,
|
||||||
from_time as start_date, hours, activity_type, project, to_time as end_date
|
from_time as start_date, hours, activity_type, project, to_time as end_date,
|
||||||
|
CONCAT(`tabTimesheet Detail`.parent, ' (', ROUND(hours,2),' hrs)') as title
|
||||||
from `tabTimesheet Detail`, `tabTimesheet`
|
from `tabTimesheet Detail`, `tabTimesheet`
|
||||||
where `tabTimesheet Detail`.parent = `tabTimesheet`.name
|
where `tabTimesheet Detail`.parent = `tabTimesheet`.name
|
||||||
and `tabTimesheet`.docstatus < 2
|
and `tabTimesheet`.docstatus < 2
|
||||||
|
@ -6,7 +6,8 @@ frappe.views.calendar["Timesheet"] = {
|
|||||||
"id": "name",
|
"id": "name",
|
||||||
"title": "name",
|
"title": "name",
|
||||||
"allDay": "allDay",
|
"allDay": "allDay",
|
||||||
"child_name": "name"
|
"child_name": "name",
|
||||||
|
"title": "title"
|
||||||
},
|
},
|
||||||
style_map: {
|
style_map: {
|
||||||
"0": "info",
|
"0": "info",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user