Skip to content
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

Attendance is applied twice for same employee and same day #1086

Closed
1 task done
sjain17 opened this issue Nov 20, 2023 · 11 comments
Closed
1 task done

Attendance is applied twice for same employee and same day #1086

sjain17 opened this issue Nov 20, 2023 · 11 comments

Comments

@sjain17
Copy link

sjain17 commented Nov 20, 2023

Information about bug

The system is creating multiple attendances for the same day / same employee but different shifts.
The attendance is prepared via Employee Checkin and using mark auto attendance.

See attached screenshot.
Screenshot 2023-11-20 at 6 11 51 PM
Screenshot 2023-11-20 at 6 09 56 PM
Screenshot 2023-11-20 at 6 05 49 PM

Module

HR

Version

ERPNext: v14.48.1 (HEAD)
Frappe Framework: v14.55.0 (HEAD)
Frappe HR: v14.16.1 (HEAD)

Installation method

FrappeCloud

Relevant log output / Stack trace / Full Error Message.

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct
@sjain17 sjain17 added the bug Something isn't working label Nov 20, 2023
@ruchamahabal
Copy link
Member

Its not a bug its a feature

frappe/erpnext#29955

@ruchamahabal
Copy link
Member

Dont assign multiple shifts to the employee on the same day if you dont want to use this feature

@sjain17
Copy link
Author

sjain17 commented Nov 21, 2023

@ruchamahabal I don't think it is a feature. Also, accidentally if someone is assigned with two shifts then the system should not apply present for same day twice. I can understand its a user mistake of assigning two shifts to a single employee but as a product it looks like a bug to the end user and the system should restrict the same.

@ruchamahabal
Copy link
Member

If you don't want to use this feature, you can restrict this by a simple server script validation for now. We will add a feature flag to disable this feature later. The feature is being used by many customers currently

@sjain17
Copy link
Author

sjain17 commented Nov 21, 2023

I can do the server script to stop this but I believe nobody wants confusing attendance and specially if the number of days in a month is 30 and you get 43 attendance is very much like a bug.

@ruchamahabal
Copy link
Member

30 and you get 43 attendance is very much like a bug.

As per standard HR policies, if you work multiple shifts a day, you get paid more so this is via a valid use case. But we understand it does not fit your case.

We will add a feature flag to disable this feature later

As I said we will address this by introducing a feature flag to allow disabling this. We are not denying that we won't do anything about this.

@ruchamahabal ruchamahabal removed the bug Something isn't working label Nov 21, 2023
@sjain17
Copy link
Author

sjain17 commented Nov 21, 2023

As per standard HR policies, if you work multiple shifts a day, you get paid more so this is via a valid use case. But we understand it does not fit your case.

It can't fit into anybody's case. Even if you're working in two shifts the employee will be paid Overtime but not the attendance twice.

@ruchamahabal
Copy link
Member

ruchamahabal commented Nov 21, 2023

It can't fit into anybody's case. Even if you're working two shifts the employee will be paid Overtime but not the attendance twice.

We have government companies who asked for this feature (and are using it) where employees work 2 4-hour shifts (morning & night). They need to calculate and mark attendance per shift so 2 attendance records. Several other HR solutions also provide this feature btw.

@sjain17
Copy link
Author

sjain17 commented Nov 21, 2023

I am okay with the feature, but still not convinced why someone will need a double present for a single day. In fact, when we try to apply attendance via Attendance doctype twice for the same day it provides a validation error.

@ruchamahabal
Copy link
Member

apply attendance via Attendance doctype twice for the same day it provides a validation error.

If it's without any shift it means attendance is for the whole day and hence the validation is thrown.
It also validates and does not allow marking attendance twice on the same day for the same shift or overlapping shifts.

If these three cases are not true meaning attendance is being marked for 2 non-overlapping shifts, the system allows

@luis05282019
Copy link

Hi,

I'm new in ERPnext. I got a problem with attendance check-in check-out with a multiple entry with different timestamp. Can anyone help me solve the below image.
421615479_385541607431525_654969094018880834_n

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants