[fix] Error Reports
diff --git a/erpnext/accounts/doctype/pricing_rule/pricing_rule.py b/erpnext/accounts/doctype/pricing_rule/pricing_rule.py
index 9a3b312..076cccc 100644
--- a/erpnext/accounts/doctype/pricing_rule/pricing_rule.py
+++ b/erpnext/accounts/doctype/pricing_rule/pricing_rule.py
@@ -135,8 +135,10 @@
 			frappe.throw(_("Item Group not mentioned in item master for item {0}").format(args.item_code))
 
 	if args.customer and not (args.customer_group and args.territory):
-		args.customer_group, args.territory = frappe.db.get_value("Customer", args.customer,
-			["customer_group", "territory"])
+		customer = frappe.db.get_value("Customer", args.customer, ["customer_group", "territory"])
+		if customer:
+			args.customer_group, args.territory = customer
+
 	elif args.supplier and not args.supplier_type:
 		args.supplier_type = frappe.db.get_value("Supplier", args.supplier, "supplier_type")
 
diff --git a/erpnext/manufacturing/doctype/production_planning_tool/production_planning_tool.py b/erpnext/manufacturing/doctype/production_planning_tool/production_planning_tool.py
index 14418a8..0d55f8b 100644
--- a/erpnext/manufacturing/doctype/production_planning_tool/production_planning_tool.py
+++ b/erpnext/manufacturing/doctype/production_planning_tool/production_planning_tool.py
@@ -324,7 +324,7 @@
 			total_qty = sum([flt(d[0]) for d in so_item_qty])
 			if total_qty > item_projected_qty.get(item, 0):
 				# shortage
-				requested_qty = total_qty - item_projected_qty.get(item, 0)
+				requested_qty = total_qty - flt(item_projected_qty.get(item))
 				# consider minimum order qty
 				requested_qty = requested_qty > flt(so_item_qty[0][3]) and \
 					requested_qty or flt(so_item_qty[0][3])
diff --git a/erpnext/stock/doctype/material_request/material_request.js b/erpnext/stock/doctype/material_request/material_request.js
index e592f8d..3729b55 100644
--- a/erpnext/stock/doctype/material_request/material_request.js
+++ b/erpnext/stock/doctype/material_request/material_request.js
@@ -96,7 +96,7 @@
 			title: __("Get Items from BOM"),
 			fields: [
 				{"fieldname":"bom", "fieldtype":"Link", "label":__("BOM"),
-					options:"BOM"},
+					options:"BOM", reqd: 1},
 				{"fieldname":"fetch_exploded", "fieldtype":"Check",
 					"label":__("Fetch exploded BOM (including sub-assemblies)"), "default":1},
 				{fieldname:"fetch", "label":__("Get Items from BOM"), "fieldtype":"Button"}