diff --git a/erpnext/accounts/doctype/journal_entry/journal_entry.py b/erpnext/accounts/doctype/journal_entry/journal_entry.py
index 2a02cd7..835d202 100644
--- a/erpnext/accounts/doctype/journal_entry/journal_entry.py
+++ b/erpnext/accounts/doctype/journal_entry/journal_entry.py
@@ -578,17 +578,28 @@
 					elif d.party_type == "Supplier" and flt(d.credit) > 0:
 						frappe.throw(_("Row {0}: Advance against Supplier must be debit").format(d.idx))
 
+	def system_generated_gain_loss(self):
+		return (
+			self.voucher_type == "Exchange Gain Or Loss"
+			and self.multi_currency
+			and self.is_system_generated
+		)
+
 	def validate_against_jv(self):
 		for d in self.get("accounts"):
 			if d.reference_type == "Journal Entry":
 				account_root_type = frappe.get_cached_value("Account", d.account, "root_type")
-				if account_root_type == "Asset" and flt(d.debit) > 0:
+				if account_root_type == "Asset" and flt(d.debit) > 0 and not self.system_generated_gain_loss():
 					frappe.throw(
 						_(
 							"Row #{0}: For {1}, you can select reference document only if account gets credited"
 						).format(d.idx, d.account)
 					)
