Merge pull request #14254 from rohitwaghchaure/leave_application_issue_for_leave_approver

[Fix] Leave application, leave approver not fetching
This commit is contained in:
rohitwaghchaure 2018-05-28 15:11:08 +05:30 committed by GitHub
commit bd2989a541
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 1 deletions

View File

@ -195,7 +195,7 @@ frappe.ui.form.on("Leave Application", {
if(frm.doc.employee) {
// server call is done to include holidays in leave days calculations
return frappe.call({
method: 'erpnext.hr.doctype.leave_application.leave_application.get_leave_approver_data',
method: 'erpnext.hr.doctype.leave_application.leave_application.get_leave_approver',
args: {
"employee": frm.doc.employee,
},

View File

@ -610,6 +610,7 @@ def get_approved_leaves_for_period(employee, leave_type, from_date, to_date):
return leave_days
@frappe.whitelist()
def get_leave_approver(employee, department=None):
if not department:
department = frappe.db.get_value('Employee', employee, 'department')