diff --git a/buying/doctype/purchase_common/purchase_common.py b/buying/doctype/purchase_common/purchase_common.py
index 2b6ca27..7cc5c22 100644
--- a/buying/doctype/purchase_common/purchase_common.py
+++ b/buying/doctype/purchase_common/purchase_common.py
@@ -185,21 +185,22 @@
 				if d.fields.has_key(x):
 					d.fields[x] = f_lst[x]
 			
-			item = sql("select is_stock_item, is_purchase_item, is_sub_contracted_item from tabItem where name=%s and (ifnull(end_of_life,'')='' or end_of_life = '0000-00-00' or end_of_life >	now())", d.item_code)
+			item = sql("select is_stock_item, is_purchase_item, is_sub_contracted_item, end_of_life from tabItem where name=%s", 
+				d.item_code)
 			if not item:
-				msgprint("Item %s does not exist in Item Master." % cstr(d.item_code))
-				raise Exception
+				msgprint("Item %s does not exist in Item Master." % cstr(d.item_code), raise_exception=True)
+			
+			from stock.utils import validate_end_of_life
+			validate_end_of_life(d.item_code, item[0][3])
 			
 			# validate stock item
 			if item[0][0]=='Yes' and d.qty and not d.warehouse:
-					msgprint("Warehouse is mandatory for %s, since it is a stock item" %
-					 	d.item_code, raise_exception=1)
+				msgprint("Warehouse is mandatory for %s, since it is a stock item" %
+				 	d.item_code, raise_exception=1)
 			
 			# validate purchase item
 			if item[0][1] != 'Yes' and item[0][2] != 'Yes':
-				msgprint("Item %s is not a purchase item or sub-contracted item. Please check" % (d.item_code))
-				raise Exception
-
+				msgprint("Item %s is not a purchase item or sub-contracted item. Please check" % (d.item_code), raise_exception=True)
 			
 			if d.fields.has_key('prevdoc_docname') and d.prevdoc_docname:
 				# check warehouse, uom	in previous doc and in current doc are same.
@@ -215,13 +216,13 @@
 				
 				# Check if Warehouse has been modified.
 				if not cstr(data[0]['warehouse']) == cstr(d.warehouse):
-					msgprint("Please check warehouse %s of Item %s which is not present in %s %s ." % (d.warehouse, d.item_code, d.prevdoc_doctype, d.prevdoc_docname))
-					raise Exception
+					msgprint("Please check warehouse %s of Item %s which is not present in %s %s ." % \
+						(d.warehouse, d.item_code, d.prevdoc_doctype, d.prevdoc_docname), raise_exception=True)
 				
 				#	Check if UOM has been modified.
 				if not cstr(data[0]['uom']) == cstr(d.uom) and not cstr(d.prevdoc_doctype) == 'Material Request':
-					msgprint("Please check UOM %s of Item %s which is not present in %s %s ." % (d.uom, d.item_code, d.prevdoc_doctype, d.prevdoc_docname))
-					raise Exception
+					msgprint("Please check UOM %s of Item %s which is not present in %s %s ." % \
+						(d.uom, d.item_code, d.prevdoc_doctype, d.prevdoc_docname), raise_exception=True)
 			
 			# list criteria that should not repeat if item is stock item
 			e = [d.schedule_date, d.item_code, d.description, d.warehouse, d.uom, d.fields.has_key('prevdoc_docname') and d.prevdoc_docname or '', d.fields.has_key('prevdoc_detail_docname') and d.prevdoc_detail_docname or '', d.fields.has_key('batch_no') and d.batch_no or '']
diff --git a/startup/schedule_handlers.py b/startup/schedule_handlers.py
index cc0d1f4..99cc05b 100644
--- a/startup/schedule_handlers.py
+++ b/startup/schedule_handlers.py
@@ -53,7 +53,7 @@
 
 	# daily backup
 	from setup.doctype.backup_manager.backup_manager import take_backups_daily
-	take_backups_daily()
+	run_fn(take_backups_daily)
 
 	# check reorder level
 	from stock.utils import reorder_item
@@ -61,7 +61,7 @@
 
 def execute_weekly():
 	from setup.doctype.backup_manager.backup_manager import take_backups_weekly
-	take_backups_weekly()
+	run_fn(take_backups_weekly)
 
 def execute_monthly():
 	pass
diff --git a/stock/doctype/stock_entry/test_stock_entry.py b/stock/doctype/stock_entry/test_stock_entry.py
index c3ce2d7..2ab2b1d 100644
--- a/stock/doctype/stock_entry/test_stock_entry.py
+++ b/stock/doctype/stock_entry/test_stock_entry.py
@@ -21,6 +21,9 @@
 		st2.insert()
 		st2.submit()
 		
+		from stock.utils import reorder_item
+		reorder_item()
+		
 		mr_name = webnotes.conn.sql("""select parent from `tabMaterial Request Item`
 			where item_code='_Test Item'""")
 			
diff --git a/stock/utils.py b/stock/utils.py
index 5e7e53b..53ad69b 100644
--- a/stock/utils.py
+++ b/stock/utils.py
@@ -19,13 +19,14 @@
 import json
 from webnotes.utils import flt, cstr, nowdate, add_days, cint
 from webnotes.defaults import get_global_default
+from webnotes.utils.email_lib import sendmail
 
 def validate_end_of_life(item_code, end_of_life=None, verbose=1):
 	if not end_of_life:
 		end_of_life = webnotes.conn.get_value("Item", item_code, "end_of_life")
 	
 	from webnotes.utils import getdate, now_datetime, formatdate
