Merge branch 'master' into develop
diff --git a/erpnext/__init__.py b/erpnext/__init__.py
index a16538f..fe93bc4 100644
--- a/erpnext/__init__.py
+++ b/erpnext/__init__.py
@@ -5,7 +5,7 @@
 from erpnext.hooks import regional_overrides
 from frappe.utils import getdate
 
-__version__ = '10.1.16'
+__version__ = '10.1.17'
 
 def get_default_company(user=None):
 	'''Get default company for user'''
diff --git a/erpnext/patches/v10_0/fix_reserved_qty_for_sub_contract.py b/erpnext/patches/v10_0/fix_reserved_qty_for_sub_contract.py
index d1715b6..c0a9e5e 100644
--- a/erpnext/patches/v10_0/fix_reserved_qty_for_sub_contract.py
+++ b/erpnext/patches/v10_0/fix_reserved_qty_for_sub_contract.py
@@ -6,6 +6,7 @@
 from erpnext.stock.utils import get_bin
 
 def execute():
+	frappe.reload_doc("stock", "doctype", "bin")
 	frappe.reload_doc("buying", "doctype", "purchase_order_item_supplied")
 	for d in frappe.db.sql("""
 		select distinct rm_item_code, reserve_warehouse
diff --git a/erpnext/stock/dashboard/item_dashboard.js b/erpnext/stock/dashboard/item_dashboard.js
index dff65af..edd594a 100644
--- a/erpnext/stock/dashboard/item_dashboard.js
+++ b/erpnext/stock/dashboard/item_dashboard.js
@@ -88,7 +88,7 @@
 		if(!data) data = [];
 
 		data.forEach(function(d) {
-			d.actual_or_pending = d.projected_qty + d.reserved_qty + d.reserved_qty_for_production;
+			d.actual_or_pending = d.projected_qty + d.reserved_qty + d.reserved_qty_for_production + d.reserved_qty_for_sub_contract;
 			d.pending_qty = 0;
 			d.total_reserved = d.reserved_qty + d.reserved_qty_for_production + d.reserved_qty_for_sub_contract;
 			if(d.actual_or_pending > d.actual_qty) {