Merge branch 'master' of github.com:webnotes/erpnext

This commit is contained in:
Nabin Hait 2012-03-22 10:26:07 +05:30
commit 9066dcaba5
2 changed files with 5 additions and 3 deletions

View File

@ -111,6 +111,7 @@ fld.get_query = function(doc, cdt, cdn) {
+'AND ifnull(`tabBin`.`actual_qty`,0) > 0 ' +'AND ifnull(`tabBin`.`actual_qty`,0) > 0 '
+'AND tabBin.warehouse="'+ d.s_warehouse +'" ' +'AND tabBin.warehouse="'+ d.s_warehouse +'" '
+'AND tabItem.docstatus < 2 ' +'AND tabItem.docstatus < 2 '
+'(ifnull(`tabItem`.`end_of_life`,"") = "" OR `tabItem`.`end_of_life` > NOW() OR `tabItem`.`end_of_life`="0000-00-00")'
+'AND tabItem.%(key)s LIKE "%s" ' +'AND tabItem.%(key)s LIKE "%s" '
+'ORDER BY tabItem.name ASC ' +'ORDER BY tabItem.name ASC '
+'LIMIT 50' +'LIMIT 50'
@ -118,6 +119,7 @@ fld.get_query = function(doc, cdt, cdn) {
return 'SELECT tabItem.name, tabItem.description ' return 'SELECT tabItem.name, tabItem.description '
+'FROM tabItem ' +'FROM tabItem '
+'WHERE tabItem.docstatus < 2 ' +'WHERE tabItem.docstatus < 2 '
+'(ifnull(`tabItem`.`end_of_life`,"") = "" OR `tabItem`.`end_of_life` > NOW() OR `tabItem`.`end_of_life`="0000-00-00")'
+'AND tabItem.%(key)s LIKE "%s" ' +'AND tabItem.%(key)s LIKE "%s" '
+'ORDER BY tabItem.name ASC ' +'ORDER BY tabItem.name ASC '
+'LIMIT 50' +'LIMIT 50'

View File

@ -45,10 +45,10 @@ erpnext.todo.ToDoItem = Class.extend({
'Low':'' 'Low':''
} }
todo.labelclass = label_map[todo.priority]; todo.labelclass = label_map[todo.priority];
todo.userdate = dateutil.str_to_user(todo.date); todo.userdate = dateutil.str_to_user(todo.date) || '';
if(todo.reference_name && todo.reference_type) { if(todo.reference_name && todo.reference_type) {
todo.link = repl('<a href="#!Form/%(reference_type)s/%(reference_name)s">\ todo.link = repl('<a href="#!Form/%(reference_type)s/%(reference_name)s">\
%(reference_name)s</a>', todo); %(reference_type)s: %(reference_name)s</a>', todo);
} else if(todo.reference_type) { } else if(todo.reference_type) {
todo.link = repl('<a href="#!List/%(reference_type)s">\ todo.link = repl('<a href="#!List/%(reference_type)s">\
%(reference_type)s</a>', todo); %(reference_type)s</a>', todo);
@ -60,7 +60,7 @@ erpnext.todo.ToDoItem = Class.extend({
<span class="label %(labelclass)s">%(priority)s</span>\ <span class="label %(labelclass)s">%(priority)s</span>\
<span class="help" style="margin-right: 7px">%(userdate)s</span>\ <span class="help" style="margin-right: 7px">%(userdate)s</span>\
%(description)s</span>\ %(description)s</span>\
<span class="ref_link">&rarr;\ <span class="ref_link">&rarr; &nbsp;\
%(link)s</span>\ %(link)s</span>\
<a href="#" class="close">&times;</a>\ <a href="#" class="close">&times;</a>\
</div>', todo)); </div>', todo));