mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-26 00:14:50 +00:00
added get_query for employee related table
This commit is contained in:
@@ -92,3 +92,5 @@ cur_frm.cscript.calculate_total = function(doc,cdt,cdn){
|
||||
doc.total_score = flt(total);
|
||||
refresh_field('total_score');
|
||||
}
|
||||
|
||||
cur_frm.fields_dict.employee.get_query = erpnext.utils.employee_query;
|
||||
@@ -22,9 +22,4 @@ cur_frm.cscript.employee = function(doc,cdt,cdn){
|
||||
refresh_field('employee_name');
|
||||
}
|
||||
|
||||
|
||||
//Employee
|
||||
//-----------------------------
|
||||
cur_frm.fields_dict['employee'].get_query = function(doc,cdt,cdn) {
|
||||
return 'SELECT `tabEmployee`.`name`, `tabEmployee`.`employee_name` FROM `tabEmployee` WHERE `tabEmployee`.status = "Active" AND `tabEmployee`.`docstatus`!= 2 AND (`tabEmployee`.`employee_name` LIKE "%s" OR `tabEmployee`.`%(key)s` LIKE "%s") ORDER BY `tabEmployee`.`name` ASC LIMIT 50';
|
||||
}
|
||||
cur_frm.fields_dict.employee.get_query = erpnext.utils.employee_query;
|
||||
@@ -65,4 +65,6 @@ cur_frm.cscript.make_salary_structure = function(doc,dt,dn,det){
|
||||
loaddoc('Salary Structure', st.name);
|
||||
}
|
||||
|
||||
cur_frm.fields_dict.user_id.get_query = erpnext.utils.profile_query;
|
||||
cur_frm.fields_dict.user_id.get_query = erpnext.utils.profile_query;
|
||||
|
||||
cur_frm.fields_dict.reports_to.get_query = erpnext.utils.employee_query;
|
||||
@@ -255,3 +255,5 @@ cur_frm.cscript.on_submit = function(doc, cdt, cdn) {
|
||||
}
|
||||
cur_frm.cscript.notify(doc, args);
|
||||
}
|
||||
|
||||
cur_frm.fields_dict.employee.get_query = erpnext.utils.employee_query;
|
||||
@@ -78,3 +78,5 @@ calculate_total_leaves_allocated = function(doc, dt, dn) {
|
||||
set_multiple(dt,dn,{carry_forwarded_leaves : 0,total_leaves_allocated : flt(doc.new_leaves_allocated)});
|
||||
}
|
||||
}
|
||||
|
||||
cur_frm.fields_dict.employee.get_query = erpnext.utils.employee_query;
|
||||
@@ -99,3 +99,5 @@ calculate_total_days = function(doc, dt, dn) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
cur_frm.fields_dict.employee.get_query = erpnext.utils.employee_query;
|
||||
@@ -138,3 +138,5 @@ cur_frm.cscript.leave_encashment_amount = cur_frm.cscript.arrear_amount;
|
||||
cur_frm.cscript.validate = function(doc, dt, dn) {
|
||||
calculate_all(doc, dt, dn);
|
||||
}
|
||||
|
||||
cur_frm.fields_dict.employee.get_query = erpnext.utils.employee_query;
|
||||
@@ -107,3 +107,5 @@ var calculate_totals = function(doc, cdt, cdn) {
|
||||
cur_frm.cscript.validate = function(doc, cdt, cdn) {
|
||||
calculate_totals(doc, cdt, cdn);
|
||||
}
|
||||
|
||||
cur_frm.fields_dict.employee.get_query = erpnext.utils.employee_query;
|
||||
Reference in New Issue
Block a user