mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-13 10:11:20 +00:00
added get_query for employee related table
This commit is contained in:
@@ -85,9 +85,9 @@ cur_frm.cscript.transaction = function(doc,cdt,cdn){
|
||||
}
|
||||
|
||||
|
||||
cur_frm.fields_dict.system_user.get_query = erpnext.profile_query;
|
||||
cur_frm.fields_dict.system_user.get_query = erpnext.utils.profile_query;
|
||||
|
||||
cur_frm.fields_dict.approving_user.get_query = erpnext.profile_query;
|
||||
cur_frm.fields_dict.approving_user.get_query = erpnext.utils.profile_query;
|
||||
|
||||
// System Role Trigger
|
||||
// -----------------------
|
||||
@@ -112,3 +112,5 @@ cur_frm.fields_dict['master_name'].get_query = function(doc){
|
||||
else
|
||||
return 'SELECT `tabItem`.`name` FROM `tabItem` WHERE `tabItem`.`name` = "cheating done to avoid null" ORDER BY `tabItem`.`name` DESC LIMIT 50';
|
||||
}
|
||||
|
||||
cur_frm.fields_dict.to_emp.get_query = erpnext.utils.employee_query;
|
||||
@@ -38,12 +38,8 @@ cur_frm.fields_dict['parent_sales_person'].get_query = function(doc,cdt,cdn) {
|
||||
return 'SELECT `tabSales Person`.`name`,`tabSales Person`.`parent_sales_person` FROM `tabSales Person` WHERE `tabSales Person`.`is_group` = "Yes" AND `tabSales Person`.`docstatus`!= 2 AND `tabSales Person`.`name` !="'+doc.sales_person_name+'" AND `tabSales Person`.%(key)s LIKE "%s" ORDER BY `tabSales Person`.`name` ASC LIMIT 50';
|
||||
}
|
||||
|
||||
//get query select Territory
|
||||
cur_frm.fields_dict['territory'].get_query = function(doc,cdt,cdn) {
|
||||
return 'SELECT `tabTerritory`.`name` FROM `tabTerritory` WHERE `tabTerritory`.`is_group` = "No" AND `tabTerritory`.`docstatus`!= 2 AND `tabTerritory`.%(key)s LIKE "%s" ORDER BY `tabTerritory`.`name` ASC LIMIT 50';
|
||||
}
|
||||
|
||||
// ******************** ITEM Group ********************************
|
||||
cur_frm.fields_dict['target_details'].grid.get_field("item_group").get_query = function(doc, cdt, cdn) {
|
||||
return 'SELECT `tabItem Group`.name FROM `tabItem Group` WHERE `tabItem Group`.is_group="No" AND `tabItem Group`.docstatus != 2 AND `tabItem Group`.%(key)s LIKE "%s" LIMIT 50'
|
||||
}
|
||||
|
||||
cur_frm.fields_dict.employee.get_query = erpnext.utils.employee_query;
|
||||
Reference in New Issue
Block a user