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

refactor: validate attendance in payroll #705

Merged

Conversation

ruchamahabal
Copy link
Member

@ruchamahabal ruchamahabal commented Jul 19, 2023

1. Incorrect message for completely marked attendance Ref Issue

Before:

"Attendance records not found" is a misleading message here. It actually means attendance is already marked and the list is empty.

image

After:

image

2. Employees having 0 attendance records in the month are not flagged at all

Before:

Here, all the employees have unmarked attendance but only 2 are shown (they have some records, others have 0). So they get left out in an inner join query

image

After:

Fetching employee attendance via left join to include employees with 0 records too. All flagged:

image

3. Employees having relieving date in mid-month are also flagged in spite of complete attendance

Before:

Rucha Mahabal is flagged as unmarked attendance. Relieving date (18th July). All attendance records have been marked till the 18th.

image

After:

Not flagged:

image

4. Poor view enhanced

After:

  • Showing the number of unmarked days
  • Pointing to the monthly attendance sheet, where users can check the exact days and then mark attendance.
image

Others:

  • refactor: decoupled functions, better naming, remove unnecessary code
  • test

@codecov-commenter
Copy link

codecov-commenter commented Jul 21, 2023

Codecov Report

Merging #705 (a9a4ed0) into develop (f350529) will increase coverage by 0.31%.
The diff coverage is 94.11%.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop     #705      +/-   ##
===========================================
+ Coverage    72.60%   72.92%   +0.31%     
===========================================
  Files          193      193              
  Lines         9975     9982       +7     
===========================================
+ Hits          7242     7279      +37     
+ Misses        2733     2703      -30     
Impacted Files Coverage Δ
...rms/payroll/doctype/payroll_entry/payroll_entry.py 85.68% <93.93%> (+5.39%) ⬆️
hrms/hr/doctype/shift_type/shift_type.py 94.59% <100.00%> (+1.80%) ⬆️

@ruchamahabal ruchamahabal marked this pull request as ready for review July 21, 2023 12:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

None yet

2 participants