-
Notifications
You must be signed in to change notification settings - Fork 810
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add Salary Withholding doctypes
Co-authored-by: Viny Selopal <viny0698@gmail.com> (cherry picked from commit 3024be9)
- Loading branch information
1 parent
5a2dcf2
commit 0987460
Showing
11 changed files
with
354 additions
and
0 deletions.
There are no files selected for viewing
Empty file.
67 changes: 67 additions & 0 deletions
67
.../doctype/payroll_employee_with_released_salary/payroll_employee_with_released_salary.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,67 @@ | ||
{ | ||
"actions": [], | ||
"allow_rename": 1, | ||
"creation": "2024-07-01 07:28:08.620379", | ||
"doctype": "DocType", | ||
"editable_grid": 1, | ||
"engine": "InnoDB", | ||
"field_order": [ | ||
"employee", | ||
"employee_name", | ||
"column_break_yjhn", | ||
"designation", | ||
"department", | ||
"salary_withholding" | ||
], | ||
"fields": [ | ||
{ | ||
"fieldname": "employee", | ||
"fieldtype": "Link", | ||
"in_list_view": 1, | ||
"label": "Employee", | ||
"options": "Employee", | ||
"reqd": 1 | ||
}, | ||
{ | ||
"fieldname": "employee_name", | ||
"fieldtype": "Data", | ||
"in_list_view": 1, | ||
"label": "Employee Name" | ||
}, | ||
{ | ||
"fieldname": "column_break_yjhn", | ||
"fieldtype": "Column Break" | ||
}, | ||
{ | ||
"fieldname": "designation", | ||
"fieldtype": "Data", | ||
"in_list_view": 1, | ||
"label": "Designation" | ||
}, | ||
{ | ||
"fieldname": "department", | ||
"fieldtype": "Data", | ||
"in_list_view": 1, | ||
"label": "Department" | ||
}, | ||
{ | ||
"fieldname": "salary_withholding", | ||
"fieldtype": "Data", | ||
"in_list_view": 1, | ||
"label": "Salary Withholding", | ||
"reqd": 1 | ||
} | ||
], | ||
"index_web_pages_for_search": 1, | ||
"istable": 1, | ||
"links": [], | ||
"modified": "2024-07-01 07:28:08.620379", | ||
"modified_by": "Administrator", | ||
"module": "HR", | ||
"name": "Payroll Employee with Released Salary", | ||
"owner": "Administrator", | ||
"permissions": [], | ||
"sort_field": "creation", | ||
"sort_order": "DESC", | ||
"states": [] | ||
} |
9 changes: 9 additions & 0 deletions
9
...hr/doctype/payroll_employee_with_released_salary/payroll_employee_with_released_salary.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 PayrollEmployeewithReleasedSalary(Document): | ||
pass |
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,8 @@ | ||
// Copyright (c) 2024, Frappe Technologies Pvt. Ltd. and contributors | ||
// For license information, please see license.txt | ||
|
||
frappe.ui.form.on("Salary Withholding", { | ||
refresh(frm) { | ||
|
||
}, | ||
}); |
194 changes: 194 additions & 0 deletions
194
hrms/hr/doctype/salary_withholding/salary_withholding.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,194 @@ | ||
{ | ||
"actions": [], | ||
"autoname": "format:SAL-WTH-{#####}", | ||
"creation": "2024-07-01 07:28:05.514677", | ||
"doctype": "DocType", | ||
"engine": "InnoDB", | ||
"field_order": [ | ||
"section_break_fwuv", | ||
"employee", | ||
"employee_name", | ||
"company", | ||
"payroll_frequency", | ||
"column_break_rhlv", | ||
"number_of_withholding_cycles", | ||
"number_of_withheld_cycles", | ||
"from_date", | ||
"to_date", | ||
"exit_details_section", | ||
"date_of_joining", | ||
"relieving_date", | ||
"amended_from", | ||
"column_break_hdbc", | ||
"reason_for_withholding_salary", | ||
"section_break_xeyl", | ||
"cycles" | ||
], | ||
"fields": [ | ||
{ | ||
"fieldname": "section_break_fwuv", | ||
"fieldtype": "Section Break" | ||
}, | ||
{ | ||
"fieldname": "employee", | ||
"fieldtype": "Link", | ||
"in_standard_filter": 1, | ||
"label": "Employee", | ||
"options": "Employee", | ||
"reqd": 1, | ||
"search_index": 1 | ||
}, | ||
{ | ||
"fetch_from": "employee.employee_name", | ||
"fieldname": "employee_name", | ||
"fieldtype": "Data", | ||
"in_list_view": 1, | ||
"label": "Employee Name", | ||
"read_only": 1 | ||
}, | ||
{ | ||
"fetch_from": "employee.company", | ||
"fieldname": "company", | ||
"fieldtype": "Link", | ||
"in_list_view": 1, | ||
"label": "Company", | ||
"options": "Company", | ||
"read_only": 1 | ||
}, | ||
{ | ||
"fieldname": "payroll_frequency", | ||
"fieldtype": "Data", | ||
"in_standard_filter": 1, | ||
"label": "Payroll Frequency", | ||
"read_only": 1 | ||
}, | ||
{ | ||
"fieldname": "column_break_rhlv", | ||
"fieldtype": "Column Break" | ||
}, | ||
{ | ||
"fieldname": "number_of_withholding_cycles", | ||
"fieldtype": "Int", | ||
"label": "Number of Withholding Cycles", | ||
"non_negative": 1, | ||
"reqd": 1 | ||
}, | ||
{ | ||
"fieldname": "number_of_withheld_cycles", | ||
"fieldtype": "Int", | ||
"label": "Number of Cycles Withheld", | ||
"non_negative": 1, | ||
"read_only": 1 | ||
}, | ||
{ | ||
"fieldname": "from_date", | ||
"fieldtype": "Date", | ||
"label": "From Date" | ||
}, | ||
{ | ||
"fieldname": "to_date", | ||
"fieldtype": "Date", | ||
"label": "To Date" | ||
}, | ||
{ | ||
"depends_on": "doc.relieving_date", | ||
"fieldname": "exit_details_section", | ||
"fieldtype": "Section Break", | ||
"label": "Exit Details" | ||
}, | ||
{ | ||
"fetch_from": "employee.date_of_joining", | ||
"fieldname": "date_of_joining", | ||
"fieldtype": "Date", | ||
"label": "Date of Joining", | ||
"read_only": 1 | ||
}, | ||
{ | ||
"fieldname": "amended_from", | ||
"fieldtype": "Link", | ||
"label": "Amended From", | ||
"no_copy": 1, | ||
"options": "Salary Withholding", | ||
"print_hide": 1, | ||
"read_only": 1, | ||
"search_index": 1 | ||
}, | ||
{ | ||
"fieldname": "column_break_hdbc", | ||
"fieldtype": "Column Break" | ||
}, | ||
{ | ||
"fieldname": "reason_for_withholding_salary", | ||
"fieldtype": "Small Text", | ||
"label": "Reason for Withholding Salary" | ||
}, | ||
{ | ||
"fieldname": "section_break_xeyl", | ||
"fieldtype": "Section Break" | ||
}, | ||
{ | ||
"fieldname": "cycles", | ||
"fieldtype": "Table", | ||
"label": "Cycles", | ||
"options": "Salary Withholding Cycle" | ||
}, | ||
{ | ||
"fetch_from": "employee.relieving_date", | ||
"fieldname": "relieving_date", | ||
"fieldtype": "Date", | ||
"in_list_view": 1, | ||
"label": "Relieving Date", | ||
"read_only": 1 | ||
} | ||
], | ||
"index_web_pages_for_search": 1, | ||
"is_submittable": 1, | ||
"links": [], | ||
"modified": "2024-07-01 07:39:46.155042", | ||
"modified_by": "Administrator", | ||
"module": "HR", | ||
"name": "Salary Withholding", | ||
"naming_rule": "Expression", | ||
"owner": "Administrator", | ||
"permissions": [ | ||
{ | ||
"create": 1, | ||
"delete": 1, | ||
"email": 1, | ||
"export": 1, | ||
"print": 1, | ||
"read": 1, | ||
"report": 1, | ||
"role": "System Manager", | ||
"share": 1, | ||
"submit": 1, | ||
"write": 1 | ||
}, | ||
{ | ||
"cancel": 1, | ||
"create": 1, | ||
"delete": 1, | ||
"email": 1, | ||
"export": 1, | ||
"print": 1, | ||
"read": 1, | ||
"report": 1, | ||
"role": "HR Manager", | ||
"share": 1, | ||
"submit": 1, | ||
"write": 1 | ||
}, | ||
{ | ||
"export": 1, | ||
"print": 1, | ||
"read": 1, | ||
"report": 1, | ||
"role": "Employee", | ||
"share": 1 | ||
} | ||
], | ||
"sort_field": "creation", | ||
"sort_order": "DESC", | ||
"states": [], | ||
"title_field": "employee_name" | ||
} |
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 SalaryWithholding(Document): | ||
pass |
9 changes: 9 additions & 0 deletions
9
hrms/hr/doctype/salary_withholding/test_salary_withholding.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 | ||
# See license.txt | ||
|
||
# import frappe | ||
from frappe.tests.utils import FrappeTestCase | ||
|
||
|
||
class TestSalaryWithholding(FrappeTestCase): | ||
pass |
Empty file.
49 changes: 49 additions & 0 deletions
49
hrms/hr/doctype/salary_withholding_cycle/salary_withholding_cycle.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,49 @@ | ||
{ | ||
"actions": [], | ||
"allow_rename": 1, | ||
"creation": "2024-07-01 07:28:02.446471", | ||
"doctype": "DocType", | ||
"editable_grid": 1, | ||
"engine": "InnoDB", | ||
"field_order": [ | ||
"from_date", | ||
"to_date", | ||
"salary_status" | ||
], | ||
"fields": [ | ||
{ | ||
"fieldname": "from_date", | ||
"fieldtype": "Data", | ||
"in_list_view": 1, | ||
"label": "From Date", | ||
"reqd": 1 | ||
}, | ||
{ | ||
"fieldname": "to_date", | ||
"fieldtype": "Data", | ||
"in_list_view": 1, | ||
"label": "To Date", | ||
"reqd": 1 | ||
}, | ||
{ | ||
"fieldname": "salary_status", | ||
"fieldtype": "Select", | ||
"in_list_view": 1, | ||
"label": "Salary Status", | ||
"options": "Withheld\nReleased", | ||
"reqd": 1 | ||
} | ||
], | ||
"index_web_pages_for_search": 1, | ||
"istable": 1, | ||
"links": [], | ||
"modified": "2024-07-01 07:28:02.446471", | ||
"modified_by": "Administrator", | ||
"module": "HR", | ||
"name": "Salary Withholding Cycle", | ||
"owner": "Administrator", | ||
"permissions": [], | ||
"sort_field": "creation", | ||
"sort_order": "DESC", | ||
"states": [] | ||
} |
9 changes: 9 additions & 0 deletions
9
hrms/hr/doctype/salary_withholding_cycle/salary_withholding_cycle.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 SalaryWithholdingCycle(Document): | ||
pass |