SO search query in DN: currency check removed

This commit is contained in:
Nabin Hait 2012-06-25 10:39:38 +05:30
parent 33dcbc096a
commit 72a6ec8cb3

View File

@ -160,13 +160,9 @@ cur_frm.fields_dict['sales_order_no'].get_query = function(doc) {
var cond = '';
if(doc.customer) {
if(doc.currency) cond = '`tabSales Order`.customer = "'+doc.customer+'" and `tabSales Order`.currency = "'+doc.currency+'" and';
else cond = '`tabSales Order`.customer = "'+doc.customer+'" and';
}
else {
if(doc.currency) cond = '`tabSales Order`.currency = "'+doc.currency+'" and';
else cond = '';
cond = '`tabSales Order`.customer = "'+doc.customer+'" and';
}
if(doc.project_name){
cond += '`tabSales Order`.project_name ="'+doc.project_name+'"';
}