diff --git a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py
index 05d6322..c164868 100644
--- a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py
+++ b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py
@@ -517,7 +517,7 @@
 			if d.category in ('Valuation', 'Total and Valuation')
 			and flt(d.base_tax_amount_after_discount_amount)]
 
-		exchange_rate_map, net_rate_map = self.get_purchase_receipt_details()
+		exchange_rate_map, net_rate_map = get_pr_or_pi_details(self)
 
 		for item in self.get("items"):
 			if flt(item.base_net_amount):
@@ -717,24 +717,6 @@
 							self.negative_expense_to_be_booked += flt(item.item_tax_amount, \
 								item.precision("item_tax_amount"))
 
-	def get_purchase_receipt_details(self):
-		purchase_receipts = []
-		pr_items = []
-
-		for item in self.get('items'):
-			if item.get('purchase_receipt'):
-				purchase_receipts.append(item.purchase_receipt)
-			if item.get('pr_detail'):
-				pr_items.append(item.pr_detail)
-			
-		exchange_rate_map = frappe._dict(frappe.get_all('Purchase Receipt', filters={'name': ('in',
-			purchase_receipts)}, fields=['name', 'conversion_rate'], as_list=1))
-
-		net_rate_map = frappe._dict(frappe.get_all('Purchase Receipt Item', filters={'name': ('in',
-			pr_items)}, fields=['item_code', 'net_rate'], as_list=1))
-
-		return exchange_rate_map, net_rate_map
-
 	def get_asset_gl_entry(self, gl_entries):
 		arbnb_account = self.get_company_default("asset_received_but_not_billed")
 		eiiav_account = self.get_company_default("expenses_included_in_asset_valuation")
@@ -1189,6 +1171,36 @@
 		if update:
 			self.db_set('status', self.status, update_modified = update_modified)
 
+# to get details of purchase invoice/receipt from which this doc was created for exchange rate difference handling
+def get_pr_or_pi_details(doc):
+	if doc.doctype == 'Purchase Invoice':
+		pr_or_pi = 'purchase_receipt'
+		items_reference = 'pr_detail'
+		pr_or_pi_doctype = 'Purchase Receipt'
+		pr_or_pi_items_table = 'Purchase Receipt Item'
+	else:
+		pr_or_pi = 'purchase_invoice'
+		items_reference = 'purchase_invoice_item'
+		pr_or_pi_doctype = 'Purchase Invoice'
+		pr_or_pi_items_table = 'Purchase Invoice Item'
+
+	purchase_receipts_or_invoices = []
+	pr_or_pi_items = []
+
+	for item in doc.get('items'):
+		if item.get(pr_or_pi):
+			purchase_receipts_or_invoices.append(item.get(pr_or_pi))
+		if item.get(items_reference):
+			pr_or_pi_items.append(item.get(items_reference))
+	
+	exchange_rate_map = frappe._dict(frappe.get_all(pr_or_pi_doctype, filters={'name': ('in',
+		purchase_receipts_or_invoices)}, fields=['name', 'conversion_rate'], as_list=1))
+
+	net_rate_map = frappe._dict(frappe.get_all(pr_or_pi_items_table, filters={'name': ('in',
+		pr_or_pi_items)}, fields=['item_code', 'net_rate'], as_list=1))
+
+	return exchange_rate_map, net_rate_map
+
 def get_list_context(context=None):
 	from erpnext.controllers.website_list_for_contact import get_list_context
 	list_context = get_list_context(context)
diff --git a/erpnext/stock/doctype/purchase_receipt/purchase_receipt.py b/erpnext/stock/doctype/purchase_receipt/purchase_receipt.py
index 7b002b0..12fa530 100644
--- a/erpnext/stock/doctype/purchase_receipt/purchase_receipt.py
+++ b/erpnext/stock/doctype/purchase_receipt/purchase_receipt.py
@@ -254,6 +254,8 @@
 		return process_gl_map(gl_entries)
 
 	def make_item_gl_entries(self, gl_entries, warehouse_account=None):
+		from erpnext.accounts.doctype.purchase_invoice.purchase_invoice import get_pr_or_pi_details
+
 		stock_rbnb = self.get_company_default("stock_received_but_not_billed")
 		landed_cost_entries = get_item_account_wise_additional_cost(self.name)
 		expenses_included_in_valuation = self.get_company_default("expenses_included_in_valuation")
@@ -262,7 +264,7 @@
 		warehouse_with_no_account = []
 		stock_items = self.get_stock_items()
 
-		exchange_rate_map, net_rate_map = self.get_purchase_invoice_details()
+		exchange_rate_map, net_rate_map = get_pr_or_pi_details(self)
 
 		for d in self.get("items"):
 			if d.item_code in stock_items and flt(d.valuation_rate) and flt(d.qty):
@@ -501,28 +503,6 @@
 		self.add_gl_entry(gl_entries, asset_account, item.cost_center, 0.0, flt(item.landed_cost_voucher_amount),
 			remarks, expenses_included_in_asset_valuation, project=item.project, item=item)
 
-	def get_purchase_invoice_details(self):
-		purchase_invoices = []
-		pi_items = []
-
-		for item in self.get('items'):
-			if item.get('purchase_invoice'):
-				purchase_invoices.append(item.purchase_invoice)
-			if item.get('purchase_invoice_item'):
-				pi_items.append(item.purchase_invoice_item)
-			
-		exchange_rate_map = frappe._dict(frappe.get_all('Purchase Invoice', filters={'name': ('in',
-			purchase_invoices)}, fields=['name', 'conversion_rate'], as_list=1))
-		print("*"*50)
-		print("In get_purchase_invoice_details:")
-		print("exchange_rate_map: ", exchange_rate_map)
-
-		net_rate_map = frappe._dict(frappe.get_all('Purchase Invoice Item', filters={'name': ('in',
-			pi_items)}, fields=['item_code', 'net_rate'], as_list=1))
-		print("net_rate_map: ", net_rate_map)
-
-		return exchange_rate_map, net_rate_map
-
 	def update_assets(self, item, valuation_rate):
 		assets = frappe.db.get_all('Asset',
 			filters={ 'purchase_receipt': self.name, 'item_code': item.item_code }
