Grabs title from SQL

Gets a concatenated title label for the Calendar event that includes the number of hours
This commit is contained in:
bcornwellmott 2016-12-21 12:36:45 -08:00 committed by GitHub
parent 3385bd4921
commit e549984a42

View File

@ -356,7 +356,8 @@ def get_events(start, end, filters=None):
conditions = get_conditions(filters)
return frappe.db.sql("""select `tabTimesheet Detail`.name as name,
`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`
where `tabTimesheet Detail`.parent = `tabTimesheet`.name
and `tabTimesheet`.docstatus < 2