[pos] [barcode] fixes #2831
diff --git a/erpnext/accounts/doctype/sales_invoice/pos.py b/erpnext/accounts/doctype/sales_invoice/pos.py
index 36d4044..bfdee2d 100644
--- a/erpnext/accounts/doctype/sales_invoice/pos.py
+++ b/erpnext/accounts/doctype/sales_invoice/pos.py
@@ -23,7 +23,7 @@
 			return item_code
 
 		# search barcode
-		item_code = frappe.db.sql("""select name from `tabItem` where barcode=%s""",
+		item_code = frappe.db.sql("""select name, item_code from `tabItem` where barcode=%s""",
 			(item), as_dict=1)
 		if item_code:
 			item_code[0]["barcode"] = item
diff --git a/erpnext/public/js/pos/pos.js b/erpnext/public/js/pos/pos.js
index 5aaadb4..8780ed8 100644
--- a/erpnext/public/js/pos/pos.js
+++ b/erpnext/public/js/pos/pos.js
@@ -108,12 +108,12 @@
 						var item = r.message[0];
 						if (item.serial_no) {
 							me.add_to_cart(item.item_code, item.serial_no);
-							this.search.$input.val("");
+							me.search.$input.val("");
 							return;
 
 						} else if (item.barcode) {
 							me.add_to_cart(item.item_code);
-							this.search.$input.val("");
+							me.search.$input.val("");
 							return;
 						}
 					}
diff --git a/erpnext/stock/doctype/item/item.json b/erpnext/stock/doctype/item/item.json
index 28bfb5a..f64dec6 100644
--- a/erpnext/stock/doctype/item/item.json
+++ b/erpnext/stock/doctype/item/item.json
@@ -109,6 +109,7 @@
    "fieldname": "barcode", 
    "fieldtype": "Data", 
    "label": "Barcode", 
+   "no_copy": 1, 
    "permlevel": 0, 
    "read_only": 0
   }, 
@@ -876,7 +877,7 @@
  "icon": "icon-tag", 
  "idx": 1, 
  "max_attachments": 1, 
- "modified": "2015-02-25 02:46:14.483577", 
+ "modified": "2015-03-02 07:48:53.411086", 
  "modified_by": "Administrator", 
  "module": "Stock", 
  "name": "Item",