[enhancement] Int, Currency, Float, Percent as not null and default to 0
diff --git a/erpnext/controllers/selling_controller.py b/erpnext/controllers/selling_controller.py
index 1ed8b8a..895f146 100644
--- a/erpnext/controllers/selling_controller.py
+++ b/erpnext/controllers/selling_controller.py
@@ -202,7 +202,7 @@
 			
 		delivered_via_si = frappe.db.sql("""select sum(si_item.qty) 
 			from `tabSales Invoice Item` si_item, `tabSales Invoice` si
-			where si_item.parent = si.name and ifnull(si.update_stock, 0) = 1
+			where si_item.parent = si.name and si.update_stock = 1
 			and si_item.so_detail = %s and si.docstatus = 1 
 			and si_item.sales_order = %s
 			and si.name != %s""", (so_detail, so, current_docname))