[Minor Fixes] Findings in setting up erpnext
diff --git a/erpnext/buying/doctype/purchase_order/purchase_order.js b/erpnext/buying/doctype/purchase_order/purchase_order.js
index 78924e9..b6026fd 100644
--- a/erpnext/buying/doctype/purchase_order/purchase_order.js
+++ b/erpnext/buying/doctype/purchase_order/purchase_order.js
@@ -61,7 +61,7 @@
 			}
 		}
 
-		if(doc.docstatus == 1 && doc.status != "Closed") {
+		if(doc.docstatus == 1 && !in_list(["Closed", "Completed"], doc.status)) {
 			if(flt(doc.per_received, 2) < 100 && allow_receipt) {
 				cur_frm.add_custom_button(__('Receive'), this.make_purchase_receipt, __("Make"));
 
diff --git a/erpnext/buying/doctype/purchase_order/purchase_order.py b/erpnext/buying/doctype/purchase_order/purchase_order.py
index 5dd59e8..924a7bd 100644
--- a/erpnext/buying/doctype/purchase_order/purchase_order.py
+++ b/erpnext/buying/doctype/purchase_order/purchase_order.py
@@ -103,10 +103,7 @@
 					d.price_list_rate = d.base_price_list_rate / conversion_rate
 					d.rate = d.base_rate / conversion_rate
 				else:
-					# if no last purchase found, reset all values to 0
-					for field in ("base_price_list_rate", "base_rate",
-						"price_list_rate", "rate", "discount_percentage"):
-							d.set(field, 0)
+					msgprint(_("Last purchase rate not found"))
 
 					item_last_purchase_rate = frappe.db.get_value("Item", d.item_code, "last_purchase_rate")
 					if item_last_purchase_rate:
diff --git a/erpnext/manufacturing/doctype/production_planning_tool/production_planning_tool.js b/erpnext/manufacturing/doctype/production_planning_tool/production_planning_tool.js
index 6824013..5b97397 100644
--- a/erpnext/manufacturing/doctype/production_planning_tool/production_planning_tool.js
+++ b/erpnext/manufacturing/doctype/production_planning_tool/production_planning_tool.js
@@ -18,6 +18,10 @@
 cur_frm.add_fetch("sales_order", "base_grand_total", "grand_total");
 
 frappe.ui.form.on("Production Planning Tool", {
+	onload_post_render: function(frm) {
+	 		frm.get_field("items").grid.set_multiple_add("item_code", "planned_qty");
+	 },	
+	 
 	get_sales_orders: function(frm) {
 		frappe.call({
 			doc: frm.doc,
diff --git a/erpnext/projects/doctype/project/project.py b/erpnext/projects/doctype/project/project.py
index 90a2cb2..6e1dafe 100644
--- a/erpnext/projects/doctype/project/project.py
+++ b/erpnext/projects/doctype/project/project.py
@@ -126,7 +126,7 @@
 		self.total_purchase_cost = total_purchase_cost and total_purchase_cost[0][0] or 0
 
 	def send_welcome_email(self):
-		url = get_url("/project/{0}".format(self.name))
+		url = get_url("/project/?name={0}".format(self.name))
 		messages = (
 		_("You have been invited to collaborate on the project: {0}".format(self.name)),
 		url,
@@ -140,7 +140,6 @@
 
 		for user in self.users:
 			if user.welcome_email_sent==0:
-				print user.welcome_email_sent
 				frappe.sendmail(user.user, subject=_("Project Collaboration Invitation"), content=content.format(*messages), bulk=True)
 				user.welcome_email_sent=1
 
diff --git a/erpnext/templates/pages/projects.js b/erpnext/templates/pages/projects.js
index de9cb76..ecacc34 100644
--- a/erpnext/templates/pages/projects.js
+++ b/erpnext/templates/pages/projects.js
@@ -19,23 +19,6 @@
 		}
 	})
 
-	//
-	// $('.btn-closed-tasks').click(function() {
-	// 	reload_items('closed','tasks');
-	// });
-	//
-	// $('.btn-open-tasks').click(function() {
-	// 	reload_items('open','tasks');
-	// });
-	//
-	// $('.btn-closed-issues').click(function() {
-	// 	reload_items('closed','issues');
-	// });
-	//
-	// $('.btn-open-issues').click(function() {
-	// 	reload_items('open','issues');
-	// });
-
 	var start = 10;
 	$(".more-tasks").click(function() {
 		more_items('task', true);
@@ -66,7 +49,6 @@
 			},
 			dataType: "json",
 			success: function(data) {
-				console.log(data.message);
 				if(typeof data.message == 'undefined') {
 					$('.project-'+ item).html("No "+ item_status +" "+ item);
 					$(".more-"+ item).toggle(false);