From c02745c8267f1fdf5622770d247fe7e11af9625c Mon Sep 17 00:00:00 2001 From: Kanchan Chauhan Date: Mon, 27 Feb 2017 17:21:41 +0530 Subject: [PATCH] [Fix] Update totals on salary component deletion --- erpnext/hr/doctype/salary_slip/salary_slip.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/erpnext/hr/doctype/salary_slip/salary_slip.js b/erpnext/hr/doctype/salary_slip/salary_slip.js index afff67bdef..bf86aba7d5 100644 --- a/erpnext/hr/doctype/salary_slip/salary_slip.js +++ b/erpnext/hr/doctype/salary_slip/salary_slip.js @@ -62,6 +62,15 @@ frappe.ui.form.on("Salary Slip", { }) +frappe.ui.form.on('Salary Detail', { + earnings_remove: function(frm, dt, dn) { + calculate_all(frm.doc, dt, dn); + }, + deductions_remove: function(frm, dt, dn) { + calculate_all(frm.doc, dt, dn); + } +}) + // Get leave details //--------------------------------------------------------------------- cur_frm.cscript.start_date = function(doc, dt, dn){