fixed merge conflict
diff --git a/erpnext/accounts/doctype/payment_request/payment_request.json b/erpnext/accounts/doctype/payment_request/payment_request.json
index e916034..74a18fc 100644
--- a/erpnext/accounts/doctype/payment_request/payment_request.json
+++ b/erpnext/accounts/doctype/payment_request/payment_request.json
@@ -598,13 +598,13 @@
  "hide_heading": 0, 
  "hide_toolbar": 0, 
  "idx": 0, 
- "in_create": 0, 
+ "in_create": 1, 
  "in_dialog": 0, 
  "is_submittable": 1, 
  "issingle": 0, 
  "istable": 0, 
  "max_attachments": 0, 
- "modified": "2016-02-24 16:49:46.832403", 
+ "modified": "2016-04-12 15:26:22.756129", 
  "modified_by": "Administrator", 
  "module": "Accounts", 
  "name": "Payment Request", 
@@ -675,5 +675,6 @@
  "read_only": 0, 
  "read_only_onload": 0, 
  "sort_field": "modified", 
- "sort_order": "DESC"
+ "sort_order": "DESC", 
+ "track_seen": 0
 }
\ No newline at end of file
diff --git a/erpnext/accounts/report/accounts_receivable/accounts_receivable.html b/erpnext/accounts/report/accounts_receivable/accounts_receivable.html
index 69c88ed..712d35b 100644
--- a/erpnext/accounts/report/accounts_receivable/accounts_receivable.html
+++ b/erpnext/accounts/report/accounts_receivable/accounts_receivable.html
@@ -37,9 +37,12 @@
 						<br>{%= data[i][__("Voucher No")] %}</td>
 					<td>{%= data[i][__("Customer Name")] || data[i][__("Customer")] || data[i][__("Supplier Name")] || data[i][__("Supplier")] %}
 						<br>{%= __("Remarks") %}: {%= data[i][__("Remarks")] %}</td>
-					<td style="text-align: right">{%= format_currency(data[i][__("Invoiced Amount")]) %}</td>
-					<td style="text-align: right">{%= format_currency(data[i][__("Paid Amount")]) %}</td>
-					<td style="text-align: right">{%= format_currency(data[i][__("Outstanding Amount")]) %}</td>
+					<td style="text-align: right">
+						{%= format_currency(data[i][__("Invoiced Amount")], data[i]["currency"]) %}</td>
+					<td style="text-align: right">
+						{%= format_currency(data[i][__("Paid Amount")], data[i]["currency"]) %}</td>
+					<td style="text-align: right">
+						{%= format_currency(data[i][__("Outstanding Amount")], data[i]["currency"]) %}</td>
 				{% } else { %}
 					<td></td>
 					<td></td>
diff --git a/erpnext/accounts/report/accounts_receivable/accounts_receivable.py b/erpnext/accounts/report/accounts_receivable/accounts_receivable.py
index 39fe5c4..365212a 100644
--- a/erpnext/accounts/report/accounts_receivable/accounts_receivable.py
+++ b/erpnext/accounts/report/accounts_receivable/accounts_receivable.py
@@ -58,21 +58,19 @@
 					"width": 120
 				})
 
+		columns.append({
+			"fieldname": "currency",
+			"label": _("Currency"),
+			"fieldtype": "Data",
+			"width": 100
+		})
 		if args.get("party_type") == "Customer":
 			columns += [_("Territory") + ":Link/Territory:80"]
 		if args.get("party_type") == "Supplier":
 			columns += [_("Supplier Type") + ":Link/Supplier Type:80"]
-		columns += [
-			{
-				"fieldname": "currency",
-				"label": _("Currency"),
-				"fieldtype": "Data",
-				"width": 100,
-				"hidden": 1
-			},
-			_("Remarks") + "::200"
-		]
-
+			
+		columns.append(_("Remarks") + "::200")
+		
 		return columns
 
 	def get_data(self, party_naming_by, args):
@@ -120,17 +118,17 @@
 					row += get_ageing_data(cint(self.filters.range1), cint(self.filters.range2),
 						cint(self.filters.range3), self.age_as_on, entry_date, outstanding_amount)
 
