Merge pull request #22723 from Anurag810/HR-fix
This commit is contained in:
commit
404afb823f
@ -5,20 +5,23 @@ cur_frm.add_fetch('employee','employee_name','employee_name');
|
|||||||
|
|
||||||
frappe.ui.form.on("Leave Allocation", {
|
frappe.ui.form.on("Leave Allocation", {
|
||||||
onload: function(frm) {
|
onload: function(frm) {
|
||||||
|
// Ignore cancellation of doctype on cancel all.
|
||||||
|
frm.ignore_doctypes_on_cancel_all = ["Leave Ledger Entry"];
|
||||||
|
|
||||||
if(!frm.doc.from_date) frm.set_value("from_date", frappe.datetime.get_today());
|
if(!frm.doc.from_date) frm.set_value("from_date", frappe.datetime.get_today());
|
||||||
|
|
||||||
frm.set_query("employee", function() {
|
frm.set_query("employee", function() {
|
||||||
return {
|
return {
|
||||||
query: "erpnext.controllers.queries.employee_query"
|
query: "erpnext.controllers.queries.employee_query"
|
||||||
}
|
};
|
||||||
});
|
});
|
||||||
frm.set_query("leave_type", function() {
|
frm.set_query("leave_type", function() {
|
||||||
return {
|
return {
|
||||||
filters: {
|
filters: {
|
||||||
is_lwp: 0
|
is_lwp: 0
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
refresh: function(frm) {
|
refresh: function(frm) {
|
||||||
|
|||||||
@ -19,6 +19,10 @@ frappe.ui.form.on("Leave Application", {
|
|||||||
frm.set_query("employee", erpnext.queries.employee);
|
frm.set_query("employee", erpnext.queries.employee);
|
||||||
},
|
},
|
||||||
onload: function(frm) {
|
onload: function(frm) {
|
||||||
|
|
||||||
|
// Ignore cancellation of doctype on cancel all.
|
||||||
|
frm.ignore_doctypes_on_cancel_all = ["Leave Ledger Entry"];
|
||||||
|
|
||||||
if (!frm.doc.posting_date) {
|
if (!frm.doc.posting_date) {
|
||||||
frm.set_value("posting_date", frappe.datetime.get_today());
|
frm.set_value("posting_date", frappe.datetime.get_today());
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2,6 +2,10 @@
|
|||||||
// For license information, please see license.txt
|
// For license information, please see license.txt
|
||||||
|
|
||||||
frappe.ui.form.on('Leave Encashment', {
|
frappe.ui.form.on('Leave Encashment', {
|
||||||
|
onload: function(frm) {
|
||||||
|
// Ignore cancellation of doctype on cancel all.
|
||||||
|
frm.ignore_doctypes_on_cancel_all = ["Leave Ledger Entry"];
|
||||||
|
},
|
||||||
setup: function(frm) {
|
setup: function(frm) {
|
||||||
frm.set_query("leave_type", function() {
|
frm.set_query("leave_type", function() {
|
||||||
return {
|
return {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user