From 29ed95ba22e7da8ef3b336798c99b51d228b572a Mon Sep 17 00:00:00 2001 From: Anand Doshi Date: Wed, 21 Mar 2012 18:02:17 +0530 Subject: [PATCH 1/2] simple fixes in todo --- erpnext/utilities/page/todo/todo.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/erpnext/utilities/page/todo/todo.js b/erpnext/utilities/page/todo/todo.js index dfaa7cdecf..0f1aa5c65d 100644 --- a/erpnext/utilities/page/todo/todo.js +++ b/erpnext/utilities/page/todo/todo.js @@ -45,10 +45,10 @@ erpnext.todo.ToDoItem = Class.extend({ 'Low':'' } 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) { todo.link = repl('\ - %(reference_name)s', todo); + %(reference_type)s: %(reference_name)s', todo); } else if(todo.reference_type) { todo.link = repl('\ %(reference_type)s', todo); @@ -60,7 +60,7 @@ erpnext.todo.ToDoItem = Class.extend({ %(priority)s\ %(userdate)s\ %(description)s\ - →\ + →  \ %(link)s\ ×\ ', todo)); From bad13149b23fbc4b2971928137d6bc690ebba324 Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Thu, 22 Mar 2012 10:24:26 +0530 Subject: [PATCH 2/2] item query changes in stock entry --- erpnext/stock/doctype/stock_entry/stock_entry.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/erpnext/stock/doctype/stock_entry/stock_entry.js b/erpnext/stock/doctype/stock_entry/stock_entry.js index 3593fa0c3c..b75538de8c 100644 --- a/erpnext/stock/doctype/stock_entry/stock_entry.js +++ b/erpnext/stock/doctype/stock_entry/stock_entry.js @@ -111,6 +111,7 @@ fld.get_query = function(doc, cdt, cdn) { +'AND ifnull(`tabBin`.`actual_qty`,0) > 0 ' +'AND tabBin.warehouse="'+ d.s_warehouse +'" ' +'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" ' +'ORDER BY tabItem.name ASC ' +'LIMIT 50' @@ -118,6 +119,7 @@ fld.get_query = function(doc, cdt, cdn) { return 'SELECT tabItem.name, tabItem.description ' +'FROM tabItem ' +'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" ' +'ORDER BY tabItem.name ASC ' +'LIMIT 50'