+					if self.filters.get(scrub(args.get("party_type"))):
+						row.append(gle.account_currency)
+					else:
+						row.append(company_currency)
+
 					# customer territory / supplier type
 					if args.get("party_type") == "Customer":
 						row += [self.get_territory(gle.party)]
 					if args.get("party_type") == "Supplier":
 						row += [self.get_supplier_type(gle.party)]
 
-					if self.filters.get(scrub(args.get("party_type"))):
-						row.append(gle.account_currency)
-					else:
-						row.append(company_currency)
-
 					row.append(gle.remarks)
 					data.append(row)
 
diff --git a/erpnext/accounts/report/accounts_receivable_summary/accounts_receivable_summary.py b/erpnext/accounts/report/accounts_receivable_summary/accounts_receivable_summary.py
index 60eade4..36e9734 100644
--- a/erpnext/accounts/report/accounts_receivable_summary/accounts_receivable_summary.py
+++ b/erpnext/accounts/report/accounts_receivable_summary/accounts_receivable_summary.py
@@ -18,18 +18,25 @@
 			columns += [ args.get("party_type") + " Name::140"]
 
 		columns += [
-			_("Total Invoiced Amt") + ":Currency:140",
-			_("Total Paid Amt") + ":Currency:140",
-			_("Total Outstanding Amt") + ":Currency:160",
-			"0-" + str(self.filters.range1) + ":Currency:100",
-			str(self.filters.range1) + "-" + str(self.filters.range2) + ":Currency:100",
-			str(self.filters.range2) + "-" + str(self.filters.range3) + ":Currency:100",
-			str(self.filters.range3) + _("-Above") + ":Currency:100"]
+			_("Total Invoiced Amt") + ":Currency/currency:140",
+			_("Total Paid Amt") + ":Currency/currency:140",
+			_("Total Outstanding Amt") + ":Currency/currency:160",
+			"0-" + str(self.filters.range1) + ":Currency/currency:100",
+			str(self.filters.range1) + "-" + str(self.filters.range2) + ":Currency/currency:100",
+			str(self.filters.range2) + "-" + str(self.filters.range3) + ":Currency/currency:100",
+			str(self.filters.range3) + _("-Above") + ":Currency/currency:100"]
 
 		if args.get("party_type") == "Customer":
 			columns += [_("Territory") + ":Link/Territory:80"]
 		if args.get("party_type") == "Supplier":
 			columns += [_("Supplier Type") + ":Link/Supplier Type:80"]
+			
+		columns.append({
+			"fieldname": "currency",
+			"label": _("Currency"),
+			"fieldtype": "Data",
+			"width": 80
+		})
 
 		return columns
 
@@ -53,6 +60,8 @@
 				row += [self.get_territory(party)]
 			if args.get("party_type") == "Supplier":
 				row += [self.get_supplier_type(party)]
+				
+			row.append(party_dict.currency)
 			data.append(row)
 
 		return data
@@ -73,6 +82,8 @@
 			)
 			for k in party_total[d.party].keys():
 				party_total[d.party][k] += d.get(k, 0)
+				
+			party_total[d.party].currency = d.currency
 
 		return party_total
 
@@ -90,7 +101,7 @@
 			cols += ["bill_no", "bill_date"]
 
 		cols += ["invoiced_amt", "paid_amt",
-		"outstanding_amt", "age", "range1", "range2", "range3", "range4"]
+		"outstanding_amt", "age", "range1", "range2", "range3", "range4", "currency"]
 
 		if args.get("party_type") == "Supplier":
 			cols += ["supplier_type", "remarks"]
diff --git a/erpnext/accounts/report/gross_profit/gross_profit.py b/erpnext/accounts/report/gross_profit/gross_profit.py
index ba87cf1..4ae0e67 100644
--- a/erpnext/accounts/report/gross_profit/gross_profit.py
+++ b/erpnext/accounts/report/gross_profit/gross_profit.py
@@ -145,11 +145,11 @@
 			self.data.append(row)
 
 		if self.grouped:
-			self.collapse_group()
+			self.get_average_rate_based_on_group_by()
 		else:
 			self.grouped_data = []
 
