diff --git a/erpnext/hr/doctype/salary_structure/salary_structure.js b/erpnext/hr/doctype/salary_structure/salary_structure.js index aedd5ec555..10b7544c42 100755 --- a/erpnext/hr/doctype/salary_structure/salary_structure.js +++ b/erpnext/hr/doctype/salary_structure/salary_structure.js @@ -32,7 +32,8 @@ frappe.ui.form.on('Salary Structure', { }, toggle_fields: function(frm) { - frm.toggle_display('time_sheet_earning_detail', cint(frm.doc.salary_slip_based_on_timesheet)==1); + frm.toggle_display('time_sheet_earning_detail', frm.doc.salary_slip_based_on_timesheet); + frm.toggle_reqd('salary_component', frm.doc.salary_slip_based_on_timesheet); } })