-	if end_of_life and getdate(end_of_life) > now_datetime().date():
+	if end_of_life and getdate(end_of_life) <= now_datetime().date():
 		msg = (_("Item") + " %(item_code)s: " + _("reached its end of life on") + \
 			" %(date)s. " + _("Please check") + ": %(end_of_life_label)s " + \
 			"in Item master") % {
@@ -205,7 +206,11 @@
 	if webnotes.auto_indent:
 		material_requests = {}
 		bin_list = webnotes.conn.sql("""select item_code, warehouse, projected_qty
-			from tabBin where ifnull(item_code, '') != '' and ifnull(warehouse, '') != ''""",
+			from tabBin where ifnull(item_code, '') != '' and ifnull(warehouse, '') != ''
+			and exists (select name from `tabItem` 
+				where `tabItem`.name = `tabBin`.item_code and 
+				is_stock_item='Yes' and (is_purchase_item='Yes' or is_sub_contracted_item='Yes') and
+				(ifnull(end_of_life, '')='') or end_of_life > now())""",
 			as_dict=True)
 		for bin in bin_list:
 			#check if re-order is required
@@ -220,7 +225,7 @@
 					["re_order_level", "re_order_qty"])
 				material_request_type = "Purchase"
 		
-			if reorder_level and flt(bin.projected_qty) < flt(reorder_level):
+			if flt(reorder_level) and flt(bin.projected_qty) < flt(reorder_level):
 				if flt(reorder_level) - flt(bin.projected_qty) > flt(reorder_qty):
 					reorder_qty = flt(reorder_level) - flt(bin.projected_qty)
 					
@@ -242,10 +247,14 @@
 	"""	Create indent on reaching reorder level	"""
 	mr_list = []
 	defaults = webnotes.defaults.get_defaults()
+	exceptions_list = []
 	for request_type in material_requests:
 		for company in material_requests[request_type]:
-			items = material_requests[request_type][company]
-			if items:
+			try:
+				items = material_requests[request_type][company]
+				if not items:
+					continue
+
 				mr = [{
 					"doctype": "Material Request",
 					"company": company,
@@ -257,27 +266,34 @@
 						quantity reaches re-order level when the following record was created""")
 				}]
 			
-			for d in items:
-				item = webnotes.doc("Item", d.item_code)
-				mr.append({
-					"doctype": "Material Request Item",
-					"parenttype": "Material Request",
-					"parentfield": "indent_details",
-					"item_code": d.item_code,
-					"schedule_date": add_days(nowdate(),cint(item.lead_time_days)),
-					"uom":	item.stock_uom,
-					"warehouse": d.warehouse,
-					"item_name": item.item_name,
-					"description": item.description,
-					"item_group": item.item_group,
-					"qty": d.reorder_qty,
-					"brand": item.brand,
-				})
+				for d in items:
+					item = webnotes.doc("Item", d.item_code)
+					mr.append({
+						"doctype": "Material Request Item",
+						"parenttype": "Material Request",
+						"parentfield": "indent_details",
+						"item_code": d.item_code,
+						"schedule_date": add_days(nowdate(),cint(item.lead_time_days)),
+						"uom":	item.stock_uom,
+						"warehouse": d.warehouse,
+						"item_name": item.item_name,
+						"description": item.description,
+						"item_group": item.item_group,
+						"qty": d.reorder_qty,
+						"brand": item.brand,
+					})
 			
-			mr_bean = webnotes.bean(mr)
-			mr_bean.insert()
-			mr_bean.submit()
-			mr_list.append(mr_bean)
+				mr_bean = webnotes.bean(mr)
+				mr_bean.insert()
+				mr_bean.submit()
+				mr_list.append(mr_bean)
+				
+			except:
+				if webnotes.message_log:
+					exceptions_list.append([] + webnotes.message_log)
+					webnotes.message_log = []
+				else:
+					exceptions_list.append(webnotes.getTraceback())
 
 	if mr_list:
 		if not hasattr(webnotes, "reorder_email_notify"):
@@ -286,11 +302,13 @@
 			
 		if(webnotes.reorder_email_notify):
 			send_email_notification(mr_list)
+
+	if exceptions_list:
+		notify_errors(exceptions_list)
 		
 def send_email_notification(mr_list):
 	""" Notify user about auto creation of indent"""
 	
-	from webnotes.utils.email_lib import sendmail
 	email_list = webnotes.conn.sql_list("""select distinct r.parent 
 		from tabUserRole r, tabProfile p
 		where p.name = r.parent and p.enabled = 1 and p.docstatus < 2
@@ -307,4 +325,22 @@
 				cstr(item.qty) + "</td><td>" + cstr(item.uom) + "</td></tr>"
 		msg += "</table>"
 
-	sendmail(email_list, subject='Auto Material Request Generation Notification', msg = msg)
\ No newline at end of file
+	sendmail(email_list, subject='Auto Material Request Generation Notification', msg = msg)
+	
+def notify_errors(exceptions_list):
+	subject = "[Important] [ERPNext] Error(s) while creating Material Requests based on Re-order Levels"
+	msg = """Dear System Manager,
+
+		An error occured for certain Items while creating Material Requests based on Re-order level.
+		
+		Please rectify these issues:
+		---
+
+		%s
+
+		---
+		Regards,
+		Administrator""" % ("\n\n".join(["\n".join(msg) for msg in exceptions_list]),)
+
+	from webnotes.profile import get_system_managers
+	sendmail(get_system_managers(), subject=subject, msg=msg)
