Fixed merge conflict
diff --git a/erpnext/__init__.py b/erpnext/__init__.py
index fe93bc4..ccb7e8f 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.17'
+__version__ = '10.1.18'
 
 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 78015b4..3d8aedc 100644
--- a/erpnext/accounts/report/accounts_receivable/accounts_receivable.html
+++ b/erpnext/accounts/report/accounts_receivable/accounts_receivable.html
@@ -4,12 +4,21 @@
 	  .print-format {
 	    padding: 8mm;
 		margin:4mm;
-		font-size:10px;
+		font-size: 10.0pt !important;
 		font-family: Tahoma, sans-serif;
 	  }
 	}
 	</style>
 {% } %}
+<style>
+	.print-format {
+		padding: 8mm;
+		margin:4mm;
+		font-size: 10.0pt !important;
+		font-family: Tahoma, sans-serif;
+	}
+</style>
+
 
 <h2 class="text-center">{%= __(report.report_name) %}</h2>
 <h4 class="text-center">{%= filters.customer || filters.supplier %} </h4>
@@ -126,9 +135,14 @@
 			{% if(report.report_name === "Accounts Receivable" || report.report_name === "Accounts Payable") { %}
 				{% if(data[i][__("Customer")] || data[i][__("Supplier")]) { %}
 					<td>{%= dateutil.str_to_user(data[i]["posting_date"]) %}</td>
-					<td>{%= data[i]["voucher_type"] %}
-						<br>{%= data[i]["voucher_no"] %}</td>
-					{% if(!filters.show_pdc_in_print) { %}	
+					<td>
+						{% if(!filters.show_pdc_in_print) { %}
+							{%= data[i]["voucher_type"] %}
+							<br>
+						{% } %}
+						{%= data[i]["voucher_no"] %}
+					</td>
+					{% if(!filters.show_pdc_in_print) { %}
 					<td>
 						{% if(!(filters.customer || filters.supplier)) { %}
 							{%= data[i][__("Customer")] || data[i][__("Supplier")] %}
diff --git a/erpnext/accounts/report/accounts_receivable/accounts_receivable.py b/erpnext/accounts/report/accounts_receivable/accounts_receivable.py
index 065ab63..6109683 100644
--- a/erpnext/accounts/report/accounts_receivable/accounts_receivable.py
+++ b/erpnext/accounts/report/accounts_receivable/accounts_receivable.py
@@ -136,7 +136,7 @@
 		return_entries = self.get_return_entries(args.get("party_type"))
 
 		data = []
-		pdc_details = get_pdc_details(args.get("party_type"))
+		pdc_details = get_pdc_details(args.get("party_type"), self.filters.report_date)
 
 		for gle in self.get_entries_till(self.filters.report_date, args.get("party_type")):
 			if self.is_receivable_or_payable(gle, dr_or_cr, future_vouchers):
@@ -182,6 +182,7 @@
 						row.append(company_currency)
 
 					pdc = pdc_details.get((gle.voucher_no, gle.party), {})
+
 					remaining_balance = outstanding_amount - flt(pdc.get("pdc_amount"))
 					row += [pdc.get("pdc_date"), pdc.get("pdc_ref"),
 						flt(pdc.get("pdc_amount")), remaining_balance]
@@ -414,7 +415,7 @@
 
 	return [age] + outstanding_range
 
-def get_pdc_details(party_type):
+def get_pdc_details(party_type, report_date):
 	pdc_details = frappe._dict()
 
 	for pdc in frappe.db.sql("""
@@ -427,13 +428,14 @@
 		on
 			(pref.parent = pent.name)
 		where
-			pent.docstatus < 2 and pent.reference_date >= pent.posting_date
+			pent.docstatus < 2 and pent.reference_date >= %s
 			and pent.party_type = %s
-			group by pent.party, pref.reference_name""", party_type, as_dict=1):
+			group by pent.party, pref.reference_name""", (report_date, party_type), as_dict=1):
 			pdc_details.setdefault((pdc.invoice_no, pdc.party), pdc)
 
 	if scrub(party_type):
-		amount_field = "jea.debit_in_account_currency + jea.credit_in_account_currency"
+		amount_field = ("jea.debit_in_account_currency"
+			if party_type == 'Supplier' else "jea.credit_in_account_currency")
 	else:
 		amount_field = "jea.debit + jea.credit"
 
@@ -447,9 +449,9 @@
 		on
 			(jea.parent = je.name)
 		where
-			je.docstatus < 2 and je.cheque_date >= je.posting_date
+			je.docstatus < 2 and je.cheque_date >= %s
 			and jea.party_type = %s
-			group by jea.party, jea.reference_name""".format(amount_field), party_type, as_dict=1):
+			group by jea.party, jea.reference_name""".format(amount_field), (report_date, party_type), as_dict=1):
 			if (pdc.invoice_no, pdc.party) in pdc_details:
 				pdc_details[(pdc.invoice_no, pdc.party)]["pdc_amount"] += pdc.pdc_amount
 			else:
diff --git a/erpnext/manufacturing/doctype/bom/bom.py b/erpnext/manufacturing/doctype/bom/bom.py
index 6942a8c..007299a 100644
--- a/erpnext/manufacturing/doctype/bom/bom.py
+++ b/erpnext/manufacturing/doctype/bom/bom.py
@@ -607,6 +607,9 @@
 		for d in bom.items:
 			if (d.item_code.lower() == item.lower()):
 				rm_item_exists = True
+		for d in bom.scrap_items:
+			if (d.item_code.lower() == item.lower()):
+				rm_item_exists = True
 		if bom.item.lower() == item.lower() or \
 			bom.item.lower() == cstr(frappe.db.get_value("Item", item, "variant_of")).lower():
  				rm_item_exists = True
diff --git a/erpnext/public/js/utils/item_quick_entry.js b/erpnext/public/js/utils/item_quick_entry.js
index ebb92da..b2e0b85 100644
--- a/erpnext/public/js/utils/item_quick_entry.js
+++ b/erpnext/public/js/utils/item_quick_entry.js
@@ -319,7 +319,8 @@
 						["parent", "=", $(e.target).attr("data-fieldname")],
 						["attribute_value", "like", e.target.value + "%"]
 					],
-					fields: ["attribute_value"]
+					fields: ["attribute_value"],
+					parent: "Item"
 				},
 				callback: function(r) {
 					if (r.message) {
diff --git a/erpnext/stock/doctype/item/item.js b/erpnext/stock/doctype/item/item.js
index cd343fb..1a57a09 100644
--- a/erpnext/stock/doctype/item/item.js
+++ b/erpnext/stock/doctype/item/item.js
@@ -456,7 +456,8 @@
 							],
 							fields: ["attribute_value"],
 							limit_start: 0,
-							limit_page_length: 500
+							limit_page_length: 500,
+							parent: "Item"
 						}
 					}).then((r) => {
 						if(r.message) {
@@ -598,7 +599,8 @@
 								["parent","=", i],
 								["attribute_value", "like", term + "%"]
 							],
-							fields: ["attribute_value"]
+							fields: ["attribute_value"],
+							parent: "Item"
 						},
 						callback: function(r) {
 							if (r.message) {
diff --git a/erpnext/stock/get_item_details.py b/erpnext/stock/get_item_details.py
index 067acc7..552d284 100644
--- a/erpnext/stock/get_item_details.py
+++ b/erpnext/stock/get_item_details.py
@@ -320,7 +320,7 @@
 		out.price_list_rate = flt(price_list_rate) * flt(args.plc_conversion_rate) \
 			/ flt(args.conversion_rate)
 		if not args.price_list_uom_dependant:
-			out.price_list_rate = flt(out.price_list_rate * (args.conversion_factor or 1.0))
+			out.price_list_rate = flt(out.price_list_rate * (flt(args.conversion_factor) or 1.0))
 
 		if not out.price_list_rate and args.transaction_type=="buying":
 			from erpnext.stock.doctype.item.item import get_last_purchase_details
diff --git a/erpnext/stock/report/item_variant_details/item_variant_details.py b/erpnext/stock/report/item_variant_details/item_variant_details.py
index f1488f8..7379eb4 100644
--- a/erpnext/stock/report/item_variant_details/item_variant_details.py
+++ b/erpnext/stock/report/item_variant_details/item_variant_details.py
@@ -14,10 +14,15 @@
 	if not item:
 		return []
 	item_dicts = []
+	variants = None
 
 	variant_results = frappe.db.sql("""select name from `tabItem`
 		where variant_of = %s""", item, as_dict=1)
-	variants = ",".join(['"' + frappe.db.escape(variant['name']) + '"' for variant in variant_results])
+	if not variant_results:
+		frappe.msgprint(_("There isn't any item variant for the selected item"))
+		return []
+	else:
+		variants = ",".join(['"' + frappe.db.escape(variant['name']) + '"' for variant in variant_results])
 
 	order_count_map = get_open_sales_orders_map(variants)
 	stock_details_map = get_stock_details_map(variants)