-
Notifications
You must be signed in to change notification settings - Fork 810
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 #2314
Open
iamejaaz
wants to merge
23
commits into
frappe:develop
Choose a base branch
from
iamejaaz:over-time
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
feat: Over time #2314
Changes from 12 commits
Commits
Show all changes
23 commits
Select commit
Hold shift + click to select a range
3e80609
feat: overtime feature
iamejaaz 526163f
feat: update overtime slips on submit and cancel
iamejaaz 622fe24
refactor: add translaction and use list comprehension
iamejaaz 8708272
Merge branch 'develop' into over-time
iamejaaz 1661c0a
Merge branch 'develop' into over-time
iamejaaz dc62310
Merge branch 'develop' into over-time
iamejaaz 6b8f901
Merge branch 'develop' into over-time
iamejaaz 6a66206
feat: add validation for max days allowed
iamejaaz 612f687
test: write overtime slip test case
iamejaaz 42a49b0
test: write test case for salary slip Overtime
iamejaaz 73db262
test: add overtime allowance salary component
iamejaaz 9acdabd
Merge branch 'develop' into over-time
iamejaaz 5da32b5
Merge branch 'develop' into over-time
iamejaaz 7fc5635
Merge branch 'develop' into over-time
iamejaaz be5acd8
Merge branch 'develop' into over-time
iamejaaz 6b6158d
Merge branch 'develop' into over-time
iamejaaz 779e325
refactor: return if maximum OT hours does not exists
iamejaaz fb8d26f
test: fix shift and overtime issue
iamejaaz 44c9c53
Merge branch 'develop' into over-time
iamejaaz 887a13d
refactor: calculate overtime hours dynamically
iamejaaz 173b1c3
refactor: break big fucntion into small function
iamejaaz b800049
refactor: break down set_overtime_types_details into smaller functions
iamejaaz 332849f
Merge branch 'develop' into over-time
iamejaaz File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
{ | ||
"actions": [], | ||
"allow_rename": 1, | ||
"creation": "2024-10-15 16:36:22.056743", | ||
"doctype": "DocType", | ||
"editable_grid": 1, | ||
"engine": "InnoDB", | ||
"field_order": [ | ||
"reference_document_type", | ||
"reference_document", | ||
"date", | ||
"column_break_ilza", | ||
"overtime_type", | ||
"overtime_duration", | ||
"standard_working_hours" | ||
], | ||
"fields": [ | ||
{ | ||
"fieldname": "reference_document_type", | ||
"fieldtype": "Link", | ||
"label": "Reference Document Type", | ||
"options": "DocType", | ||
"reqd": 1 | ||
}, | ||
{ | ||
"fieldname": "reference_document", | ||
"fieldtype": "Dynamic Link", | ||
"in_list_view": 1, | ||
"label": "Reference Document", | ||
"options": "reference_document_type", | ||
"reqd": 1 | ||
}, | ||
{ | ||
"fieldname": "date", | ||
"fieldtype": "Date", | ||
"in_list_view": 1, | ||
"label": "Date", | ||
"reqd": 1 | ||
}, | ||
{ | ||
"fieldname": "column_break_ilza", | ||
"fieldtype": "Column Break" | ||
}, | ||
{ | ||
"fieldname": "overtime_type", | ||
"fieldtype": "Link", | ||
"in_list_view": 1, | ||
"label": "Overtime Type", | ||
"options": "Overtime Type", | ||
"reqd": 1 | ||
}, | ||
{ | ||
"fieldname": "overtime_duration", | ||
"fieldtype": "Data", | ||
"in_list_view": 1, | ||
"label": "Overtime Duration", | ||
"reqd": 1 | ||
}, | ||
{ | ||
"default": "0", | ||
"fieldname": "standard_working_hours", | ||
"fieldtype": "Data", | ||
"label": "Standard Working Hours" | ||
} | ||
], | ||
"index_web_pages_for_search": 1, | ||
"istable": 1, | ||
"links": [], | ||
"modified": "2024-10-27 19:40:06.521102", | ||
"modified_by": "Administrator", | ||
"module": "HR", | ||
"name": "Overtime Details", | ||
"owner": "Administrator", | ||
"permissions": [], | ||
"sort_field": "creation", | ||
"sort_order": "DESC", | ||
"states": [] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# Copyright (c) 2024, Frappe Technologies Pvt. Ltd. and contributors | ||
# For license information, please see license.txt | ||
|
||
# import frappe | ||
from frappe.model.document import Document | ||
|
||
|
||
class OvertimeDetails(Document): | ||
pass |
Empty file.
33 changes: 33 additions & 0 deletions
33
hrms/hr/doctype/overtime_salary_component/overtime_salary_component.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
{ | ||
"actions": [], | ||
"allow_rename": 1, | ||
"creation": "2024-10-13 14:00:52.211875", | ||
"doctype": "DocType", | ||
"editable_grid": 1, | ||
"engine": "InnoDB", | ||
"field_order": [ | ||
"salary_component" | ||
], | ||
"fields": [ | ||
{ | ||
"fieldname": "salary_component", | ||
"fieldtype": "Link", | ||
"in_list_view": 1, | ||
"label": "Salary Component", | ||
"options": "Salary Component", | ||
"reqd": 1 | ||
} | ||
], | ||
"index_web_pages_for_search": 1, | ||
"istable": 1, | ||
"links": [], | ||
"modified": "2024-10-13 14:01:49.333952", | ||
"modified_by": "Administrator", | ||
"module": "HR", | ||
"name": "Overtime Salary Component", | ||
"owner": "Administrator", | ||
"permissions": [], | ||
"sort_field": "creation", | ||
"sort_order": "DESC", | ||
"states": [] | ||
} |
9 changes: 9 additions & 0 deletions
9
hrms/hr/doctype/overtime_salary_component/overtime_salary_component.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# Copyright (c) 2024, Frappe Technologies Pvt. Ltd. and contributors | ||
# For license information, please see license.txt | ||
|
||
# import frappe | ||
from frappe.model.document import Document | ||
|
||
|
||
class OvertimeSalaryComponent(Document): | ||
pass |
Empty file.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Using
Float
fieldtype would've been better and easier for calculationsThere 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.
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.