Commit Graph

51 Commits

Author SHA1 Message Date
Rucha Mahabal
c5850e3923
Revert "feat: Scheduling Multiple shifts and Auto Attendance" (#30587) 2022-04-06 11:18:47 +05:30
Rucha Mahabal
f208903250
feat: Scheduling Multiple shifts and Auto Attendance (#29955)
* refactor: overlapping shifts validation

- convert raw query to frappe.qb

- check for overlapping timings if dates overlap

- translation friendly error messages with link to overlapping doc

* refactor: consider timeslots in `get_employee_shift`

* fix: handle shift grace overlap while finding current shift

* refactor: handle shifts spanning over 2 different days

* fix: fetching shift on timing boundaries

* refactor: rewrite docstrings and add type hints for functions

* refactor: Allow multiple attendance records creation for different shifts

* feat: auto attendance marking for multiple shifts on the same day

* refactor: mark absent for employees with no attendance

- break down into smaller functions

- make it work with multiple shifts

- this will mark employee as absent per shift, meaning employee can be present for one shift and absent for another on the same day

* chore: sort imports, remove unused imports

* refactor: Monthly Attendance Sheet

- split into smaller functions

- add type hints

- get rid of unnecessary db calls and loops

- add docstrings for functions

* feat: add colors for attendance status to lessen the cognitive load

- legend with colors and full form for status abbreviations

* feat: show shift-wise attendance in monthly attendance sheet

* test: monthly attendance sheet

* style: format code with black

* chore: ignore formatting changes in blame

* test: fetching shifts in Employee Checkins

* fix(test): make holiday list for shift and checkin tests

* fix: tests

* test: shift assignment creation

* fix: attendance fixes

- check half day attendance threshold before absent threshold to avoid half day getting marked as absent

- round working hours to 2 digits for better accuracy

- start and end dates for absent attendance marking

* test: Shift Type with Auto Attendance setup and working

fix test setups

* refactor: Overlapping validation for Shift Request

- commonify time overlap function between request and assignment

- add tests for shift request overlap

* chore: remove unused import

* fix: add validation for overlapping shift attendance

- skip auto attendance in case of overlapping shift attendance record

- this case won't occur in case of shift assignment, since it will not allow overlapping shifts to be assigned

- can happen if manual attendance records are created

* test: validations for duplicate and overlapping shift attendance records

* test: skip auto attendance

* fix: skip validation for overlapping shift attendance if no shift is linked

* test: add holiday related shift and attendance tests

* test: add attendance sheet tests for employee filter, half days

* fix: sider
2022-04-06 10:56:47 +05:30
Ankush Menat
494bd9ef78 style: format code with black 2022-03-28 18:52:46 +05:30
Ankush Menat
84568ac341 chore: imports 2022-03-10 11:20:23 +05:30
Chillar Anand
b1c8a4543d
test: Added test for monthly attendance report (#29989)
Co-authored-by: Rucha Mahabal <ruchamahabal2@gmail.com>
2022-03-09 17:05:00 +05:30
Ankush Menat
6098e92ba9 chore: remove utf-8 compat code 2021-11-05 11:16:29 +05:30
Chillar Anand
915b34391c
chore: Clean up imports (#27302)
* chore: Added isort to pre-commit config

* chore: Sort imports with isort

* chore: Clean up imports with pycln

* chore: Sort imports with isort

* chore: Fix import issues

* chore: Clean up sider issues

* chore: Remove import errors from flake8 ignore list

* chore: Clean up lint issues
2021-09-02 16:44:59 +05:30
Syed Mujeer Hashmi
bcf3f3dd29
fix: Monthly Attendance Sheet Summarized view (#24976)
* fix: Monthly Attendance Sheet Summarized view

This fixes the count of different leave types in the monthly
attendance sheet summarized view.

Signed-off-by: Syed Mujeer Hashmi <mujeerhashmi@4csolutions.in>

* fix: Avoid using raw sql query

Signed-off-by: Syed Mujeer Hashmi <mujeerhashmi@4csolutions.in>

Co-authored-by: Anurag Mishra <32095923+Anurag810@users.noreply.github.com>
2021-05-07 13:34:21 +05:30
Anurag Mishra
5164223b99
fix: error on group by filter (#24587)
Co-authored-by: Afshan <33727827+AfshanKhan@users.noreply.github.com>
2021-02-09 16:22:28 +05:30
Anurag Mishra
ba52dd8ba6
fix: minor payroll_dashboard fixes (#22832)
* fix: minor payroll_dashboard fixes

* Update erpnext/hr/report/monthly_attendance_sheet/monthly_attendance_sheet.js

Co-authored-by: Rucha Mahabal <ruchamahabal2@gmail.com>

Co-authored-by: Nabin Hait <nabinhait@gmail.com>
Co-authored-by: Rucha Mahabal <ruchamahabal2@gmail.com>
2020-08-03 08:57:49 +05:30
Anurag Mishra
9aa0602065
Fix: HR and Payroll Dashboard (#22771)
* Fix: HR and Payroll Dashboard

* fix: requested changes
2020-07-23 12:10:48 +05:30
Anurag Mishra
a7f42f7256
fix: showing wrong record (#21884) 2020-05-25 19:23:17 +05:30
Anurag Mishra
2346353a22
fix: missing parameter (#21802) 2020-05-20 16:14:09 +05:30
Nabin Hait
9d04c06c62 fix: HR dashboard and onboarding 2020-05-20 12:05:03 +05:30
Anurag Mishra
57bfee8ea9 fix: dashboard changes 2020-05-18 13:27:15 +05:30
Anurag Mishra
36aea71fd7 fix: new dashboard and report 2020-05-13 10:47:36 +05:30
Prssanna Desai
d50502ca40
fix: fix get_employee_details query (#21623) 2020-05-06 17:36:48 +05:30
Anurag Mishra
ddcc4fa9b9
Feat: Monthly attendance sheet Enhancements and UI/UX Improvements (#21331)
* refactor: Employee attendance sheet redesign

* feat: Added weekly off status in monthly Attendance sheet

Co-authored-by: Nabin Hait <nabinhait@gmail.com>
2020-05-05 16:08:05 +05:30
Vishal Dhayagude
2e082affc7
fix(HR): Leave application company field made read-only and filter in Monthly attendance sheet (#20912)
* fix(HR): Leave application company field made Readonly

* fix: in monthly report attandance employee filter based on company

* fix: minor typo

* fix: Fetch company from employee

* Update monthly_attendance_sheet.py

Co-authored-by: Nabin Hait <nabinhait@gmail.com>
2020-05-01 18:11:43 +05:30
Rohan Bansal
d64f92cf99 fix: show WFH in monthly attendance sheet report 2020-02-06 17:30:57 +05:30
Vignesh S
4454630549 feat(Auto Attendance): Add grace period
Co-authored-by: Karthikeyan S <skarthikeyan1410@gmail.com>
2019-08-14 13:40:02 +05:30
Rushabh Mehta
708e47aadf optimize(various) 2018-08-08 16:37:31 +05:30
Faris Ansari
9e874af9ba Query report print (#14935)
* QueryReport

- Only print visible columns in report
- Use get_columns_for_print method instead of directly
accessing report.columns

* Query Report

- Replace frappe.query_report_filters_by_name with new API
2018-07-18 09:28:44 +05:30
Shreya Shah
bbee9b6cc4 [Enhancement] Monthly Attendance Report (#13970)
* Update Attendance on Approval of Leave

* Separate out leaves on the basis of its type

* Remove commented code

* Make attendance records if not found

* Fix Codacy

* Replace bad code in attendance.py
2018-05-14 14:30:58 +05:30
Rushabh Mehta
2b87d100fa [fix] https://github.com/frappe/erpnext/issues/10956 2017-09-28 15:21:36 +05:30
Manas Solanki
a854ea00a5 mark holiday in the employee monthly attendance sheet (#10349) 2017-08-10 11:20:58 +05:30
Rohit Waghchaure
e7485150a1 added roles in the report 2017-03-06 14:26:09 +05:30
Kanchan Chauhan
7933eb685c [Enhancement] Attendance Module 2017-01-12 17:24:53 +05:30
Kanchan Chauhan
77aaa70734 [Fix] filters_by_name changed to query_report_filters_by_name 2016-09-20 17:54:07 +05:30
Anand Doshi
c75c1d7e3e [fix] additional fixes after deprecating Fiscal Year 2016-03-11 14:56:19 +05:30
Valmik Jangla
d9cc14ddd5 Removed from Leave Block List and Monthly Attendance List 2016-03-11 13:07:49 +05:30
Valmik Jangla
7ae844f0a0 Minor fix 2016-02-17 15:06:30 +05:30
Valmik Jangla
b7ae1c1076 Inactive employees show up in report 2016-02-17 15:05:35 +05:30
Valmik Jangla
de7e760788 Employees with no attendance show up as blank 2016-02-05 17:46:14 +05:30
Valmik Jangla
8d0ed21c04 Added From and To date to Holiday Report
Changed HD to H in Monthly Attendance Report
2016-02-04 12:18:55 +05:30
Nabin Hait
b6b56453e1 [fix] Get defaults based on doctype or fieldname 2015-12-23 16:37:06 +05:30
Nabin Hait
712b02593a [fix] Month issue fixed in Monthly Attendance Sheet 2015-10-01 12:35:54 +05:30
Tsutomu Mimori
5a0fbff1a3 #3402 2015-07-03 16:08:02 +09:00
Anand Doshi
885e074697 Changed company name from Web Notes to Frappe Technologies 2015-03-03 14:56:43 +05:30
81552433qqcom
951da0ca3d added translations to report py file. 2014-09-12 16:07:12 +05:30
Anand Doshi
ec8240e890 Apply User Permissions optional in Script and Query Reports 2014-06-04 17:48:58 +05:30
Nabin Hait
450d9d72d7 Minor fix in monthly attendance report
Cherry-picked and modified by @anandpdoshi

Conflicts:
	hr/report/monthly_attendance_sheet/monthly_attendance_sheet.py
2014-04-16 15:23:09 +05:30
Pratik Vyas
b52618c142 frappe._ to __ 2014-04-14 16:25:30 +05:30
Rushabh Mehta
0a0f2495a2 frappe/frappe#478, frappe tests pass, .txt renamed to .json 2014-03-31 17:27:06 +05:30
Anand Doshi
40534f076b Changed creation, modified format frappe/frappe#478 2014-03-28 12:46:53 +05:30
Rushabh Mehta
daae743608 frappe/frappe#478 2014-03-27 17:54:18 +05:30
Nabin Hait
73083dc960 Fix related to user_default 2014-03-21 11:26:08 +05:30
Anand Doshi
09a9f4c0c9 Added module to Report doctype 2014-03-07 17:20:22 +05:30
Anand Doshi
e9baaa68e7 Changed frappe.conn to frappe.db 2014-02-26 12:35:33 +05:30
Rushabh Mehta
793ba6bd37 -webnotes +frappe 💥 2014-02-14 15:47:51 +05:30