refactor: better output on gl and pl comparison report
diff --git a/erpnext/accounts/report/general_and_payment_ledger_comparison/general_and_payment_ledger_comparison.py b/erpnext/accounts/report/general_and_payment_ledger_comparison/general_and_payment_ledger_comparison.py
index 099884a..696a03b 100644
--- a/erpnext/accounts/report/general_and_payment_ledger_comparison/general_and_payment_ledger_comparison.py
+++ b/erpnext/accounts/report/general_and_payment_ledger_comparison/general_and_payment_ledger_comparison.py
@@ -79,7 +79,9 @@
 					.select(
 						gle.company,
 						gle.account,
+						gle.voucher_type,
 						gle.voucher_no,
+						gle.party_type,
 						gle.party,
 						outstanding,
 					)
@@ -89,7 +91,9 @@
 						& (gle.account.isin(val.accounts))
 					)
 					.where(Criterion.all(filter_criterion))
-					.groupby(gle.company, gle.account, gle.voucher_no, gle.party)
+					.groupby(
+						gle.company, gle.account, gle.voucher_type, gle.voucher_no, gle.party_type, gle.party
+					)
 					.run()
 				)
 
@@ -112,7 +116,13 @@
 				self.account_types[acc_type].ple = (
 					qb.from_(ple)
 					.select(
-						ple.company, ple.account, ple.voucher_no, ple.party, Sum(ple.amount).as_("outstanding")
+						ple.company,
+						ple.account,
+						ple.voucher_type,
+						ple.voucher_no,
+						ple.party_type,
+						ple.party,
+						Sum(ple.amount).as_("outstanding"),
 					)
 					.where(
 						(ple.company == self.filters.company)
@@ -120,7 +130,9 @@
 						& (ple.account.isin(val.accounts))
 					)
 					.where(Criterion.all(filter_criterion))
-					.groupby(ple.company, ple.account, ple.voucher_no, ple.party)
+					.groupby(
+						ple.company, ple.account, ple.voucher_type, ple.voucher_no, ple.party_type, ple.party
+					)
 					.run()
 				)
 
@@ -138,12 +150,12 @@
 		self.diff = frappe._dict({})
 
 		for x in self.variation_in_payment_ledger:
-			self.diff[(x[0], x[1], x[2], x[3])] = frappe._dict({"gl_balance": x[4]})
+			self.diff[(x[0], x[1], x[2], x[3], x[4], x[5])] = frappe._dict({"gl_balance": x[6]})
 
 		for x in self.variation_in_general_ledger:
-			self.diff.setdefault((x[0], x[1], x[2], x[3]), frappe._dict({"gl_balance": 0.0})).update(
-				frappe._dict({"pl_balance": x[4]})
-			)
+			self.diff.setdefault(
+				(x[0], x[1], x[2], x[3], x[4], x[5]), frappe._dict({"gl_balance": 0.0})
+			).update(frappe._dict({"pl_balance": x[6]}))
 
 	def generate_data(self):
 		self.data = []
@@ -151,8 +163,12 @@
 			self.data.append(
 				frappe._dict(
 					{
-						"voucher_no": key[2],
-						"party": key[3],
+						"company": key[0],
+						"account": key[1],
+						"voucher_type": key[2],
+						"voucher_no": key[3],
+						"party_type": key[4],
+						"party": key[5],
 						"gl_balance": val.gl_balance,
 						"pl_balance": val.pl_balance,
 					}
@@ -164,10 +180,50 @@
 		options = None
 		self.columns.append(
 			dict(
+				label=_("Company"),
+				fieldname="company",
+				fieldtype="Link",
+				options="Company",
+				width="100",
+			)
+		)
+
+		self.columns.append(
+			dict(
+				label=_("Account"),
+				fieldname="account",
+				fieldtype="Link",
+				options="Account",
+				width="100",
+			)
+		)
+
+		self.columns.append(
+			dict(
+				label=_("Voucher Type"),
+				fieldname="voucher_type",
+				fieldtype="Link",
+				options="DocType",
+				width="100",
+			)
+		)
+
+		self.columns.append(
+			dict(
 				label=_("Voucher No"),
 				fieldname="voucher_no",
-				fieldtype="Data",
-				options=options,
+				fieldtype="Dynamic Link",
+				options="voucher_type",
+				width="100",
+			)
+		)
+
+		self.columns.append(
+			dict(
+				label=_("Party Type"),
+				fieldname="party_type",
+				fieldtype="Link",
+				options="DocType",
 				width="100",
 			)
 		)
@@ -176,8 +232,8 @@
 			dict(
 				label=_("Party"),
 				fieldname="party",
-				fieldtype="Data",
-				options=options,
+				fieldtype="Dynamic Link",
+				options="party_type",
 				width="100",
 			)
 		)