Merge branch 'hotfix'
diff --git a/erpnext/__init__.py b/erpnext/__init__.py
index ccd8a19..bae7915 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.59'
+__version__ = '10.1.60'
 
 def get_default_company(user=None):
 	'''Get default company for user'''
diff --git a/erpnext/accounts/report/accounts_receivable/accounts_receivable.html b/erpnext/accounts/report/accounts_receivable/accounts_receivable.html
index 0a21181..7f663d8 100644
--- a/erpnext/accounts/report/accounts_receivable/accounts_receivable.html
+++ b/erpnext/accounts/report/accounts_receivable/accounts_receivable.html
@@ -167,7 +167,7 @@
 						<td style="text-align: right">
 							{%= format_currency(data[i]["paid_amount"], data[i]["currency"]) %}</td>
 						<td style="text-align: right">
-							{%= report.report_name === "Accounts Receivable" ? format_currency(data[i]["credit_note"], data[i]["currency"]) : format_currency(data[i]["Debit Note"], data[i]["currency"])  %}</td>
+							{%= report.report_name === "Accounts Receivable" ? format_currency(data[i]["credit_note"], data[i]["currency"]) : format_currency(data[i]["debit_note"], data[i]["currency"])  %}</td>
 					{% } %}
 					<td style="text-align: right">
 						{%= format_currency(data[i]["outstanding_amount"], data[i]["currency"]) %}</td>
@@ -189,15 +189,15 @@
 					{% } %}
 					<td><b>{%= __("Total") %}</b></td>
 					<td style="text-align: right">
-						{%= format_currency(data[i]["Invoiced Amount"], data[i]["currency"] ) %}</td>
+						{%= format_currency(data[i]["invoiced_amount"], data[i]["currency"] ) %}</td>
 
 					{% if(!filters.show_pdc_in_print) { %}
 						<td style="text-align: right">
-							{%= format_currency(data[i]["Paid Amount"], data[i]["currency"]) %}</td>
-						<td style="text-align: right">{%= report.report_name === "Accounts Receivable" ? format_currency(data[i]["Credit Note"], data[i]["currency"])  : format_currency(data[i]["Debit Note"], data[i]["currency"])  %} </td>
+							{%= format_currency(data[i]["paid_amount"], data[i]["currency"]) %}</td>
+						<td style="text-align: right">{%= report.report_name === "Accounts Receivable" ? format_currency(data[i]["credit_note"], data[i]["currency"])  : format_currency(data[i]["Debit Note"], data[i]["currency"])  %} </td>
 					{% } %}
 					<td style="text-align: right">
