[Fix] batch no searching in pos
diff --git a/erpnext/accounts/doctype/sales_invoice/pos.py b/erpnext/accounts/doctype/sales_invoice/pos.py
index 605bf09..9f64e07 100644
--- a/erpnext/accounts/doctype/sales_invoice/pos.py
+++ b/erpnext/accounts/doctype/sales_invoice/pos.py
@@ -20,7 +20,7 @@
 	if pos_profile.get('name'):
 		pos_profile = frappe.get_doc('POS Profile', pos_profile.get('name'))
 	else:
-		frappe.msgprint('<a href="#Form/POS Profile/New POS Profile">'
+		frappe.msgprint('<a href="#List/POS Profile">'
 			+ _("Welcome to POS: Create your POS Profile") + '</a>');
 
 	update_pos_profile_data(doc, pos_profile)
@@ -115,7 +115,7 @@
 		item.actual_qty = frappe.db.get_value('Bin', {'item_code': item.name,
 								'warehouse': item.default_warehouse}, 'actual_qty') or 0
 		item.serial_nos = get_serial_nos(item, pos_profile)
-		item.batch_nos = frappe.db.sql_list("""select name from `tabBatch` where expiry_date > curdate()
+		item.batch_nos = frappe.db.sql_list("""select name from `tabBatch` where ifnull(expiry_date, '4000-10-10') > curdate()
 			and item = %(item_code)s""", {'item_code': item.item_code})
 
 		item_list.append(item)
diff --git a/erpnext/accounts/page/pos/pos.js b/erpnext/accounts/page/pos/pos.js
index a89f40e..1830103 100644
--- a/erpnext/accounts/page/pos/pos.js
+++ b/erpnext/accounts/page/pos/pos.js
@@ -423,16 +423,16 @@
 
 		if(key){
 			return $.grep(window.items, function(item){
-				if( (item.item_code.toLowerCase().match(key)) ||
-				(item.item_name.toLowerCase().match(key)) || (item.item_group.toLowerCase().match(key)) ){
+				if(in_list(item.batch_nos, me.search.$input.val())){
+					return me.item_batch_no[item.item_code] = me.search.$input.val()
+				} else if((item.item_code.toLowerCase().match(key)) ||
+				(item.item_name.toLowerCase().match(key)) || (item.item_group.toLowerCase().match(key))){
 					return true
 				}else if(item.barcode == me.search.$input.val()){
 					return item.barcode == me.search.$input.val();
 				} else if (in_list(Object.keys(item.serial_nos), me.search.$input.val())){
 					me.item_serial_no[item.item_code] = [me.search.$input.val(), item.serial_nos[me.search.$input.val()]]
 					return true
-				} else if(in_list(item.batch_nos, me.search.$input.val())){
-					return me.item_batch_no[item.item_code] = me.search.$input.val()
 				}
 			})
 		}else{