-	def collapse_group(self):
+	def get_average_rate_based_on_group_by(self):
 		# sum buying / selling totals for group
 		self.grouped_data = []
 		for key in self.grouped.keys():
@@ -166,6 +166,8 @@
 				if new_row.base_amount else 0
 			new_row.buying_rate = (new_row.buying_amount / new_row.qty) \
 				if new_row.qty else 0
+			new_row.base_rate = (new_row.base_amount / new_row.qty) \
+				if new_row.qty else 0
 
 			self.grouped_data.append(new_row)
 
diff --git a/erpnext/accounts/report/item_wise_purchase_register/item_wise_purchase_register.py b/erpnext/accounts/report/item_wise_purchase_register/item_wise_purchase_register.py
index 7be5649..f1e706e 100644
--- a/erpnext/accounts/report/item_wise_purchase_register/item_wise_purchase_register.py
+++ b/erpnext/accounts/report/item_wise_purchase_register/item_wise_purchase_register.py
@@ -16,6 +16,14 @@
 	if item_list:
 		item_tax, tax_accounts = get_tax_accounts(item_list, columns)
 
+	columns.append({
+		"fieldname": "currency",
+		"label": _("Currency"),
+		"fieldtype": "Data",
+		"width": 80
+	})
+	company_currency = frappe.db.get_value("Company", filters.company, "default_currency")
+	print company_currency
 	data = []
 	for d in item_list:
 		purchase_receipt = None
@@ -34,7 +42,7 @@
 			row.append(item_tax.get(d.parent, {}).get(d.item_code, {}).get(tax, 0))
 
 		total_tax = sum(row[last_col:])
-		row += [total_tax, d.base_net_amount + total_tax]
+		row += [total_tax, d.base_net_amount + total_tax, company_currency]
 
 		data.append(row)
 
@@ -48,7 +56,8 @@
 		"Supplier Name::120", "Payable Account:Link/Account:120", _("Project") + ":Link/Project:80",
 		_("Company") + ":Link/Company:100", _("Purchase Order") + ":Link/Purchase Order:100",
 		_("Purchase Receipt") + ":Link/Purchase Receipt:100", _("Expense Account") + ":Link/Account:140",
-		_("Qty") + ":Float:120", _("Rate") + ":Currency:120", _("Amount") + ":Currency:120"]
+		_("Qty") + ":Float:120", _("Rate") + ":Currency/currency:120", _("Amount") + ":Currency/currency:120"
+	]
 
 def get_conditions(filters):
 	conditions = ""
@@ -110,7 +119,7 @@
 					(tax_amount * d.base_net_amount) / d.base_net_total
 
 	tax_accounts.sort()
-	columns += [account_head + ":Currency:80" for account_head in tax_accounts]
-	columns += ["Total Tax:Currency:80", "Total:Currency:80"]
+	columns += [account_head + ":Currency/currency:80" for account_head in tax_accounts]
+	columns += ["Total Tax:Currency/currency:80", "Total:Currency/currency:80"]
 
 	return item_tax, tax_accounts
diff --git a/erpnext/accounts/report/item_wise_sales_register/item_wise_sales_register.py b/erpnext/accounts/report/item_wise_sales_register/item_wise_sales_register.py
index e3c4753..2401202 100644
--- a/erpnext/accounts/report/item_wise_sales_register/item_wise_sales_register.py
+++ b/erpnext/accounts/report/item_wise_sales_register/item_wise_sales_register.py
@@ -14,7 +14,14 @@
 	item_list = get_items(filters)
 	if item_list:
 		item_tax, tax_accounts = get_tax_accounts(item_list, columns)
-
+	columns.append({
+		"fieldname": "currency",
+		"label": _("Currency"),
+		"fieldtype": "Data",
+		"width": 80
+	})
+	company_currency = frappe.db.get_value("Company", filters.company, "default_currency")
+	
 	data = []
 	for d in item_list:
 		delivery_note = None
@@ -32,7 +39,7 @@
 			row.append(item_tax.get(d.parent, {}).get(d.item_code, {}).get(tax, 0))
 
 		total_tax = sum(row[last_col:])
-		row += [total_tax, d.base_net_amount + total_tax]
+		row += [total_tax, d.base_net_amount + total_tax, company_currency]
 
 		data.append(row)
 
