Merge pull request #5216 from umairsy/is-sales-purchase

Removed Is Sales Item and Is Purchase Item
diff --git a/erpnext/stock/doctype/bin/bin.py b/erpnext/stock/doctype/bin/bin.py
index 3d57b4d..ae7c6e7 100644
--- a/erpnext/stock/doctype/bin/bin.py
+++ b/erpnext/stock/doctype/bin/bin.py
@@ -84,5 +84,5 @@
 def update_item_projected_qty(item_code):
 	'''Set Item project qty'''
 	frappe.db.sql('''update tabItem set
-		total_projected_qty = (select sum(projected_qty) from tabBin where item_code=%s)
+		total_projected_qty = ifnull((select sum(projected_qty) from tabBin where item_code=%s), 0)
 		where name=%s''', (item_code, item_code))