diff --git a/erpnext/hr/doctype/daily_work_summary/daily_work_summary.py b/erpnext/hr/doctype/daily_work_summary/daily_work_summary.py index c01c5b9017..f187286fb8 100644 --- a/erpnext/hr/doctype/daily_work_summary/daily_work_summary.py +++ b/erpnext/hr/doctype/daily_work_summary/daily_work_summary.py @@ -112,6 +112,6 @@ def get_user_emails_from_group(group): if isinstance(group_doc, str): group_doc = frappe.get_doc('Daily Work Summary Group', group) - emails = [d.email for d in group_doc.users if frappe.db.get_value("User", d.email, "enabled")] + emails = [d.email for d in group_doc.users if frappe.db.get_value("User", d.user, "enabled")] return emails diff --git a/erpnext/hr/doctype/leave_application/leave_application.py b/erpnext/hr/doctype/leave_application/leave_application.py index 8e2d64bf6e..469baef0b4 100755 --- a/erpnext/hr/doctype/leave_application/leave_application.py +++ b/erpnext/hr/doctype/leave_application/leave_application.py @@ -127,7 +127,7 @@ class LeaveApplication(Document): frappe.db.sql("""update `tabAttendance` set status = %s, leave_type = %s\ where name = %s""",(status, self.leave_type, d.name)) - elif self.to_date <= nowdate(): + elif getdate(self.to_date) <= getdate(nowdate()): for dt in daterange(getdate(self.from_date), getdate(self.to_date)): date = dt.strftime("%Y-%m-%d") if not date == self.half_day_date: diff --git a/erpnext/hr/doctype/leave_application/leave_application_dashboard.html b/erpnext/hr/doctype/leave_application/leave_application_dashboard.html index 95e74a671a..2385b6ac1c 100644 --- a/erpnext/hr/doctype/leave_application/leave_application_dashboard.html +++ b/erpnext/hr/doctype/leave_application/leave_application_dashboard.html @@ -10,17 +10,16 @@ {{ __("Pending Leaves") }} {{ __("Available Leaves") }} - - + {% for(const [key, value] of Object.entries(data)) { %} {%= key %} - {%= value["total_leaves"] %} - {%= value["leaves_taken"] %} - {%= value["pending_leaves"] %} - {%= value["remaining_leaves"] %} + {%= value["total_leaves"] %} + {%= value["leaves_taken"] %} + {%= value["pending_leaves"] %} + {%= value["remaining_leaves"] %} {% } %}