change project get_query to include projects with status other than Completed and Cancelled

This commit is contained in:
Anand Doshi
2012-10-29 14:26:38 +05:30
parent bdaada1080
commit 548eb7b1c3
10 changed files with 31 additions and 10 deletions

View File

@@ -17,7 +17,9 @@
cur_frm.fields_dict['project'].get_query = function(doc,cdt,cdn){
var cond='';
if(doc.customer) cond = 'ifnull(`tabProject`.customer, "") = "'+doc.customer+'" AND';
return repl('SELECT distinct `tabProject`.`name` FROM `tabProject` WHERE %(cond)s `tabProject`.`name` LIKE "%s" ORDER BY `tabProject`.`name` ASC LIMIT 50', {cond:cond});
return repl('SELECT distinct `tabProject`.`name` FROM `tabProject` \
WHERE %(cond)s `tabProject`.`name` LIKE "%s" \
ORDER BY `tabProject`.`name` ASC LIMIT 50', {cond:cond});
}