-						{%= format_currency(data[i]["Outstanding Amount"], data[i]["currency"]) %}</td>
+						{%= format_currency(data[i]["outstanding_amount"], data[i]["currency"]) %}</td>
 
 					{% if(filters.show_pdc_in_print) { %}
 						{% if(report.report_name === "Accounts Receivable") { %}
@@ -238,4 +238,4 @@
 		{% } %}
 	</tbody>
 </table>
-<p class="text-right text-muted">{{ __("Printed On ") }}{%= dateutil.str_to_user(dateutil.get_datetime_as_string()) %}</p>
\ No newline at end of file
+<p class="text-right text-muted">{{ __("Printed On ") }}{%= dateutil.str_to_user(dateutil.get_datetime_as_string()) %}</p>
diff --git a/erpnext/manufacturing/doctype/bom/bom.py b/erpnext/manufacturing/doctype/bom/bom.py
index 7a2aa8a..0af7a86 100644
--- a/erpnext/manufacturing/doctype/bom/bom.py
+++ b/erpnext/manufacturing/doctype/bom/bom.py
@@ -354,7 +354,8 @@
 		bom_list = self.traverse_tree(bom_list)
 		for bom in bom_list:
 			bom_obj = frappe.get_doc("BOM", bom)
-			bom_obj.on_update()
+			bom_obj.check_recursion()
+			bom_obj.update_exploded_items()
 
 		return bom_list
 
diff --git a/erpnext/manufacturing/doctype/bom_update_tool/bom_update_tool.py b/erpnext/manufacturing/doctype/bom_update_tool/bom_update_tool.py
index 3f6cb44..59861ce 100644
--- a/erpnext/manufacturing/doctype/bom_update_tool/bom_update_tool.py
+++ b/erpnext/manufacturing/doctype/bom_update_tool/bom_update_tool.py
@@ -62,7 +62,7 @@
 			bom_list.append(d[0])
 			self.get_parent_boms(d[0], bom_list)
 
-		return bom_list
+		return list(set(bom_list))
 
 @frappe.whitelist()
 def enqueue_replace_bom(args):
diff --git a/erpnext/selling/report/sales_person_wise_transaction_summary/sales_person_wise_transaction_summary.py b/erpnext/selling/report/sales_person_wise_transaction_summary/sales_person_wise_transaction_summary.py
index ae2cf8c..345d608 100644
--- a/erpnext/selling/report/sales_person_wise_transaction_summary/sales_person_wise_transaction_summary.py
+++ b/erpnext/selling/report/sales_person_wise_transaction_summary/sales_person_wise_transaction_summary.py
@@ -5,6 +5,7 @@
 import frappe
 from frappe import msgprint, _
 from frappe.utils import flt
+from erpnext import get_company_currency
 
 def execute(filters=None):
 	if not filters: filters = {}
@@ -14,12 +15,14 @@
 	item_details = get_item_details()
 	data = []
 
+	company_currency = get_company_currency(filters["company"])
+
 	for d in entries:
 		if d.stock_qty > 0 or filters.get('show_return_entries', 0):
 			data.append([
 				d.name, d.customer, d.territory, d.posting_date, d.item_code,
 				item_details.get(d.item_code, {}).get("item_group"), item_details.get(d.item_code, {}).get("brand"),
-				d.stock_qty, d.base_net_amount, d.sales_person, d.allocated_percentage, d.contribution_amt
+				d.stock_qty, d.base_net_amount, d.sales_person, d.allocated_percentage, d.contribution_amt, company_currency
 			])
 
 	if data:
@@ -32,12 +35,105 @@
 	if not filters.get("doc_type"):
 		msgprint(_("Please select the document type first"), raise_exception=1)
 
-	return [filters["doc_type"] + ":Link/" + filters["doc_type"] + ":140",
-		_("Customer") + ":Link/Customer:140", _("Territory") + ":Link/Territory:100", _("Posting Date") + ":Date:100",
-		_("Item Code") + ":Link/Item:120", _("Item Group") + ":Link/Item Group:120",
-		_("Brand") + ":Link/Brand:120", _("Qty") + ":Float:100", _("Amount") + ":Currency:120",
-		_("Sales Person") + ":Link/Sales Person:140", _("Contribution %") + "::110",
-		_("Contribution Amount") + ":Currency:140"]
+	columns = [
+		{
+			"label": _(filters["doc_type"]),
+			"options": filters["doc_type"],
+			"fieldname": frappe.scrub(filters['doc_type']),
+			"fieldtype": "Link",
+			"width": 140
+		},
+		{
+			"label": _("Customer"),
+			"options": "Customer",
+			"fieldname": "customer",
+			"fieldtype": "Link",
+			"width": 140
+		},
+		{
+			"label": _("Territory"),
+			"options": "Territory",
+			"fieldname": "territory",
+			"fieldtype": "Link",
+			"width": 140
+		},
+		{
+			"label": _("Warehouse"),
+			"options": "Warehouse",
+			"fieldname": "warehouse",
+			"fieldtype": "Link",
+			"width": 140
+		},
+		{
+			"label": _("Posting Date"),
+			"fieldname": "posting_date",
+			"fieldtype": "Date",
+			"width": 140
+		},
+		{
+			"label": _("Item Code"),
+			"options": "Item",
+			"fieldname": "item_code",
+			"fieldtype": "Link",
+			"width": 140
+		},
+		{
+			"label": _("Item Group"),
+			"options": "Item Group",
+			"fieldname": "item_group",
+			"fieldtype": "Link",
+			"width": 140
+		},
+		{
+			"label": _("Brand"),
+			"options": "Brand",
+			"fieldname": "brand",
+			"fieldtype": "Link",
+			"width": 140
+		},
+		{
+			"label": _("Qty"),
+			"fieldname": "qty",
+			"fieldtype": "Float",
+			"width": 140
+		},
+		{
+			"label": _("Amount"),
+			"options": "currency",
+			"fieldname": "amount",
+			"fieldtype": "Currency",
+			"width": 140
+		},
+		{
+			"label": _("Sales Person"),
+			"options": "Sales Person",
+			"fieldname": "sales_person",
+			"fieldtype": "Link",
+			"width": 140
+		},
+		{
+			"label": _("Contribution %"),
+			"fieldname": "contribution",
+			"fieldtype": "Float",
+			"width": 140
+		},
+		{
+			"label": _("Contribution Amount"),
+			"options": "currency",
+			"fieldname": "contribution_amt",
+			"fieldtype": "Currency",
+			"width": 140
+		},
+		{
+			"label":_("Currency"),
+			"options": "Currency",
+			"fieldname":"currency",
+			"fieldtype":"Link",
+			"hidden" : 1
+		}
+	]
+
+	return columns
 
 def get_entries(filters):
 	date_field = filters["doc_type"] == "Sales Order" and "transaction_date" or "posting_date"
diff --git a/erpnext/stock/doctype/delivery_note/delivery_note.js b/erpnext/stock/doctype/delivery_note/delivery_note.js
index e0ee370..d6a3c0e 100644
--- a/erpnext/stock/doctype/delivery_note/delivery_note.js
+++ b/erpnext/stock/doctype/delivery_note/delivery_note.js
@@ -255,13 +255,13 @@
 	var dn_item_fields = frappe.meta.docfield_map['Delivery Note Item'];
 	var dn_fields_copy = dn_fields;
 	var dn_item_fields_copy = dn_item_fields;
-
 	if (doc.print_without_amount) {
 		dn_fields['currency'].print_hide = 1;
 		dn_item_fields['rate'].print_hide = 1;
 		dn_item_fields['discount_percentage'].print_hide = 1;
 		dn_item_fields['price_list_rate'].print_hide = 1;
 		dn_item_fields['amount'].print_hide = 1;
+		dn_item_fields['discount_amount'].print_hide = 1;
 		dn_fields['taxes'].print_hide = 1;
 	} else {
 		if (dn_fields_copy['currency'].print_hide != 1)
@@ -270,6 +270,8 @@
 			dn_item_fields['rate'].print_hide = 0;
 		if (dn_item_fields_copy['amount'].print_hide != 1)
 			dn_item_fields['amount'].print_hide = 0;
+		if (dn_item_fields_copy['discount_amount'].print_hide != 1)
+			dn_item_fields['discount_amount'].print_hide = 0;
 		if (dn_fields_copy['taxes'].print_hide != 1)
 			dn_fields['taxes'].print_hide = 0;
 	}
diff --git a/erpnext/stock/doctype/delivery_note/delivery_note.py b/erpnext/stock/doctype/delivery_note/delivery_note.py
index 70a0612..ccc6da4 100644
--- a/erpnext/stock/doctype/delivery_note/delivery_note.py
+++ b/erpnext/stock/doctype/delivery_note/delivery_note.py
@@ -75,7 +75,7 @@
 		item_meta = frappe.get_meta("Delivery Note Item")
 		print_hide_fields = {
 			"parent": ["grand_total", "rounded_total", "in_words", "currency", "total", "taxes"],
-			"items": ["rate", "amount", "price_list_rate", "discount_percentage"]
+			"items": ["rate", "amount", "discount_amount", "price_list_rate", "discount_percentage"]
 		}
 
 		for key, fieldname in print_hide_fields.items():
diff --git a/erpnext/stock/report/item_price_stock/item_price_stock.py b/erpnext/stock/report/item_price_stock/item_price_stock.py
index ed010cd..3a72697 100644
--- a/erpnext/stock/report/item_price_stock/item_price_stock.py
+++ b/erpnext/stock/report/item_price_stock/item_price_stock.py
@@ -13,13 +13,19 @@
 def get_columns():
 	return [
 		{
-			"label": _("Item Name"),
-			"fieldname": "item_name",
+			"label": _("Item Code"),
+			"fieldname": "item_code",
 			"fieldtype": "Link",
 			"options": "Item",
 			"width": 120
 		},
 		{
+			"label": _("Item Name"),
+			"fieldname": "item_name",
+			"fieldtype": "Data",
+			"width": 120
+		},
+		{
 			"label": _("Warehouse"),
 			"fieldname": "warehouse",
 			"fieldtype": "Link",
@@ -70,7 +76,7 @@
 	if filters.get("item_code"):
 		conditions += "where a.item_code=%(item_code)s"
 
-	item_results = frappe.db.sql("""select a.item_code as item_name, a.name as price_list_name,
+	item_results = frappe.db.sql("""select a.item_code, a.item_name, a.name as price_list_name,
 		b.warehouse as warehouse, b.actual_qty as actual_qty
 		from `tabItem Price` a left join `tabBin` b
 		ON a.item_code = b.item_code
@@ -86,6 +92,7 @@
 	if item_results:
 		for item_dict in item_results:
 			data = {
+				'item_code': item_dict.item_code,
 				'item_name': item_dict.item_name,
 				'warehouse': item_dict.warehouse,
 				'stock_available': item_dict.actual_qty or 0,