style: change formatting

This commit is contained in:
Mangesh-Khairnar
2019-06-14 11:15:54 +05:30
parent 283d2c5ca2
commit 4e1b60d401
2 changed files with 8 additions and 9 deletions

View File

@@ -63,7 +63,7 @@ frappe.ui.form.on("Leave Allocation", {
}, },
leave_type: function(frm) { leave_type: function(frm) {
frm.trigger("leave_policy") frm.trigger("leave_policy");
frm.trigger("calculate_total_leaves_allocated"); frm.trigger("calculate_total_leaves_allocated");
}, },
@@ -83,13 +83,12 @@ frappe.ui.form.on("Leave Allocation", {
leave_policy: function(frm) { leave_policy: function(frm) {
if(frm.doc.leave_policy && frm.doc.leave_type) { if(frm.doc.leave_policy && frm.doc.leave_type) {
frappe.db.get_value("Leave Policy Detail", frappe.db.get_value("Leave Policy Detail",{
{'parent': frm.doc.leave_policy, 'leave_type': frm.doc.leave_type}, 'parent': frm.doc.leave_policy,
'annual_allocation', (r) => { 'leave_type': frm.doc.leave_type
if (r && !r.exc) { }, 'annual_allocation', (r) => {
frm.set_value("new_leaves_allocated", flt(r.annual_allocation)); if (r && !r.exc) frm.set_value("new_leaves_allocated", flt(r.annual_allocation));
} }, "Leave Policy");
}, "Leave Policy")
} }
}, },
calculate_total_leaves_allocated: function(frm) { calculate_total_leaves_allocated: function(frm) {

View File

@@ -60,7 +60,7 @@ frappe.ui.form.on("Leave Application", {
} }
} }
}); });
frm.trigger("create_dashboard") frm.trigger("create_dashboard");
} }
}, },