From 83768b68c1e856e958e888db629a46dbbadf4644 Mon Sep 17 00:00:00 2001 From: Afshan <33727827+AfshanKhan@users.noreply.github.com> Date: Tue, 2 Feb 2021 11:04:25 +0530 Subject: [PATCH] fix: emp disappear (#24525) * fix: emp disappear * fix: renamed set_totals_call to set_totals Co-authored-by: Nabin Hait --- erpnext/payroll/doctype/payroll_entry/payroll_entry.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/erpnext/payroll/doctype/payroll_entry/payroll_entry.js b/erpnext/payroll/doctype/payroll_entry/payroll_entry.js index 0dcea88c89..7ead0b3882 100644 --- a/erpnext/payroll/doctype/payroll_entry/payroll_entry.js +++ b/erpnext/payroll/doctype/payroll_entry/payroll_entry.js @@ -342,3 +342,11 @@ let render_employee_attendance = function (frm, data) { }) ); }; + +frappe.ui.form.on('Payroll Employee Detail', { + employee: function(frm) { + if (!frm.doc.payroll_frequency) { + frappe.throw(__("Please set a Payroll Frequency")); + } + } +});