-am
diff --git a/stock/doctype/item/item.py b/stock/doctype/item/item.py
index 2c702a6..9b69e9a 100644
--- a/stock/doctype/item/item.py
+++ b/stock/doctype/item/item.py
@@ -77,8 +77,8 @@
 				bin_list = webnotes.conn.sql("select * from tabBin where item_code=%s", 
 					self.doc.item_code, as_dict=1)
 				for bin in bin_list:
-					if bin.reserved_qty > 0 or bin.ordered_qty > 0 or bin.indented_qty > 0 \
-						or bin.planned_qty > 0 and cstr(bin.stock_uom) != cstr(self.doc.stock_uom):
+					if (bin.reserved_qty > 0 or bin.ordered_qty > 0 or bin.indented_qty > 0 \
+						or bin.planned_qty > 0) and cstr(bin.stock_uom) != cstr(self.doc.stock_uom):
 							matched = False
 							break