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

feat: Over time feature #2314

Open
wants to merge 20 commits into
base: develop
Choose a base branch
from
Open

feat: Over time feature #2314

wants to merge 20 commits into from

Conversation

iamejaaz
Copy link
Contributor

@iamejaaz iamejaaz commented Oct 20, 2024

TODO:

  • Write Test Case
  • Add limit of Maximum overtime hours allowed per day

Overtime Type Doctype

  • All the settings will be in this doctype
  • User can define which component to take for Overtime calculation
  • If a user wants to define a different multiplier for weekends or holidays, they can.
  • Overtime Salary Component: User can define the component in which the overtime amount will be added to salary slips.
  • Option to define maximum overtime hours to limit them if the user wants.
    image

Changes in Shift Type Doctype

  • Add one section as Overtime
  • If the "Allow Overtime" checkbox is checked, then the "Overtime Type" field will be visible and the user can select an overtime type.
    image

Attendance Doctype changes

  • Add one section to show Overtime details
  • Overtime Duration: It shows the overtime hours and minutes.
    • Calculation: Overtime Duration = (Total Working Hours - Standard Working Hours)
  • Standard Working Hours: Fetch from Shift type to show the standard working hours of an employee (Out Time - In Time).
  • Overtime Type: Which Overtime Type is applied to this attendance(Link type field for Overtime Type)
    • E.G: If Week off then 1.25 as defined in Overtime Type
    • If Holiday then 1.50 as defined in Overtime type
    • else standard multiplier
      image

Overtime Slip

  • Basic Details of Employee
  • Once the user selects an employee, a from date, and a to date, the overtime details child table will automatically populate and fill in all the overtime details. These details will be fetched from attendance.
  • (pending): We can automate overtime slip creation by adding a button(”Generate Overtime Slip”) to the Shift Type. This button will generate an overtime slip for the entire shift, similar to the "Mark Attendance" button in shift type.
  • Once the overtime slip is approved and submitted, the amount will be automatically added to the salary slip when it is created. A reference to the overtime slip can also be added to the salary component.
    image

Salary slip

image
image

@mohsinalimat
Copy link
Contributor

@iamejaaz Please add docs in todo.

@iamejaaz
Copy link
Contributor Author

Test cases are completed, can I get a review on this PR?
How can I update documentation? Can anyone guide me? There is an option for registration in Frappe docs; do I have to update documentation somewhere else?
image

{
"default": "0",
"fieldname": "actual_overtime_duration",
"fieldtype": "Time",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using Float fieldtype would've been better and easier for calculations

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

image

This field shows the value as time, making it easier for users to understand. A float value, like 9.4, can be confusing. All other overtime fields display the value in the same format.

hrms/hr/doctype/attendance/attendance.py Outdated Show resolved Hide resolved
@ruchamahabal
Copy link
Member

Avoid merge commits like these as long as there are no conflicts - 44c9c53

creates unnecessary noise and can even cause backport failures

@iamejaaz
Copy link
Contributor Author

iamejaaz commented Nov 8, 2024

Hi team, can I get a review on this PR?

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

Successfully merging this pull request may close these issues.

4 participants