From a0a18d963d72f9a718e4f2c5017d5ae8d1228b4d Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Fri, 27 Jun 2014 13:02:11 +0530 Subject: [PATCH] item query fixed in stock entry --- erpnext/stock/doctype/stock_entry/stock_entry.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/stock/doctype/stock_entry/stock_entry.py b/erpnext/stock/doctype/stock_entry/stock_entry.py index a7e007a5ce..586179de28 100644 --- a/erpnext/stock/doctype/stock_entry/stock_entry.py +++ b/erpnext/stock/doctype/stock_entry/stock_entry.py @@ -387,7 +387,7 @@ class StockEntry(StockController): def get_item_details(self, args): item = frappe.db.sql("""select stock_uom, description, item_name, expense_account, buying_cost_center from `tabItem` - where name = %s and (ifnull(end_of_life,'')='' or end_of_life > now())""", + where name = %s and (ifnull(end_of_life,'0000-00-00')='0000-00-00' or end_of_life > now())""", (args.get('item_code')), as_dict = 1) if not item: frappe.throw(_("Item {0} is not active or end of life has been reached").format(args.get("item_code")))