Merge pull request #14254 from rohitwaghchaure/leave_application_issue_for_leave_approver
[Fix] Leave application, leave approver not fetching
This commit is contained in:
commit
bd2989a541
@ -195,7 +195,7 @@ frappe.ui.form.on("Leave Application", {
|
|||||||
if(frm.doc.employee) {
|
if(frm.doc.employee) {
|
||||||
// server call is done to include holidays in leave days calculations
|
// server call is done to include holidays in leave days calculations
|
||||||
return frappe.call({
|
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: {
|
args: {
|
||||||
"employee": frm.doc.employee,
|
"employee": frm.doc.employee,
|
||||||
},
|
},
|
||||||
|
@ -610,6 +610,7 @@ def get_approved_leaves_for_period(employee, leave_type, from_date, to_date):
|
|||||||
|
|
||||||
return leave_days
|
return leave_days
|
||||||
|
|
||||||
|
@frappe.whitelist()
|
||||||
def get_leave_approver(employee, department=None):
|
def get_leave_approver(employee, department=None):
|
||||||
if not department:
|
if not department:
|
||||||
department = frappe.db.get_value('Employee', employee, 'department')
|
department = frappe.db.get_value('Employee', employee, 'department')
|
||||||
|
Loading…
Reference in New Issue
Block a user