-
Notifications
You must be signed in to change notification settings - Fork 7.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: payroll attendance error #23887
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
|
days = frappe.db.sql("""select count(*) from tabHoliday where | ||
parent=%s and holiday_date between %s and %s""", (holiday_list, | ||
self.start_date, self.end_date)) | ||
start_date, self.end_date)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Avoid Query try to use frappe.get_all
or frappe.get_list
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The queries are just to get count, I don't think using frappe.get_all or frappe.get_list is required here.
yeah got this. |
…n/erpnext into fix-payroll-attendance Merge branch 'fix-payroll-attendance' of https://github.com/AfshanKhan/erpnext into fix-payroll-attendance
Steps to replicate:
Create Employee joining July 25
Create attendance for employee from 25th july to 31st july
Run Payroll with attendance for July
Shows error that "Attendance not marked for employee" even when attendance is marked from the date of joining.
Now it considers start date either the "date of joining" or "start date" mentioned on basis of whichever is greater, hench solving this error.