Skip to content

Commit

Permalink
fix: remove statistical component from list view display
Browse files Browse the repository at this point in the history
- refactor deprecated code

(cherry picked from commit 35fd55e)
  • Loading branch information
ruchamahabal authored and mergify[bot] committed Dec 12, 2023
1 parent 25e2e3f commit a665c06
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 14 deletions.
4 changes: 2 additions & 2 deletions hrms/payroll/doctype/salary_detail/salary_detail.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
],
"fields": [
{
"columns": 2,
"fieldname": "salary_component",
"fieldtype": "Link",
"in_list_view": 1,
Expand Down Expand Up @@ -65,7 +66,6 @@
"fetch_from": "salary_component.statistical_component",
"fieldname": "statistical_component",
"fieldtype": "Check",
"in_list_view": 1,
"label": "Statistical Component"
},
{
Expand Down Expand Up @@ -255,7 +255,7 @@
],
"istable": 1,
"links": [],
"modified": "2023-04-24 11:17:11.397523",
"modified": "2023-12-12 13:52:30.726505",
"modified_by": "Administrator",
"module": "Payroll",
"name": "Salary Detail",
Expand Down
12 changes: 1 addition & 11 deletions hrms/payroll/doctype/salary_structure/salary_structure.js
Original file line number Diff line number Diff line change
@@ -1,17 +1,7 @@
// Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
// License: GNU General Public License v3. See license.txt

cur_frm.add_fetch('company', 'default_letter_head', 'letter_head');


cur_frm.cscript.onload = function(doc, dt, dn){
var e_tbl = doc.earnings || [];
var d_tbl = doc.deductions || [];
if (e_tbl.length == 0 && d_tbl.length == 0)
return function(r, rt) { refresh_many(['earnings', 'deductions']);};
}

frappe.ui.form.on('Salary Structure', {
frappe.ui.form.on("Salary Structure", {
onload: function(frm) {
frm.alerted_rows = []

Expand Down
3 changes: 2 additions & 1 deletion hrms/payroll/doctype/salary_structure/salary_structure.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@
"search_index": 1
},
{
"fetch_from": "company.default_letter_head",
"fieldname": "letter_head",
"fieldtype": "Link",
"label": "Letter Head",
Expand Down Expand Up @@ -239,7 +240,7 @@
"idx": 1,
"is_submittable": 1,
"links": [],
"modified": "2023-09-26 14:57:07.030623",
"modified": "2023-12-12 14:11:22.774017",
"modified_by": "Administrator",
"module": "Payroll",
"name": "Salary Structure",
Expand Down

0 comments on commit a665c06

Please sign in to comment.