mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-26 08:24:47 +00:00
fix: Duplicate Attendance Due Wrong Date format (#20389)
This commit is contained in:
committed by
Nabin Hait
parent
2a3cd7d601
commit
9e3dc25b1c
@@ -13,7 +13,7 @@ class Attendance(Document):
|
|||||||
def validate_duplicate_record(self):
|
def validate_duplicate_record(self):
|
||||||
res = frappe.db.sql("""select name from `tabAttendance` where employee = %s and attendance_date = %s
|
res = frappe.db.sql("""select name from `tabAttendance` where employee = %s and attendance_date = %s
|
||||||
and name != %s and docstatus != 2""",
|
and name != %s and docstatus != 2""",
|
||||||
(self.employee, self.attendance_date, self.name))
|
(self.employee, getdate(self.attendance_date), self.name))
|
||||||
if res:
|
if res:
|
||||||
frappe.throw(_("Attendance for employee {0} is already marked").format(self.employee))
|
frappe.throw(_("Attendance for employee {0} is already marked").format(self.employee))
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user