From 4e1b60d401e9ce5f6f59aa8847985b421dc1aa29 Mon Sep 17 00:00:00 2001 From: Mangesh-Khairnar Date: Fri, 14 Jun 2019 11:15:54 +0530 Subject: [PATCH] style: change formatting --- .../doctype/leave_allocation/leave_allocation.js | 15 +++++++-------- .../leave_application/leave_application.js | 2 +- 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/erpnext/hr/doctype/leave_allocation/leave_allocation.js b/erpnext/hr/doctype/leave_allocation/leave_allocation.js index 1b3349a1ce..a620d9e081 100755 --- a/erpnext/hr/doctype/leave_allocation/leave_allocation.js +++ b/erpnext/hr/doctype/leave_allocation/leave_allocation.js @@ -63,7 +63,7 @@ frappe.ui.form.on("Leave Allocation", { }, leave_type: function(frm) { - frm.trigger("leave_policy") + frm.trigger("leave_policy"); frm.trigger("calculate_total_leaves_allocated"); }, @@ -83,13 +83,12 @@ frappe.ui.form.on("Leave Allocation", { leave_policy: function(frm) { if(frm.doc.leave_policy && frm.doc.leave_type) { - frappe.db.get_value("Leave Policy Detail", - {'parent': frm.doc.leave_policy, 'leave_type': frm.doc.leave_type}, - 'annual_allocation', (r) => { - if (r && !r.exc) { - frm.set_value("new_leaves_allocated", flt(r.annual_allocation)); - } - }, "Leave Policy") + frappe.db.get_value("Leave Policy Detail",{ + 'parent': frm.doc.leave_policy, + 'leave_type': frm.doc.leave_type + }, 'annual_allocation', (r) => { + if (r && !r.exc) frm.set_value("new_leaves_allocated", flt(r.annual_allocation)); + }, "Leave Policy"); } }, calculate_total_leaves_allocated: function(frm) { diff --git a/erpnext/hr/doctype/leave_application/leave_application.js b/erpnext/hr/doctype/leave_application/leave_application.js index 2076ccd22a..5534cec061 100755 --- a/erpnext/hr/doctype/leave_application/leave_application.js +++ b/erpnext/hr/doctype/leave_application/leave_application.js @@ -60,7 +60,7 @@ frappe.ui.form.on("Leave Application", { } } }); - frm.trigger("create_dashboard") + frm.trigger("create_dashboard"); } },