diff --git a/home/page/desktop/desktop.js b/home/page/desktop/desktop.js index c298b68218c..87181d8a98a 100644 --- a/home/page/desktop/desktop.js +++ b/home/page/desktop/desktop.js @@ -23,9 +23,10 @@ erpnext.desktop.render = function() { module.name = m; module.label = wn._(module.label); module.gradient_css = wn.get_gradient_css(module.color, 45); + module._link = module.link.toLowerCase().replace("/", "-"); $module_icon = $(repl('\ -
\
\ \ @@ -84,7 +85,7 @@ erpnext.desktop.show_pending_notifications = function() { add_circle('module-icon-messages', 'unread_messages', 'Unread Messages'); add_circle('module-icon-support-home', 'open_support_tickets', 'Open Support Tickets'); add_circle('module-icon-todo', 'things_todo', 'Things To Do'); - add_circle('module-icon-calendar', 'todays_events', 'Todays Events'); + add_circle('module-icon-calendar-event', 'todays_events', 'Todays Events'); add_circle('module-icon-projects-home', 'open_tasks', 'Open Tasks'); add_circle('module-icon-questions', 'unanswered_questions', 'Unanswered Questions'); add_circle('module-icon-selling-home', 'open_leads', 'Open Leads'); diff --git a/startup/startup.py b/startup/startup.py index c74c5962354..89c0336d176 100644 --- a/startup/startup.py +++ b/startup/startup.py @@ -55,7 +55,7 @@ def get_todays_events(): SELECT COUNT(*) FROM `tabEvent` WHERE owner = %s AND event_type != 'Cancel' - AND event_date = %s""", ( + AND %s between date(starts_on) and date(ends_on)""", ( webnotes.session.user, nowdate())) return todays_events[0][0] diff --git a/stock/doctype/purchase_receipt/purchase_receipt.py b/stock/doctype/purchase_receipt/purchase_receipt.py index 88003ca682d..b2f00a7efc1 100644 --- a/stock/doctype/purchase_receipt/purchase_receipt.py +++ b/stock/doctype/purchase_receipt/purchase_receipt.py @@ -214,7 +214,8 @@ class DocType(BuyingController): def validate_inspection(self): for d in getlist(self.doclist, 'purchase_receipt_details'): #Enter inspection date for all items that require inspection - ins_reqd = sql("select inspection_required from `tabItem` where name = %s", (d.item_code), as_dict = 1) + ins_reqd = sql("select inspection_required from `tabItem` where name = %s", + (d.item_code,), as_dict = 1) ins_reqd = ins_reqd and ins_reqd[0]['inspection_required'] or 'No' if ins_reqd == 'Yes' and not d.qa_no: msgprint("Item: " + d.item_code + " requires QA Inspection. Please enter QA No or report to authorized person to create Quality Inspection") diff --git a/support/doctype/support_ticket/get_support_mails.py b/support/doctype/support_ticket/get_support_mails.py index a91d483200f..d1fe0dc8daf 100644 --- a/support/doctype/support_ticket/get_support_mails.py +++ b/support/doctype/support_ticket/get_support_mails.py @@ -36,6 +36,7 @@ class SupportMailbox(POP3Mailbox): return thread_id = mail.get_thread_id() ticket = None + new_ticket = False if thread_id and webnotes.conn.exists("Support Ticket", thread_id): ticket = webnotes.bean("Support Ticket", thread_id) @@ -52,16 +53,17 @@ class SupportMailbox(POP3Mailbox): "status": "Open" }]) ticket.insert() - - if cint(self.email_settings.send_autoreply): - if "mailer-daemon" not in mail.from_email.lower(): - self.send_auto_reply(ticket.doc) + new_ticket = True mail.save_attachments_in_doc(ticket.doc) make(content=mail.content, sender=mail.from_email, subject = ticket.doc.subject, doctype="Support Ticket", name=ticket.doc.name, lead = ticket.doc.lead, contact=ticket.doc.contact, date=mail.date) + + if new_ticket and cint(self.email_settings.send_autoreply) and \ + "mailer-daemon" not in mail.from_email.lower(): + self.send_auto_reply(ticket.doc) def send_auto_reply(self, d): signature = self.email_settings.fields.get('support_signature') or ''