From a81c54f23a310eea2abc7ecd6092c78e7e8aeaa3 Mon Sep 17 00:00:00 2001 From: Anurag Mishra Date: Wed, 24 Jun 2020 11:51:06 +0530 Subject: [PATCH] fix: 'Condition & Formula Help' appears twice --- erpnext/payroll/doctype/salary_structure/salary_structure.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/erpnext/payroll/doctype/salary_structure/salary_structure.js b/erpnext/payroll/doctype/salary_structure/salary_structure.js index ca458f976f..ad93a2fa4b 100755 --- a/erpnext/payroll/doctype/salary_structure/salary_structure.js +++ b/erpnext/payroll/doctype/salary_structure/salary_structure.js @@ -35,7 +35,9 @@ frappe.ui.form.on('Salary Structure', { d.show() }); - frm.get_field("conditions_and_formula_variable_and_example").$wrapper.append(frm.doc.filters_html).append(help_button) + let help_button_wrapper = frm.get_field("conditions_and_formula_variable_and_example").$wrapper; + help_button_wrapper.empty(); + help_button_wrapper.append(frm.doc.filters_html).append(help_button) frm.toggle_reqd(['payroll_frequency'], !frm.doc.salary_slip_based_on_timesheet)