@@ -48,7 +55,7 @@
 		_("Project") + ":Link/Project:80", _("Company") + ":Link/Company:100",
 		_("Sales Order") + ":Link/Sales Order:100", _("Delivery Note") + ":Link/Delivery Note:100",
 		_("Income Account") + ":Link/Account:140", _("Qty") + ":Float:120",
-		_("Rate") + ":Currency:120", _("Amount") + ":Currency:120"
+		_("Rate") + ":Currency/currency:120", _("Amount") + ":Currency/currency:120"
 	]
 
 def get_conditions(filters):
@@ -108,7 +115,7 @@
 					flt((tax_amount * d.base_net_amount) / d.base_net_total)
 
 	tax_accounts.sort()
-	columns += [account_head + ":Currency:80" for account_head in tax_accounts]
-	columns += ["Total Tax:Currency:80", "Total:Currency:80"]
+	columns += [account_head + ":Currency/currency:80" for account_head in tax_accounts]
+	columns += ["Total Tax:Currency/currency:80", "Total:Currency/currency:80"]
 
 	return item_tax, tax_accounts
diff --git a/erpnext/accounts/report/purchase_register/purchase_register.py b/erpnext/accounts/report/purchase_register/purchase_register.py
index c869803..7934bf2 100644
--- a/erpnext/accounts/report/purchase_register/purchase_register.py
+++ b/erpnext/accounts/report/purchase_register/purchase_register.py
@@ -21,6 +21,8 @@
 		invoice_expense_map, expense_accounts)
 	invoice_po_pr_map = get_invoice_po_pr_map(invoice_list)
 	supplier_details = get_supplier_deatils(invoice_list)
+	
+	company_currency = frappe.db.get_value("Company", filters.company, "default_currency")
 
 	data = []
 	for inv in invoice_list:
@@ -32,7 +34,7 @@
 		row = [inv.name, inv.posting_date, inv.supplier, inv.supplier_name,
 			supplier_details.get(inv.supplier),
 			inv.credit_to, ", ".join(project), inv.bill_no, inv.bill_date, inv.remarks,
-			", ".join(purchase_order), ", ".join(purchase_receipt)]
+			", ".join(purchase_order), ", ".join(purchase_receipt), company_currency]
 
 		# map expense values
 		base_net_total = 0
@@ -62,10 +64,19 @@
 def get_columns(invoice_list):
 	"""return columns based on filters"""
 	columns = [
-		_("Invoice") + ":Link/Purchase Invoice:120", _("Posting Date") + ":Date:80", _("Supplier Id") + "::120",
-		_("Supplier Name") + "::120", _("Supplier Type") + ":Link/Supplier Type:120", _("Payable Account") + ":Link/Account:120",
-		_("Project") + ":Link/Project:80", _("Bill No") + "::120", _("Bill Date") + ":Date:80", _("Remarks") + "::150",
-		_("Purchase Order") + ":Link/Purchase Order:100", _("Purchase Receipt") + ":Link/Purchase Receipt:100"
+		_("Invoice") + ":Link/Purchase Invoice:120", 
+		_("Posting Date") + ":Date:80", _("Supplier Id") + "::120",
+		_("Supplier Name") + "::120", _("Supplier Type") + ":Link/Supplier Type:120", 
+		_("Payable Account") + ":Link/Account:120", _("Project") + ":Link/Project:80", 
+		_("Bill No") + "::120", _("Bill Date") + ":Date:80", _("Remarks") + "::150",
+		_("Purchase Order") + ":Link/Purchase Order:100", 
+		_("Purchase Receipt") + ":Link/Purchase Receipt:100",
+		{
+			"fieldname": "currency",
+			"label": _("Currency"),
+			"fieldtype": "Data",
+			"width": 80
+		}
 	]
 	expense_accounts = tax_accounts = expense_columns = tax_columns = []
 
@@ -84,14 +95,14 @@
 			', '.join(['%s']*len(invoice_list)), tuple([inv.name for inv in invoice_list]))
 
 
