diff --git a/erpnext/accounts/doctype/payment_reconciliation/test_payment_reconciliation.py b/erpnext/accounts/doctype/payment_reconciliation/test_payment_reconciliation.py
index fb75a0f..301e6ef 100644
--- a/erpnext/accounts/doctype/payment_reconciliation/test_payment_reconciliation.py
+++ b/erpnext/accounts/doctype/payment_reconciliation/test_payment_reconciliation.py
@@ -56,6 +56,7 @@
 		self.expense_account = "Cost of Goods Sold - _PR"
 		self.debit_to = "Debtors - _PR"
 		self.creditors = "Creditors - _PR"
+		self.cash = "Cash - _PR"
 
 		# create bank account
 		if frappe.db.exists("Account", "HDFC - _PR"):
@@ -486,6 +487,91 @@
 		self.assertEqual(len(pr.get("invoices")), 0)
 		self.assertEqual(len(pr.get("payments")), 0)
 
+	def test_payment_against_foreign_currency_journal(self):
+		transaction_date = nowdate()
+
+		self.supplier = "_Test Supplier USD"
+		self.supplier2 = make_supplier("_Test Supplier2 USD", "USD")
+		amount = 100
+		exc_rate1 = 80
+		exc_rate2 = 83
+
+		je = frappe.new_doc("Journal Entry")
+		je.posting_date = transaction_date
+		je.company = self.company
+		je.user_remark = "test"
+		je.multi_currency = 1
+		je.set(
+			"accounts",
+			[
+				{
+					"account": self.creditors_usd,
+					"party_type": "Supplier",
+					"party": self.supplier,
+					"exchange_rate": exc_rate1,
+					"cost_center": self.cost_center,
+					"credit": amount * exc_rate1,
+					"credit_in_account_currency": amount,
+				},
+				{
+					"account": self.creditors_usd,
+					"party_type": "Supplier",
+					"party": self.supplier2,
+					"exchange_rate": exc_rate2,
+					"cost_center": self.cost_center,
+					"credit": amount * exc_rate2,
+					"credit_in_account_currency": amount,
+				},
+				{
+					"account": self.expense_account,
+					"cost_center": self.cost_center,
+					"debit": (amount * exc_rate1) + (amount * exc_rate2),
+					"debit_in_account_currency": (amount * exc_rate1) + (amount * exc_rate2),
+				},
+			],
+		)
+		je.save().submit()
+
+		pe = self.create_payment_entry(amount=amount, posting_date=transaction_date)
+		pe.payment_type = "Pay"
+		pe.party_type = "Supplier"
+		pe.party = self.supplier
+		pe.paid_to = self.creditors_usd
+		pe.paid_from = self.cash
+		pe.paid_amount = 8000
+		pe.received_amount = 100
+		pe.target_exchange_rate = exc_rate1
+		pe.paid_to_account_currency = "USD"
+		pe.save().submit()
+
+		pr = self.create_payment_reconciliation(party_is_customer=False)
+		pr.receivable_payable_account = self.creditors_usd
+		pr.minimum_invoice_amount = pr.maximum_invoice_amount = amount
+		pr.from_invoice_date = pr.to_invoice_date = transaction_date
+		pr.from_payment_date = pr.to_payment_date = transaction_date
+
+		pr.get_unreconciled_entries()
+		invoices = [x.as_dict() for x in pr.get("invoices")]
+		payments = [x.as_dict() for x in pr.get("payments")]
+		pr.allocate_entries(frappe._dict({"invoices": invoices, "payments": payments}))
+
+		# There should no difference_amount as the Journal and Payment have same exchange rate -  'exc_rate1'
+		for row in pr.allocation:
+			self.assertEqual(flt(row.get("difference_amount")), 0.0)
+
+		pr.reconcile()
+
+		# check PR tool output
+		self.assertEqual(len(pr.get("invoices")), 0)
+		self.assertEqual(len(pr.get("payments")), 0)
+
+		journals = frappe.db.get_all(
+			"Journal Entry Account",
+			filters={"reference_type": je.doctype, "reference_name": je.name, "docstatus": 1},
+			fields=["parent"],
+		)
+		self.assertEqual([], journals)
+
 	def test_journal_against_invoice(self):
 		transaction_date = nowdate()
 		amount = 100
@@ -1248,3 +1334,17 @@
 		return customer.name
 	else:
 		return customer_name
+
+
+def make_supplier(supplier_name, currency=None):
+	if not frappe.db.exists("Supplier", supplier_name):
+		supplier = frappe.new_doc("Supplier")
+		supplier.supplier_name = supplier_name
+		supplier.type = "Individual"
+
+		if currency:
+			supplier.default_currency = currency
+		supplier.save()
+		return supplier.name
+	else:
+		return supplier_name
