fix: Not able to cancel application,allocation nad encashments
This commit is contained in:
parent
48ba29b647
commit
95984fd921
@ -5,20 +5,23 @@ cur_frm.add_fetch('employee','employee_name','employee_name');
|
||||
|
||||
frappe.ui.form.on("Leave Allocation", {
|
||||
onload: function(frm) {
|
||||
// Ignore cancellation of doctype on cancel all.
|
||||
frm.ignored_doctypes_on_cancel_all = ["Leave Ledger Entry"];
|
||||
|
||||
if(!frm.doc.from_date) frm.set_value("from_date", frappe.datetime.get_today());
|
||||
|
||||
frm.set_query("employee", function() {
|
||||
return {
|
||||
query: "erpnext.controllers.queries.employee_query"
|
||||
}
|
||||
};
|
||||
});
|
||||
frm.set_query("leave_type", function() {
|
||||
return {
|
||||
filters: {
|
||||
is_lwp: 0
|
||||
}
|
||||
}
|
||||
})
|
||||
};
|
||||
});
|
||||
},
|
||||
|
||||
refresh: function(frm) {
|
||||
|
@ -19,6 +19,10 @@ frappe.ui.form.on("Leave Application", {
|
||||
frm.set_query("employee", erpnext.queries.employee);
|
||||
},
|
||||
onload: function(frm) {
|
||||
|
||||
// Ignore cancellation of doctype on cancel all.
|
||||
frm.ignored_doctypes_on_cancel_all = ["Leave Ledger Entry"];
|
||||
|
||||
if (!frm.doc.posting_date) {
|
||||
frm.set_value("posting_date", frappe.datetime.get_today());
|
||||
}
|
||||
|
@ -2,6 +2,10 @@
|
||||
// For license information, please see license.txt
|
||||
|
||||
frappe.ui.form.on('Leave Encashment', {
|
||||
onload: function(frm) {
|
||||
// Ignore cancellation of doctype on cancel all.
|
||||
frm.ignored_doctypes_on_cancel_all = ["Leave Ledger Entry"];
|
||||
},
|
||||
setup: function(frm) {
|
||||
frm.set_query("leave_type", function() {
|
||||
return {
|
||||
@ -33,7 +37,7 @@ frappe.ui.form.on('Leave Encashment', {
|
||||
doc: frm.doc,
|
||||
callback: function(r) {
|
||||
frm.refresh_fields();
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user