-	expense_columns = [(account + ":Currency:120") for account in expense_accounts]
+	expense_columns = [(account + ":Currency/currency:120") for account in expense_accounts]
 	for account in tax_accounts:
 		if account not in expense_accounts:
-			tax_columns.append(account + ":Currency:120")
+			tax_columns.append(account + ":Currency/currency:120")
 
-	columns = columns + expense_columns + [_("Net Total") + ":Currency:120"] + tax_columns + \
-		[_("Total Tax") + ":Currency:120", _("Grand Total") + ":Currency:120",
-			_("Rounded Total") + ":Currency:120", _("Outstanding Amount") + ":Currency:120"]
+	columns = columns + expense_columns + [_("Net Total") + ":Currency/currency:120"] + tax_columns + \
+		[_("Total Tax") + ":Currency/currency:120", _("Grand Total") + ":Currency/currency:120",
+			_("Rounded Total") + ":Currency/currency:120", _("Outstanding Amount") + ":Currency/currency:120"]
 
 	return columns, expense_accounts, tax_accounts
 
diff --git a/erpnext/accounts/report/sales_register/sales_register.py b/erpnext/accounts/report/sales_register/sales_register.py
index f68adad..d09cfc1 100644
--- a/erpnext/accounts/report/sales_register/sales_register.py
+++ b/erpnext/accounts/report/sales_register/sales_register.py
@@ -22,6 +22,7 @@
 
 	invoice_so_dn_map = get_invoice_so_dn_map(invoice_list)
 	customer_map = get_customer_deatils(invoice_list)
+	company_currency = frappe.db.get_value("Company", filters.company, "default_currency")
 
 	data = []
 	for inv in invoice_list:
@@ -32,7 +33,8 @@
 		row = [inv.name, inv.posting_date, inv.customer, inv.customer_name,
 		customer_map.get(inv.customer, {}).get("customer_group"), 
 		customer_map.get(inv.customer, {}).get("territory"),
-		inv.debit_to, inv.project, inv.remarks, ", ".join(sales_order), ", ".join(delivery_note)]
+		inv.debit_to, inv.project, inv.remarks, 
+		", ".join(sales_order), ", ".join(delivery_note), company_currency]
 
 		# map income values
 		base_net_total = 0
@@ -66,7 +68,13 @@
 		_("Invoice") + ":Link/Sales Invoice:120", _("Posting Date") + ":Date:80", _("Customer Id") + "::120",
 		_("Customer Name") + "::120", _("Customer Group") + ":Link/Customer Group:120", _("Territory") + ":Link/Territory:80",
 		_("Receivable Account") + ":Link/Account:120", _("Project") +":Link/Project:80", _("Remarks") + "::150",
-		_("Sales Order") + ":Link/Sales Order:100", _("Delivery Note") + ":Link/Delivery Note:100"
+		_("Sales Order") + ":Link/Sales Order:100", _("Delivery Note") + ":Link/Delivery Note:100",
+		{
+			"fieldname": "currency",
+			"label": _("Currency"),
+			"fieldtype": "Data",
+			"width": 80
+		}
 	]
 
 	income_accounts = tax_accounts = income_columns = tax_columns = []
