Merge branch 'master' of github.com:webnotes/erpnext
diff --git a/erpnext/stock/doctype/stock_reconciliation/stock_reconciliation.py b/erpnext/stock/doctype/stock_reconciliation/stock_reconciliation.py
index 8ea8273..08ef1bc 100644
--- a/erpnext/stock/doctype/stock_reconciliation/stock_reconciliation.py
+++ b/erpnext/stock/doctype/stock_reconciliation/stock_reconciliation.py
@@ -59,8 +59,7 @@
 				self.validate_item(s[0], count)
 				self.validate_warehouse(s[1], count)
 			
-				# encode as ascii
-				self.data.append([d.encode("ascii") for d in s])
+				self.data.append(s)
 				count += 1
 			
 		if not self.validated:
diff --git a/erpnext/stock/doctype/warehouse/warehouse.py b/erpnext/stock/doctype/warehouse/warehouse.py
index 8b08fab..f04f4ee 100644
--- a/erpnext/stock/doctype/warehouse/warehouse.py
+++ b/erpnext/stock/doctype/warehouse/warehouse.py
@@ -39,7 +39,8 @@
 		self.doclist = doclist
 		
 	def get_bin(self, item_code):
-		bin = sql("select name from tabBin where item_code = '%s' and warehouse = '%s'" % (item_code, self.doc.name))
+		bin = sql("select name from tabBin where item_code = %s and \
+				warehouse = %s", (item_code, self.doc.name))
 		bin = bin and bin[0][0] or ''
 		if not bin:
 			if not self.doc.warehouse_type :