fixes merge conflict
diff --git a/buying/doctype/purchase_common/purchase_common.py b/buying/doctype/purchase_common/purchase_common.py
index 79e4fe0..615c453 100644
--- a/buying/doctype/purchase_common/purchase_common.py
+++ b/buying/doctype/purchase_common/purchase_common.py
@@ -22,6 +22,7 @@
 from webnotes.model.wrapper import getlist
 from webnotes.model.code import get_obj
 from webnotes import msgprint, _
+
 from buying.utils import get_last_purchase_details
 
 sql = webnotes.conn.sql
@@ -255,23 +256,23 @@
 				else:
 					chk_dupl_itm.append(f)
 
-# Validate values with reference document
-	#---------------------------------------
 	def validate_reference_value(self, obj):
 		ref_doc = []
 		for d in getlist(obj.doclist, obj.fname):
 			if d.prevdoc_doctype and d.prevdoc_docname and d.prevdoc_doctype not in ref_doc:
 				mapper_name = d.prevdoc_doctype + '-' + obj.doc.doctype
-				get_obj('DocType Mapper', mapper_name, with_children = 1).validate_reference_value(obj, obj.doc.name)
+				get_obj('DocType Mapper', mapper_name, with_children = 1).\
+					validate_reference_value(obj, obj.doc.name)
 				ref_doc.append(d.prevdoc_doctype)
 
 
 	# Check for Stopped status 
 	def check_for_stopped_status(self, doctype, docname):
-		stopped = sql("select name from `tab%s` where name = '%s' and status = 'Stopped'" % ( doctype, docname))
+		stopped = sql("select name from `tab%s` where name = '%s' and status = 'Stopped'" % 
+			( doctype, docname))
 		if stopped:
-			msgprint("One cannot do any transaction against %s : %s, it's status is 'Stopped'" % ( doctype, docname))
-			raise Exception
+			msgprint("One cannot do any transaction against %s : %s, it's status is 'Stopped'" % 
+				( doctype, docname), raise_exception=1)
 			
 	# Check Docstatus of Next DocType on Cancel AND of Previous DocType on Submit
 	def check_docstatus(self, check, doctype, docname , detail_doctype = ''):
@@ -444,9 +445,6 @@
 			idx += 1
 		return obj.doclist
 
-
-	# Get Tax rate if account type is TAX
-	# =========================================================================
 	def get_rate(self, arg, obj):
 		arg = eval(arg)
 		rate = sql("select account_type, tax_rate from `tabAccount` where name = '%s'" %(arg['account_head']), as_dict=1)
@@ -456,17 +454,11 @@
 		}
 		#msgprint(ret)
 		return ret
-
-
-				
-	# Get total in words
-	# ==================================================================	
+	
 	def get_total_in_words(self, currency, amount):
 		from webnotes.utils import money_in_words
 		return money_in_words(amount, currency)	
 	
-	# get against document date	
-	#-----------------------------
 	def get_prevdoc_date(self, obj):
 		for d in getlist(obj.doclist, obj.fname):
 			if d.prevdoc_doctype and d.prevdoc_docname:
diff --git a/stock/doctype/batch/batch.js b/stock/doctype/batch/batch.js
new file mode 100644
index 0000000..93979da
--- /dev/null
+++ b/stock/doctype/batch/batch.js
@@ -0,0 +1,21 @@
+// ERPNext - web based ERP (http://erpnext.com)
+// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+// 
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+// 
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+// 
+// You should have received a copy of the GNU General Public License
+// along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+cur_frm.fields_dict['item'].get_query = function(doc, cdt, cdn) {
+	return erpnext.queries.item({
+		'ifnull(tabItem.is_stock_item, "No")': 'Yes'
+	})
+}
\ No newline at end of file