updates to item, item_group and website

This commit is contained in:
Rushabh Mehta
2012-12-20 17:11:51 +05:30
parent 608a751b57
commit fc19f25c88
20 changed files with 277 additions and 153 deletions

View File

@@ -26,18 +26,3 @@ cur_frm.fields_dict['project'].get_query = function(doc,cdt,cdn){
cur_frm.cscript.project = function(doc, cdt, cdn){
if(doc.project) get_server_fields('get_project_details', '','', doc, cdt, cdn, 1);
}
// TODO: remove these? field doesn't exist, but custom field could exist
cur_frm.fields_dict['customer'].get_query = function(doc,cdt,cdn){
var cond='';
if(doc.project) cond = 'ifnull(`tabProject`.customer, "") = `tabCustomer`.name AND ifnull(`tabProject`.name, "") = "'+doc.project+'" AND';
return repl('SELECT distinct `tabCustomer`.`name` FROM `tabCustomer`, `tabProject` WHERE %(cond)s `tabCustomer`.`name` LIKE "%s" ORDER BY `tabCustomer`.`name` ASC LIMIT 50', {cond:cond});
}
cur_frm.cscript.customer = function(doc, cdt, cdn){
if(doc.customer) get_server_fields('get_customer_details', '','', doc, cdt, cdn, 1);
else doc.customer_name ='';
}