mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-25 16:04:46 +00:00
[event] [minor fixes]
This commit is contained in:
@@ -41,14 +41,10 @@ def get_things_todo():
|
|||||||
|
|
||||||
def get_todays_events():
|
def get_todays_events():
|
||||||
"""Returns a count of todays events in calendar"""
|
"""Returns a count of todays events in calendar"""
|
||||||
|
from core.doctype.event.event import get_events
|
||||||
from webnotes.utils import nowdate
|
from webnotes.utils import nowdate
|
||||||
todays_events = webnotes.conn.sql("""\
|
today = nowdate()
|
||||||
SELECT COUNT(*) FROM `tabEvent`
|
return len(get_events(today, today))
|
||||||
WHERE owner = %s
|
|
||||||
AND event_type != 'Cancel'
|
|
||||||
AND %s between date(starts_on) and date(ends_on)""", (
|
|
||||||
webnotes.session.user, nowdate()))
|
|
||||||
return todays_events[0][0]
|
|
||||||
|
|
||||||
def get_unread_messages():
|
def get_unread_messages():
|
||||||
"returns unread (docstatus-0 messages for a user)"
|
"returns unread (docstatus-0 messages for a user)"
|
||||||
|
|||||||
Reference in New Issue
Block a user