mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-26 00:14:50 +00:00
change project get_query to include projects with status other than Completed and Cancelled
This commit is contained in:
@@ -168,7 +168,9 @@ cur_frm.cscript.new_contact = function(){
|
||||
cur_frm.fields_dict['project_name'].get_query = function(doc, cdt, cdn) {
|
||||
var cond = '';
|
||||
if(doc.customer) cond = '(`tabProject`.customer = "'+doc.customer+'" OR IFNULL(`tabProject`.customer,"")="") AND';
|
||||
return repl('SELECT `tabProject`.name FROM `tabProject` WHERE `tabProject`.status = "Open" AND %(cond)s `tabProject`.name LIKE "%s" ORDER BY `tabProject`.name ASC LIMIT 50', {cond:cond});
|
||||
return repl('SELECT `tabProject`.name FROM `tabProject` \
|
||||
WHERE `tabProject`.status not in ("Completed", "Cancelled") \
|
||||
AND %(cond)s `tabProject`.name LIKE "%s" ORDER BY `tabProject`.name ASC LIMIT 50', {cond:cond});
|
||||
}
|
||||
|
||||
//---- get customer details ----------------------------
|
||||
|
||||
Reference in New Issue
Block a user