@@ -83,14 +91,14 @@
 			and parent in (%s) order by account_head""" %
 			', '.join(['%s']*len(invoice_list)), tuple([inv.name for inv in invoice_list]))
 
-	income_columns = [(account + ":Currency:120") for account in income_accounts]
+	income_columns = [(account + ":Currency/currency:120") for account in income_accounts]
 	for account in tax_accounts:
 		if account not in income_accounts:
-			tax_columns.append(account + ":Currency:120")
+			tax_columns.append(account + ":Currency/currency:120")
 
-	columns = columns + income_columns + [_("Net Total") + ":Currency:120"] + tax_columns + \
-		[_("Total Tax") + ":Currency:120", _("Grand Total") + ":Currency:120",
-		_("Rounded Total") + ":Currency:120", _("Outstanding Amount") + ":Currency:120"]
+	columns = columns + income_columns + [_("Net Total") + ":Currency/currency:120"] + tax_columns + \
+		[_("Total Tax") + ":Currency/currency:120", _("Grand Total") + ":Currency/currency:120",
+		_("Rounded Total") + ":Currency/currency:120", _("Outstanding Amount") + ":Currency/currency:120"]
 
 	return columns, income_accounts, tax_accounts
 
diff --git a/erpnext/buying/doctype/purchase_common/purchase_common.js b/erpnext/buying/doctype/purchase_common/purchase_common.js
index 9a9a865..c67a30f 100644
--- a/erpnext/buying/doctype/purchase_common/purchase_common.js
+++ b/erpnext/buying/doctype/purchase_common/purchase_common.js
@@ -171,18 +171,10 @@
 			erpnext.buying.get_items_from_product_bundle(me.frm);
 		}, __("Get items from"));
 	},
-	
-	company: function() {
-		var me = this;
-		if (frappe.meta.get_docfield(this.frm.doctype, "shipping_address") 
-			&& !this.frm.doc.shipping_address) {
-				erpnext.utils.get_shipping_address(this.frm)
-		}
-	},
-	
+
 	shipping_address: function(){
 		var me = this;
-		
+
 		this.frm.set_query("shipping_address", function(){
 			if(me.frm.doc.customer){
 				return{
@@ -200,8 +192,8 @@
 				}
 			}
 		});
-		
-		erpnext.utils.get_address_display(this.frm, "shipping_address", 
+
+		erpnext.utils.get_address_display(this.frm, "shipping_address",
 			"shipping_address_display", is_your_company_address=true)
 	}
 });
diff --git a/erpnext/public/js/controllers/transaction.js b/erpnext/public/js/controllers/transaction.js
index 6de5154..a1b3846 100644
--- a/erpnext/public/js/controllers/transaction.js
+++ b/erpnext/public/js/controllers/transaction.js
@@ -308,7 +308,15 @@
 
 		if (this.frm.doc.posting_date) var date = this.frm.doc.posting_date;
 		else var date = this.frm.doc.transaction_date;
-		set_party_account(set_pricing);
+		
+		if (frappe.meta.get_docfield(this.frm.doctype, "shipping_address") && 
+			in_list(['Purchase Order', 'Purchase Receipt', 'Purchase Invoice'], this.frm.doctype)){
+				erpnext.utils.get_shipping_address(this.frm, function(){
+					set_party_account(set_pricing);
+				})
+		}else{
+			set_party_account(set_pricing);
+		}
 
 		if(this.frm.doc.company) {
 			erpnext.last_selected_company = this.frm.doc.company;
diff --git a/erpnext/public/js/utils/party.js b/erpnext/public/js/utils/party.js
index e57fbff..d630779 100644
--- a/erpnext/public/js/utils/party.js
+++ b/erpnext/public/js/utils/party.js
@@ -69,14 +69,12 @@
 				if(r.message) {
 					frm.set_value(display_field, r.message)
 				}
-
 				erpnext.utils.set_taxes(frm, address_field, display_field, is_your_company_address);
 			}
 		})
 	} else {
 		frm.set_value(display_field, null);
 	}
-
 };
 
 erpnext.utils.set_taxes = function(frm, address_field, display_field, is_your_company_address) {
@@ -149,7 +147,7 @@
 	return true;
 }
 
-erpnext.utils.get_shipping_address = function(frm){
+erpnext.utils.get_shipping_address = function(frm, callback){
 	frappe.call({
 		method: "erpnext.utilities.doctype.address.address.get_shipping_address",
 		args: {company: frm.doc.company},
@@ -158,6 +156,10 @@
 				frm.set_value("shipping_address", r.message[0]) //Address title or name
 				frm.set_value("shipping_address_display", r.message[1]) //Address to be displayed on the page
 			}
+
+			if(callback){
+				return callback();
+			}
 		}
 	});
 }
diff --git a/erpnext/selling/report/pending_so_items_for_purchase_request/pending_so_items_for_purchase_request.json b/erpnext/selling/report/pending_so_items_for_purchase_request/pending_so_items_for_purchase_request.json
index 6b19b63..a0a7505 100644
--- a/erpnext/selling/report/pending_so_items_for_purchase_request/pending_so_items_for_purchase_request.json
+++ b/erpnext/selling/report/pending_so_items_for_purchase_request/pending_so_items_for_purchase_request.json
@@ -7,12 +7,12 @@
  "doctype": "Report", 
  "idx": 1, 
  "is_standard": "Yes", 
- "modified": "2015-10-06 12:43:48.259027", 
+ "modified": "2016-04-12 18:45:49.733159", 
  "modified_by": "Administrator", 
  "module": "Selling", 
  "name": "Pending SO Items For Purchase Request", 
  "owner": "Administrator", 
- "query": "select  so_item.item_code as \"Item Code:Link/Item:120\",\n so_item.item_name as \"Item Name::120\",\n so_item.description as \"Description::120\",\n so.`name` as \"S.O. No.:Link/Sales Order:120\",\n so.`transaction_date` as \"Date:Date:120\",\n mr.name as \"Material Request:Link/Material Request:120\",\n so.customer as \"Customer:Link/Customer:120\",\n so.territory as \"Terretory:Link/Territory:120\",\n sum(so_item.qty) as \"SO Qty:Float:100 \",\n sum(mr_item.qty) as \"Requested Qty:Float:100\",\n sum(so_item.qty) - sum(mr_item.qty) as \"Pending Qty:Float:100 \", \n so.company as \"Company:Link/Company:\"\nfrom\n `tabSales Order` so, `tabSales Order Item` so_item, \n `tabMaterial Request` mr, `tabMaterial Request Item` mr_item\nwhere \n so_item.`parent` = so.`name` \n and mr_item.parent = mr.name\n and mr_item.sales_order = so.name\n and mr_item.item_code = so_item.item_code\n and so.docstatus = 1 and so.status != \"Stopped\" \n and mr.docstatus = 1 and mr.status != \"Stopped\"\ngroup by so.name, so_item.item_code\nhaving sum(so_item.qty) > sum(mr_item.qty)\norder by so.name desc, so_item.item_code asc", 
+ "query": "select  so_item.item_code as \"Item Code:Link/Item:120\",\n so_item.item_name as \"Item Name::120\",\n so_item.description as \"Description::120\",\n so.`name` as \"S.O. No.:Link/Sales Order:120\",\n so.`transaction_date` as \"Date:Date:120\",\n mr.name as \"Material Request:Link/Material Request:120\",\n so.customer as \"Customer:Link/Customer:120\",\n so.territory as \"Terretory:Link/Territory:120\",\n sum(so_item.qty) as \"SO Qty:Float:100 \",\n sum(mr_item.qty) as \"Requested Qty:Float:100\",\n sum(so_item.qty) - sum(mr_item.qty) as \"Pending Qty:Float:100 \", \n so.company as \"Company:Link/Company:\"\nfrom\n `tabSales Order` so, `tabSales Order Item` so_item, \n `tabMaterial Request` mr, `tabMaterial Request Item` mr_item\nwhere \n so_item.`parent` = so.`name` \n and mr_item.parent = mr.name\n and mr_item.sales_order = so.name\n and mr_item.item_code = so_item.item_code\n and so.docstatus = 1 and so.status != \"Closed\" \n and mr.docstatus = 1 and mr.status != \"Stopped\"\ngroup by so.name, so_item.item_code\nhaving sum(so_item.qty) > sum(mr_item.qty)\norder by so.name desc, so_item.item_code asc", 
  "ref_doctype": "Sales Order", 
  "report_name": "Pending SO Items For Purchase Request", 
  "report_type": "Query Report"
diff --git a/erpnext/stock/doctype/stock_entry/stock_entry.py b/erpnext/stock/doctype/stock_entry/stock_entry.py
index 0c0b582..2fe3bb7 100644
--- a/erpnext/stock/doctype/stock_entry/stock_entry.py
+++ b/erpnext/stock/doctype/stock_entry/stock_entry.py
@@ -27,9 +27,8 @@
 		return _("From {0} to {1}").format(self.from_warehouse, self.to_warehouse)
 
 	def onload(self):
-		if self.docstatus==1:
-			for item in self.get("items"):
-				item.update(get_bin_details(item.item_code, item.s_warehouse))
+		for item in self.get("items"):
+			item.update(get_bin_details(item.item_code, item.s_warehouse))
 
 	def validate(self):
 		self.pro_doc = None