-				elif account_root_type == "Liability" and flt(d.credit) > 0:
+				elif (
+					account_root_type == "Liability"
+					and flt(d.credit) > 0
+					and not self.system_generated_gain_loss()
+				):
 					frappe.throw(
 						_(
 							"Row #{0}: For {1}, you can select reference document only if account gets debited"
@@ -620,7 +631,7 @@
 					for jvd in against_entries:
 						if flt(jvd[dr_or_cr]) > 0:
 							valid = True
-					if not valid:
+					if not valid and not self.system_generated_gain_loss():
 						frappe.throw(
 							_("Against Journal Entry {0} does not have any unmatched {1} entry").format(
 								d.reference_name, dr_or_cr
diff --git a/erpnext/controllers/accounts_controller.py b/erpnext/controllers/accounts_controller.py
index 6b6324c..a3db196 100644
--- a/erpnext/controllers/accounts_controller.py
+++ b/erpnext/controllers/accounts_controller.py
@@ -46,6 +46,7 @@
 from erpnext.accounts.utils import (
 	create_gain_loss_journal,
 	get_account_currency,
+	get_currency_precision,
 	get_fiscal_years,
 	validate_fiscal_year,
 )
@@ -1301,10 +1302,12 @@
 				# These are generated by Sales/Purchase Invoice during reconciliation and advance allocation.
 				# and below logic is only for such scenarios
 				if args:
+					precision = get_currency_precision()
 					for arg in args:
 						# Advance section uses `exchange_gain_loss` and reconciliation uses `difference_amount`
 						if (
-							arg.get("difference_amount", 0) != 0 or arg.get("exchange_gain_loss", 0) != 0
+							flt(arg.get("difference_amount", 0), precision) != 0
+							or flt(arg.get("exchange_gain_loss", 0), precision) != 0
 						) and arg.get("difference_account"):
 
 							party_account = arg.get("account")
diff --git a/erpnext/controllers/tests/test_accounts_controller.py b/erpnext/controllers/tests/test_accounts_controller.py
index d2a3574..2170628 100644
--- a/erpnext/controllers/tests/test_accounts_controller.py
+++ b/erpnext/controllers/tests/test_accounts_controller.py
@@ -56,7 +56,8 @@
 	20 series - Sales Invoice against Journals
 	30 series - Sales Invoice against Credit Notes
 	40 series - Company default Cost center is unset
-	50 series - Dimension inheritence
+	50 series = Journals against Journals
+	90 series - Dimension inheritence
 	"""
 
 	def setUp(self):
@@ -1271,7 +1272,7 @@
 			x.mandatory_for_pl = False
 		loc.save()
 
-	def test_50_dimensions_filter(self):
+	def test_90_dimensions_filter(self):
 		"""
 		Test workings of dimension filters
 		"""
@@ -1342,7 +1343,7 @@
 		self.assertEqual(len(pr.invoices), 0)
 		self.assertEqual(len(pr.payments), 1)
 
-	def test_51_cr_note_should_inherit_dimension(self):
+	def test_91_cr_note_should_inherit_dimension(self):
 		self.setup_dimensions()
 		rate_in_account_currency = 1
 
@@ -1384,7 +1385,7 @@
 					frappe.db.get_all("Journal Entry Account", filters={"parent": x.parent}, pluck="department"),
 				)
 
-	def test_52_dimension_inhertiance_exc_gain_loss(self):
+	def test_92_dimension_inhertiance_exc_gain_loss(self):
 		# Sales Invoice in Foreign Currency
 		self.setup_dimensions()
 		rate = 80
@@ -1422,7 +1423,7 @@
 			),
 		)
 
-	def test_53_dimension_inheritance_on_advance(self):
+	def test_93_dimension_inheritance_on_advance(self):
 		self.setup_dimensions()
 		dpt = "Research & Development"
 
@@ -1467,3 +1468,70 @@
 				pluck="department",
 			),
 		)
+
+	def test_50_journal_against_journal(self):
+		# Invoice in Foreign Currency
+		journal_as_invoice = self.create_journal_entry(
+			acc1=self.debit_usd,
+			acc1_exc_rate=83,
+			acc2=self.cash,
+			acc1_amount=1,
+			acc2_amount=83,
+			acc2_exc_rate=1,
+		)
+		journal_as_invoice.accounts[0].party_type = "Customer"
+		journal_as_invoice.accounts[0].party = self.customer
+		journal_as_invoice = journal_as_invoice.save().submit()
+
+		# Payment
+		journal_as_payment = self.create_journal_entry(
+			acc1=self.debit_usd,
+			acc1_exc_rate=75,
+			acc2=self.cash,
+			acc1_amount=-1,
+			acc2_amount=-75,
+			acc2_exc_rate=1,
+		)
+		journal_as_payment.accounts[0].party_type = "Customer"
+		journal_as_payment.accounts[0].party = self.customer
+		journal_as_payment = journal_as_payment.save().submit()
+
+		# Reconcile the remaining amount
+		pr = self.create_payment_reconciliation()
+		# pr.receivable_payable_account = self.debit_usd
+		pr.get_unreconciled_entries()
+		self.assertEqual(len(pr.invoices), 1)
+		self.assertEqual(len(pr.payments), 1)
+		invoices = [x.as_dict() for x in pr.invoices]
+		payments = [x.as_dict() for x in pr.payments]
+		pr.allocate_entries(frappe._dict({"invoices": invoices, "payments": payments}))
+		pr.reconcile()
+		self.assertEqual(len(pr.invoices), 0)
+		self.assertEqual(len(pr.payments), 0)
+
+		# There should be no outstanding in both currencies
+		journal_as_invoice.reload()
+		self.assert_ledger_outstanding(journal_as_invoice.doctype, journal_as_invoice.name, 0.0, 0.0)
+
+		# Exchange Gain/Loss Journal should've been created.
+		exc_je_for_si = self.get_journals_for(journal_as_invoice.doctype, journal_as_invoice.name)
+		exc_je_for_je = self.get_journals_for(journal_as_payment.doctype, journal_as_payment.name)
+		self.assertNotEqual(exc_je_for_si, [])
+		self.assertEqual(
+			len(exc_je_for_si), 2
+		)  # payment also has reference. so, there are 2 journals referencing invoice
+		self.assertEqual(len(exc_je_for_je), 1)
+		self.assertIn(exc_je_for_je[0], exc_je_for_si)
+
+		# Cancel Payment
+		journal_as_payment.reload()
+		journal_as_payment.cancel()
+
+		journal_as_invoice.reload()
+		self.assert_ledger_outstanding(journal_as_invoice.doctype, journal_as_invoice.name, 83.0, 1.0)
+
+		# Exchange Gain/Loss Journal should've been cancelled
+		exc_je_for_si = self.get_journals_for(journal_as_invoice.doctype, journal_as_invoice.name)
+		exc_je_for_je = self.get_journals_for(journal_as_payment.doctype, journal_as_payment.name)
+		self.assertEqual(exc_je_for_si, [])
+		self.assertEqual(exc_je_for_je, [])
