mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-04 12:49:10 +00:00
select leave approver by fullname in leave application
This commit is contained in:
@@ -1,4 +1,9 @@
|
|||||||
erpnext.updates = [
|
erpnext.updates = [
|
||||||
|
["13th February, 2013", [
|
||||||
|
"Employee: If Employee is linked to a Profile, copy Full Name, Date of Birth, \
|
||||||
|
Image and Gender to Profile",
|
||||||
|
"Leave Application: Select Leave Approver by their Full Name",
|
||||||
|
]],
|
||||||
["6th February, 2013", [
|
["6th February, 2013", [
|
||||||
"Bookmarks: Add bookmarks via toolbar by clicking on the <i class='icon-star'></i> sign.",
|
"Bookmarks: Add bookmarks via toolbar by clicking on the <i class='icon-star'></i> sign.",
|
||||||
]],
|
]],
|
||||||
|
|||||||
@@ -23,10 +23,14 @@ cur_frm.cscript.onload = function(doc, dt, dn) {
|
|||||||
if(doc.__islocal) {
|
if(doc.__islocal) {
|
||||||
cur_frm.set_value("status", "Open")
|
cur_frm.set_value("status", "Open")
|
||||||
}
|
}
|
||||||
|
cur_frm.set_df_property("leave_approver", "options", "");
|
||||||
cur_frm.call({
|
cur_frm.call({
|
||||||
method:"get_approver_list",
|
method:"get_approver_list",
|
||||||
callback: function(r) {
|
callback: function(r) {
|
||||||
cur_frm.set_df_property("leave_approver", "options", r.message);
|
cur_frm.set_df_property("leave_approver", "options", $.map(r.message,
|
||||||
|
function(profile) {
|
||||||
|
return {value: profile, label: wn.user_info(profile).fullname};
|
||||||
|
}));
|
||||||
cur_frm.cscript.get_leave_balance(cur_frm.doc);
|
cur_frm.cscript.get_leave_balance(cur_frm.doc);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user