mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-06 06:58:27 +00:00
fix: wrong company selected when marking attendance for all employees (#27685)
* fix: wrong company selected when marking attendance for all employees * fix: enable caching for repeated queries of the same employee Co-authored-by: Ankush Menat <ankushmenat@gmail.com> Co-authored-by: Ankush Menat <ankushmenat@gmail.com>
This commit is contained in:
committed by
GitHub
parent
471a8ddce0
commit
b478e72cef
@@ -55,8 +55,7 @@ def mark_employee_attendance(employee_list, status, date, leave_type=None, compa
|
|||||||
else:
|
else:
|
||||||
leave_type = None
|
leave_type = None
|
||||||
|
|
||||||
if not company:
|
company = frappe.db.get_value("Employee", employee['employee'], "Company", cache=True)
|
||||||
company = frappe.db.get_value("Employee", employee['employee'], "Company")
|
|
||||||
|
|
||||||
attendance=frappe.get_doc(dict(
|
attendance=frappe.get_doc(dict(
|
||||||
doctype='Attendance',
|
doctype='Attendance',
|
||||||
@@ -68,4 +67,4 @@ def mark_employee_attendance(employee_list, status, date, leave_type=None, compa
|
|||||||
company=company
|
company=company
|
||||||
))
|
))
|
||||||
attendance.insert()
|
attendance.insert()
|
||||||
attendance.submit()
|
attendance.submit()
|
||||||
Reference in New Issue
Block a user