diff --git a/erpnext/accounts/doctype/party_account/party_account.json b/erpnext/accounts/doctype/party_account/party_account.json
index 719b474..6ac6e56 100644
--- a/erpnext/accounts/doctype/party_account/party_account.json
+++ b/erpnext/accounts/doctype/party_account/party_account.json
@@ -7,8 +7,7 @@
  "field_order": [
   "company",
   "account",
-  "advances_received_account",
-  "advances_paid_account"
+  "advance_account"
  ],
  "fields": [
   {
@@ -28,22 +27,16 @@
    "options": "Account"
   },
   {
-   "fieldname": "advances_received_account",
+   "fieldname": "advance_account",
    "fieldtype": "Link",
-   "label": "Advances Received Account",
-   "options": "Account"
-  },
-  {
-   "fieldname": "advances_paid_account",
-   "fieldtype": "Link",
-   "label": "Advances Paid Account",
+   "label": "Advance Account",
    "options": "Account"
   }
  ],
  "index_web_pages_for_search": 1,
  "istable": 1,
  "links": [],
- "modified": "2023-06-02 13:00:06.885744",
+ "modified": "2023-06-05 14:15:42.053150",
  "modified_by": "Administrator",
  "module": "Accounts",
  "name": "Party Account",
diff --git a/erpnext/accounts/doctype/payment_entry/payment_entry.js b/erpnext/accounts/doctype/payment_entry/payment_entry.js
index 7bd3bb8..1f0e45f 100644
--- a/erpnext/accounts/doctype/payment_entry/payment_entry.js
+++ b/erpnext/accounts/doctype/payment_entry/payment_entry.js
@@ -18,20 +18,14 @@
 	},
 
 	setup: function(frm) {
-		advance_payments_as_liability = frappe.db.get_value("Company", {"company_name": frm.doc.company}, "book_advance_payments_as_liability");
-
-		if(advance_payments_as_liability && frm.doc.payment_type == 'Receive'){
-			account_type = "Payable";
-		}
-		else{
-			account_type = "Receivable";
-		}
-
 		frm.set_query("paid_from", function() {
 			frm.events.validate_company(frm);
+
+			var account_types = in_list(["Pay", "Internal Transfer"], frm.doc.payment_type) ?
+				["Bank", "Cash"] : [frappe.boot.party_account_types[frm.doc.party_type]];
 			return {
 				filters: {
-					"account_type": account_type,
+					"account_type": ["in", account_types],
 					"is_group": 0,
 					"company": frm.doc.company
 				}
@@ -80,15 +74,12 @@
 
 		frm.set_query("paid_to", function() {
 			frm.events.validate_company(frm);
-			if(advance_payments_as_liability && in_list(['Receive', 'Internal Transfer'], cur_frm.doc.payment_type)){
-				account_type = ["Bank", "Cash"];
-			}
-			else{
-				account_type = "Receivable";
-			}
+
+			var account_types = in_list(["Receive", "Internal Transfer"], frm.doc.payment_type) ?
+				["Bank", "Cash"] : [frappe.boot.party_account_types[frm.doc.party_type]];
 			return {
 				filters: {
-					"account_type": ["in", account_type],
+					"account_type": ["in", account_types],
 					"is_group": 0,
 					"company": frm.doc.company
 				}
@@ -279,25 +270,6 @@
 	},
 
 	payment_type: function(frm) {
-		advance_payments_as_liability = frappe.db.get_value("Company", {"company_name": frm.doc.company}, "book_advance_payments_as_liability");
-
-		if(advance_payments_as_liability && frm.doc.payment_type == 'Receive'){
-			account_type = ["Payable"];
-		}
-		else{
-			account_type = ["Bank", "Cash"];
-		}
-
-		frm.set_query("paid_from", function() {
-			frm.events.validate_company(frm);
-			return {
-				filters: {
-					"account_type": ["in", account_type],
-					"is_group": 0,
-					"company": frm.doc.company
-				}
-			}
-		});
 		if(frm.doc.payment_type == "Internal Transfer") {
 			$.each(["party", "party_balance", "paid_from", "paid_to",
 				"references", "total_allocated_amount"], function(i, field) {
@@ -364,7 +336,7 @@
 			frm.set_party_account_based_on_party = true;
 
 			let company_currency = frappe.get_doc(":Company", frm.doc.company).default_currency;
-			
+
 			return frappe.call({
 				method: "erpnext.accounts.doctype.payment_entry.payment_entry.get_party_details",
 				args: {
@@ -372,8 +344,7 @@
 					party_type: frm.doc.party_type,
 					party: frm.doc.party,
 					date: frm.doc.posting_date,
-					cost_center: frm.doc.cost_center,
-					is_advance: !(frm.doc.references)
+					cost_center: frm.doc.cost_center
 				},
 				callback: function(r, rt) {
 					if(r.message) {
@@ -741,7 +712,7 @@
 				if(r.message) {
 					var total_positive_outstanding = 0;
 					var total_negative_outstanding = 0;
-
+					console.log(r.message);
 					$.each(r.message, function(i, d) {
 						var c = frm.add_child("references");
 						c.reference_doctype = d.voucher_type;
@@ -752,6 +723,7 @@
 						c.bill_no = d.bill_no;
 						c.payment_term = d.payment_term;
 						c.allocated_amount = d.allocated_amount;
+						c.account = d.account;
 
 						if(!in_list(frm.events.get_order_doctypes(frm), d.voucher_type)) {
 							if(flt(d.outstanding_amount) > 0)
@@ -1467,4 +1439,4 @@
 			});
 		}
 	},
-})
+})
\ No newline at end of file
diff --git a/erpnext/accounts/doctype/payment_entry/payment_entry.json b/erpnext/accounts/doctype/payment_entry/payment_entry.json
index 3927eca..1c330b8 100644
--- a/erpnext/accounts/doctype/payment_entry/payment_entry.json
+++ b/erpnext/accounts/doctype/payment_entry/payment_entry.json
@@ -733,7 +733,7 @@
  "index_web_pages_for_search": 1,
  "is_submittable": 1,
  "links": [],
- "modified": "2023-02-14 04:52:30.478523",
+ "modified": "2023-06-07 14:36:50.521884",
  "modified_by": "Administrator",
  "module": "Accounts",
  "name": "Payment Entry",
diff --git a/erpnext/accounts/doctype/payment_entry/payment_entry.py b/erpnext/accounts/doctype/payment_entry/payment_entry.py
index ed2158a..291f8e4 100644
--- a/erpnext/accounts/doctype/payment_entry/payment_entry.py
+++ b/erpnext/accounts/doctype/payment_entry/payment_entry.py
@@ -86,12 +86,36 @@
 	def on_submit(self):
 		if self.difference_amount:
 			frappe.throw(_("Difference Amount must be zero"))
+		book_advance_payments_as_liability = frappe.get_value(
+			"Company", {"company_name": self.company}, "book_advance_payments_as_liability"
+		)
+		if book_advance_payments_as_liability:
+			self.get_liability_account()
 		self.make_gl_entries()
 		self.update_outstanding_amounts()
 		self.update_advance_paid()
 		self.update_payment_schedule()
 		self.set_status()
 
+	def get_liability_account(self):
+		liability_account = get_party_account(self.party_type, self.party, self.company, is_advance=True)
+		if self.party_type == "Customer":
+			msg = "Book Advance Payments as Liability option is chosen. Paid From account changed from {0} to {1}.".format(
+				frappe.bold(self.paid_from),
+				frappe.bold(liability_account),
+			)
+			frappe.db.set_value("Payment Entry", self.name, "paid_from", liability_account)
+			self.paid_from = liability_account
+		else:
+			msg = "Book Advance Payments as Liability option is chosen. Paid To account changed from {0} to {1}.".format(
+				frappe.bold(self.paid_to),
+				frappe.bold(liability_account),
+			)
+			frappe.db.set_value("Payment Entry", self.name, "paid_to", liability_account)
+			self.paid_to = liability_account
+		frappe.msgprint(_(msg), title="Warning", indicator="orange")
+		return liability_account
+
 	def on_cancel(self):
 		self.ignore_linked_doctypes = (
 			"GL Entry",
@@ -869,10 +893,14 @@
 		if self.party_account:
 			if self.payment_type == "Receive":
 				against_account = self.paid_to
+				self.party_account = self.paid_from
+				dr_or_cr = "credit"
 			else:
 				against_account = self.paid_from
+				self.party_account = self.paid_to
+				dr_or_cr = "debit"
 
-			party_gl_dict = self.get_gl_dict(
+			party_dict = self.get_gl_dict(
 				{
 					"account": self.party_account,
 					"party_type": self.party_type,
@@ -883,30 +911,24 @@
 				},
 				item=self,
 			)
-
-			dr_or_cr = (
-				"credit" if erpnext.get_party_account_type(self.party_type) == "Receivable" else "debit"
-			)
-
 			for d in self.get("references"):
-				cost_center = self.cost_center
-				if d.reference_doctype == "Sales Invoice" and not cost_center:
-					cost_center = frappe.db.get_value(d.reference_doctype, d.reference_name, "cost_center")
-				gle = party_gl_dict.copy()
-				gle.update(
-					{
-						"against_voucher_type": d.reference_doctype,
-						"against_voucher": d.reference_name,
-						"cost_center": cost_center,
-					}
+				book_advance_payments_as_liability = frappe.get_value(
+					"Company", {"company_name": self.company}, "book_advance_payments_as_liability"
 				)
+				if (
+					d.reference_doctype in ["Sales Invoice", "Purchase Invoice"]
+					and book_advance_payments_as_liability
+				):
+					self.make_invoice_liability_entry(gl_entries, d)
 
 				allocated_amount_in_company_currency = self.calculate_base_allocated_amount_for_reference(d)
-
+				gle = party_dict.copy()
 				gle.update(
 					{
-						dr_or_cr + "_in_account_currency": d.allocated_amount,
 						dr_or_cr: allocated_amount_in_company_currency,
+						dr_or_cr + "_in_account_currency": d.allocated_amount,
+						"against_voucher_type": d.reference_doctype,
+						"against_voucher": d.reference_name,
 					}
 				)
 
@@ -916,8 +938,7 @@
 				exchange_rate = self.get_exchange_rate()
 				base_unallocated_amount = self.unallocated_amount * exchange_rate
 
-				gle = party_gl_dict.copy()
-
+				gle = party_dict.copy()
 				gle.update(
 					{
 						dr_or_cr + "_in_account_currency": self.unallocated_amount,
@@ -927,6 +948,40 @@
 
 				gl_entries.append(gle)
 
+	def make_invoice_liability_entry(self, gl_entries, invoice):
+		args_dict = {
+			"party_type": self.party_type,
+			"party": self.party,
+			"account_currency": self.party_account_currency,
+			"cost_center": self.cost_center,
+			"voucher_type": invoice.reference_doctype,
+			"voucher_no": invoice.reference_name,
+			"against_voucher_type": invoice.reference_doctype,
+			"against_voucher": invoice.reference_name,
+		}
+
+		dr_or_cr = "credit" if invoice.reference_doctype == "Sales Invoice" else "debit"
+		args_dict["account"] = invoice.account
+		args_dict[dr_or_cr] = invoice.allocated_amount
+		args_dict[dr_or_cr + "_in_account_currency"] = invoice.allocated_amount
+		gle = self.get_gl_dict(
+			args_dict,
+			item=self,
+		)
+		gl_entries.append(gle)
+
+		args_dict[dr_or_cr] = 0
+		args_dict[dr_or_cr + "_in_account_currency"] = 0
+		dr_or_cr = "debit" if dr_or_cr == "credit" else "credit"
+		args_dict["account"] = self.get_liability_account()
+		args_dict[dr_or_cr] = invoice.allocated_amount
+		args_dict[dr_or_cr + "_in_account_currency"] = invoice.allocated_amount
+		gle = self.get_gl_dict(
+			args_dict,
+			item=self,
+		)
+		gl_entries.append(gle)
+
 	def add_bank_gl_entries(self, gl_entries):
 		if self.payment_type in ("Pay", "Internal Transfer"):
 			gl_entries.append(
@@ -1401,6 +1456,7 @@
 										"outstanding_amount": flt(d.outstanding_amount),
 										"payment_amount": payment_term.payment_amount,
 										"payment_term": payment_term.payment_term,
+										"account": d.account,
 									}
 								)
 							)
@@ -1449,7 +1505,7 @@
 	if voucher_type:
 		doc = frappe.get_doc({"doctype": voucher_type})
 		condition = ""
-		if doc and hasattr(doc, "cost_center"):
+		if cost_center and doc and hasattr(doc, "cost_center"):
 			condition = " and cost_center='%s'" % cost_center
 
 	orders = []
@@ -1495,9 +1551,13 @@
 
 	order_list = []
 	for d in orders:
-		if not (
-			flt(d.outstanding_amount) >= flt(filters.get("outstanding_amt_greater_than"))
-			and flt(d.outstanding_amount) <= flt(filters.get("outstanding_amt_less_than"))
+		if filters.get("oustanding_amt_greater_than") and flt(d.outstanding_amount) < flt(
+			filters.get("outstanding_amt_greater_than")
+		):
+			continue
+
+		if filters.get("oustanding_amt_less_than") and flt(d.outstanding_amount) > flt(
+			filters.get("outstanding_amt_less_than")
 		):
 			continue
 
@@ -1519,6 +1579,7 @@
 	condition=None,
 ):
 	voucher_type = "Sales Invoice" if party_type == "Customer" else "Purchase Invoice"
+	account = "debit_to" if voucher_type == "Sales Invoice" else "credit_to"
 	supplier_condition = ""
 	if voucher_type == "Purchase Invoice":
 		supplier_condition = "and (release_date is null or release_date <= CURRENT_DATE)"
@@ -1532,7 +1593,7 @@
 	return frappe.db.sql(
 		"""
 		select
-			"{voucher_type}" as voucher_type, name as voucher_no,
+			"{voucher_type}" as voucher_type, name as voucher_no, {account} as account,
 			if({rounded_total_field}, {rounded_total_field}, {grand_total_field}) as invoice_amount,
 			outstanding_amount, posting_date,
 			due_date, conversion_rate as exchange_rate
@@ -1555,6 +1616,7 @@
 				"party_type": scrub(party_type),
 				"party_account": "debit_to" if party_type == "Customer" else "credit_to",
 				"cost_center": cost_center,
+				"account": account,
 			}
 		),
 		(party, party_account),
@@ -1563,12 +1625,12 @@
 
 
 @frappe.whitelist()
-def get_party_details(company, party_type, party, date, cost_center=None, is_advance=False):
+def get_party_details(company, party_type, party, date, cost_center=None):
 	bank_account = ""
 	if not frappe.db.exists(party_type, party):
 		frappe.throw(_("Invalid {0}: {1}").format(party_type, party))
 
-	party_account = get_party_account(party_type, party, company, is_advance)
+	party_account = get_party_account(party_type, party, company)
 	account_currency = get_account_currency(party_account)
 	account_balance = get_balance_on(party_account, date, cost_center=cost_center)
 	_party_name = "title" if party_type == "Shareholder" else party_type.lower() + "_name"
diff --git a/erpnext/accounts/doctype/payment_entry_reference/payment_entry_reference.json b/erpnext/accounts/doctype/payment_entry_reference/payment_entry_reference.json
index 3003c68..c318ea5 100644
--- a/erpnext/accounts/doctype/payment_entry_reference/payment_entry_reference.json
+++ b/erpnext/accounts/doctype/payment_entry_reference/payment_entry_reference.json
@@ -15,7 +15,8 @@
   "outstanding_amount",
   "allocated_amount",
   "exchange_rate",
-  "exchange_gain_loss"
+  "exchange_gain_loss",
+  "account"
  ],
  "fields": [
   {
@@ -101,12 +102,18 @@
    "label": "Exchange Gain/Loss",
    "options": "Company:company:default_currency",
    "read_only": 1
+  },
+  {
+   "fieldname": "account",
+   "fieldtype": "Link",
+   "label": "Account",
+   "options": "Account"
   }
  ],
  "index_web_pages_for_search": 1,
  "istable": 1,
  "links": [],
- "modified": "2022-12-12 12:31:44.919895",
+ "modified": "2023-06-07 14:35:06.166907",
  "modified_by": "Administrator",
  "module": "Accounts",
  "name": "Payment Entry Reference",
diff --git a/erpnext/accounts/doctype/payment_reconciliation/payment_reconciliation.js b/erpnext/accounts/doctype/payment_reconciliation/payment_reconciliation.js
index 2e9628c..d8743bb 100644
--- a/erpnext/accounts/doctype/payment_reconciliation/payment_reconciliation.js
+++ b/erpnext/accounts/doctype/payment_reconciliation/payment_reconciliation.js
@@ -29,22 +29,12 @@
 			};
 		});
 
-		this.frm.set_query('default_advances_received_account', () => {
+		this.frm.set_query('default_advance_account', () => {
 			return {
 				filters: {
 					"company": this.frm.doc.company,
 					"is_group": 0,
-					"root_type": "Liability"
-				}
-			};
-		});
-
-		this.frm.set_query('default_advances_paid_account', () => {
-			return {
-				filters: {
-					"company": this.frm.doc.company,
-					"is_group": 0,
-					"root_type": "Asset"
+					"root_type": (this.frm.party_type == 'Customer') ? "Liability": "Asset"
 				}
 			};
 		});
@@ -169,23 +159,7 @@
 				},
 				callback: (r) => {
 					if (!r.exc && r.message) {
-						this.frm.set_value("default_advances_received_account", r.message);
-					}
-					this.frm.refresh();
-				}
-			});
-
-			frappe.call({
-				method: "erpnext.accounts.party.get_party_account",
-				args: {
-					company: this.frm.doc.company,
-					party_type: (this.frm.doc.party_type == 'Customer')?'Supplier':'Customer',
-					party: this.frm.doc.party,
-					is_advance: 1
-				},
-				callback: (r) => {
-					if (!r.exc && r.message) {
-						this.frm.set_value("default_advances_paid_account", r.message);
+						this.frm.set_value("default_advance_account", r.message);
 					}
 					this.frm.refresh();
 				}
diff --git a/erpnext/accounts/doctype/payment_reconciliation/payment_reconciliation.json b/erpnext/accounts/doctype/payment_reconciliation/payment_reconciliation.json
index 21b8392..0e166ff 100644
--- a/erpnext/accounts/doctype/payment_reconciliation/payment_reconciliation.json
+++ b/erpnext/accounts/doctype/payment_reconciliation/payment_reconciliation.json
@@ -10,8 +10,7 @@
   "party",
   "column_break_4",
   "receivable_payable_account",
-  "default_advances_received_account",
-  "default_advances_paid_account",
+  "default_advance_account",
   "col_break1",
   "from_invoice_date",
   "from_payment_date",
@@ -190,27 +189,19 @@
   },
   {
    "depends_on": "eval:doc.party_type",
-   "fieldname": "default_advances_received_account",
+   "fieldname": "default_advance_account",
    "fieldtype": "Link",
-   "label": "Default Advances Received Account",
+   "label": "Default Advance Account",
    "mandatory_depends_on": "doc.party_type",
    "options": "Account",
    "reqd": 1
-  },
-  {
-   "depends_on": "eval:doc.party_type",
-   "fieldname": "default_advances_paid_account",
-   "fieldtype": "Link",
-   "label": "Default Advances Paid Account",
-   "mandatory_depends_on": "doc.party_type",
-   "options": "Account"
   }
  ],
  "hide_toolbar": 1,
  "icon": "icon-resize-horizontal",
  "issingle": 1,
  "links": [],
- "modified": "2023-06-02 14:32:27.276083",
+ "modified": "2023-06-05 20:09:58.925427",
  "modified_by": "Administrator",
  "module": "Accounts",
  "name": "Payment Reconciliation",
diff --git a/erpnext/accounts/doctype/payment_reconciliation/payment_reconciliation.py b/erpnext/accounts/doctype/payment_reconciliation/payment_reconciliation.py
index 9b03d36..e7d7f2c 100644
--- a/erpnext/accounts/doctype/payment_reconciliation/payment_reconciliation.py
+++ b/erpnext/accounts/doctype/payment_reconciliation/payment_reconciliation.py
@@ -13,14 +13,17 @@
 from erpnext.accounts.doctype.process_payment_reconciliation.process_payment_reconciliation import (
 	is_any_doc_running,
 )
+from erpnext.accounts.general_ledger import make_gl_entries
 from erpnext.accounts.utils import (
 	QueryPaymentLedger,
 	get_outstanding_invoices,
 	reconcile_against_document,
 )
-from erpnext.controllers.accounts_controller import get_advance_payment_entries
-from erpnext.controllers.accounts_controller import make_advance_liability_entry
-from erpnext.accounts.general_ledger import make_gl_entries
+from erpnext.controllers.accounts_controller import (
+	get_advance_payment_entries,
+	make_advance_liability_entry,
+)
+
 
 class PaymentReconciliation(Document):
 	def __init__(self, *args, **kwargs):
@@ -57,9 +60,17 @@
 		self.add_payment_entries(non_reconciled_payments)
 
 	def get_payment_entries(self):
-		receivable_payable_account = self.receivable_payable_account
-		default_advances_account = self.default_advances_received_account
-		party_account = [receivable_payable_account, default_advances_account]
+		advance_accounts = []
+		if self.party_type == "Customer":
+			advance_accounts = frappe.db.get_list(
+				"Account", filters={"root_type": "Liability", "company": self.company}, pluck="name"
+			)
+		elif self.party_type == "Supplier":
+			advance_accounts = frappe.db.get_list(
+				"Account", filters={"root_type": "Asset", "company": self.company}, pluck="name"
+			)
+		party_account = [self.receivable_payable_account] + advance_accounts
+
 		order_doctype = "Sales Order" if self.party_type == "Customer" else "Purchase Order"
 		condition = frappe._dict(
 			{
@@ -69,12 +80,12 @@
 				"from_payment_date": self.get("from_payment_date"),
 				"to_payment_date": self.get("to_payment_date"),
 				"maximum_payment_amount": self.get("maximum_payment_amount"),
-				"minimum_payment_amount": self.get("minimum_payment_amount")
+				"minimum_payment_amount": self.get("minimum_payment_amount"),
 			}
 		)
 
 		payment_entries = get_advance_payment_entries(
-			self.party_type,  
+			self.party_type,
 			self.party,
 			party_account,
 			order_doctype,
@@ -336,7 +347,9 @@
 			if row.invoice_number and row.allocated_amount:
 				if row.invoice_type in ["Sales Invoice", "Purchase Invoice"]:
 					gl_entries = []
-					make_advance_liability_entry(gl_entries, row.reference_name, row.allocated_amount, row.invoice_number, self.party_type)
+					make_advance_liability_entry(
+						gl_entries, row.reference_name, row.allocated_amount, row.invoice_number, self.party_type
+					)
 					make_gl_entries(gl_entries)
 				if row.reference_type in ["Sales Invoice", "Purchase Invoice"]:
 					reconciled_entry = dr_or_cr_notes
diff --git a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.json b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.json
index 60f9d62..f0f1684 100644
--- a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.json
+++ b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.json
@@ -1086,6 +1086,7 @@
    "fieldtype": "Button",
    "label": "Get Advances Paid",
    "oldfieldtype": "Button",
+   "options": "set_advances",
    "print_hide": 1
   },
   {
@@ -1364,12 +1365,12 @@
    "depends_on": "eval:doc.update_stock && doc.is_internal_supplier",
    "fieldname": "set_from_warehouse",
    "fieldtype": "Link",
+   "ignore_user_permissions": 1,
    "label": "Set From Warehouse",
    "no_copy": 1,
    "options": "Warehouse",
    "print_hide": 1,
    "print_width": "50px",
-   "ignore_user_permissions": 1,
    "width": "50px"
   },
   {
@@ -1573,7 +1574,7 @@
  "idx": 204,
  "is_submittable": 1,
  "links": [],
- "modified": "2023-04-29 12:57:50.832598",
+ "modified": "2023-06-05 17:40:35.320635",
  "modified_by": "Administrator",
  "module": "Accounts",
  "name": "Purchase Invoice",
diff --git a/erpnext/accounts/doctype/sales_invoice/test_sales_invoice.py b/erpnext/accounts/doctype/sales_invoice/test_sales_invoice.py
index 6051c99..dbc2770 100644
--- a/erpnext/accounts/doctype/sales_invoice/test_sales_invoice.py
+++ b/erpnext/accounts/doctype/sales_invoice/test_sales_invoice.py
@@ -3353,14 +3353,16 @@
 	gl_entries = frappe.db.sql(
 		"""select account, debit, credit, posting_date
 		from `tabGL Entry`
-		where voucher_type='Sales Invoice' and voucher_no=%s and posting_date > %s
+		where voucher_type='Sales Invoice' and voucher_no=%s and posting_date >= %s
 		and is_cancelled = 0
 		order by posting_date asc, account asc""",
 		(voucher_no, posting_date),
 		as_dict=1,
+		debug=True,
 	)
 
 	for i, gle in enumerate(gl_entries):
+		print(i, gle)
 		doc.assertEqual(expected_gle[i][0], gle.account)
 		doc.assertEqual(expected_gle[i][1], gle.debit)
 		doc.assertEqual(expected_gle[i][2], gle.credit)
diff --git a/erpnext/accounts/party.py b/erpnext/accounts/party.py
index 3be4275..782c41e 100644
--- a/erpnext/accounts/party.py
+++ b/erpnext/accounts/party.py
@@ -380,9 +380,7 @@
 
 		return frappe.get_cached_value("Company", company, default_account_name)
 
-	advance_payments_as_liability = frappe.db.get_value("Company", {"company_name": company}, "book_advance_payments_as_liability")
-
-	if is_advance and advance_payments_as_liability and party_type in ["Customer", "Supplier"]:
+	if is_advance and party_type in ["Customer", "Supplier"]:
 		return get_party_advance_account(party_type, party, company)
 
 	account = frappe.db.get_value(
@@ -415,9 +413,10 @@
 
 
 def get_party_advance_account(party_type, party, company):
-	account_name = 'advances_received_account' if party_type == 'Customer' else 'advances_paid_account'
 	account = frappe.db.get_value(
-		"Party Account", {"parenttype": party_type, "parent": party, "company": company}, account_name
+		"Party Account",
+		{"parenttype": party_type, "parent": party, "company": company},
+		"advance_account",
 	)
 
 	if not account:
@@ -426,14 +425,15 @@
 		account = frappe.db.get_value(
 			"Party Account",
 			{"parenttype": party_group_doctype, "parent": group, "company": company},
-			account_name,
+			"advance_account",
 		)
-	
+
 	if not account:
-		account = frappe.get_cached_value("Company", company, "default_" + account_name)
+		account = frappe.get_cached_value("Company", company, "default_advance_account")
 
 	return account
-	
+
+
 @frappe.whitelist()
 def get_party_bank_account(party_type, party):
 	return frappe.db.get_value(
diff --git a/erpnext/accounts/utils.py b/erpnext/accounts/utils.py
index 5abc643..506279c 100644
--- a/erpnext/accounts/utils.py
+++ b/erpnext/accounts/utils.py
@@ -498,30 +498,36 @@
 		journal_entry = frappe.qb.DocType("Journal Entry")
 		journal_acc = frappe.qb.DocType("Journal Entry Account")
 
-		q = (frappe.qb.from_(journal_entry)
+		q = (
+			frappe.qb.from_(journal_entry)
 			.innerjoin(journal_acc)
 			.on(journal_entry.name == journal_acc.parent)
 		)
 
-		if args.get("dr_or_cr") == 'debit_in_account_currency':
+		if args.get("dr_or_cr") == "debit_in_account_currency":
 			q = q.select(journal_acc.debit_in_account_currency)
 		else:
 			q = q.select(journal_acc.credit_in_account_currency)
-		
-		q = q.where((journal_acc.account == args.get("account"))
-			&((journal_acc.party_type == args.get("party_type")))
-			&((journal_acc.party == args.get("party")))
-			&((journal_acc.reference_type == None) | (journal_acc.reference_type.isin(['', 'Sales Order', 'Purchase Order'])))
-			&((journal_entry.name == args.get("voucher_no")))
-			&((journal_acc.name == args.get("voucher_detail_no")))
-			&((journal_entry.docstatus == 1))
+
+		q = q.where(
+			(journal_acc.account == args.get("account"))
+			& ((journal_acc.party_type == args.get("party_type")))
+			& ((journal_acc.party == args.get("party")))
+			& (
+				(journal_acc.reference_type == None)
+				| (journal_acc.reference_type.isin(["", "Sales Order", "Purchase Order"]))
+			)
+			& ((journal_entry.name == args.get("voucher_no")))
+			& ((journal_acc.name == args.get("voucher_detail_no")))
+			& ((journal_entry.docstatus == 1))
 		)
 
 	else:
 		payment_entry = frappe.qb.DocType("Payment Entry")
 		payment_ref = frappe.qb.DocType("Payment Entry Reference")
 
-		q = (frappe.qb.from_(payment_entry)
+		q = (
+			frappe.qb.from_(payment_entry)
 			.select(payment_entry.name)
 			.where(payment_entry.name == args.get("voucher_no"))
 			.where(payment_entry.docstatus == 1)
@@ -530,15 +536,16 @@
 		)
 
 		if args.voucher_detail_no:
-			q = ( q.inner_join(payment_ref)
+			q = (
+				q.inner_join(payment_ref)
 				.on(payment_entry.name == payment_ref.parent)
 				.where(payment_ref.name == args.get("voucher_detail_no"))
-				.where(payment_ref.reference_doctype.isin(('', 'Sales Order', 'Purchase Order')))
+				.where(payment_ref.reference_doctype.isin(("", "Sales Order", "Purchase Order")))
 				.where(payment_ref.allocated_amount == args.get("unreconciled_amount"))
-			)	
+			)
 		else:
 			q = q.where(payment_entry.unallocated_amount == args.get("unreconciled_amount"))
-		
+
 	ret = q.run(as_dict=True)
 
 	if not ret:
@@ -921,6 +928,7 @@
 							"outstanding_amount": outstanding_amount,
 							"due_date": d.due_date,
 							"currency": d.currency,
+							"account": d.account,
 						}
 					)
 				)
diff --git a/erpnext/buying/doctype/supplier/supplier.js b/erpnext/buying/doctype/supplier/supplier.js
index 9e217b5..6da47c5 100644
--- a/erpnext/buying/doctype/supplier/supplier.js
+++ b/erpnext/buying/doctype/supplier/supplier.js
@@ -18,7 +18,7 @@
 			}
 		});
 
-		frm.set_query('advances_received_account', 'accounts', function (doc, cdt, cdn) {
+		frm.set_query('advance_account', 'accounts', function (doc, cdt, cdn) {
 			var d = locals[cdt][cdn];
 			return {
 				filters: {
@@ -29,17 +29,6 @@
 			}
 		});
 
-		frm.set_query('advances_paid_account', 'accounts', function (doc, cdt, cdn) {
-			var d = locals[cdt][cdn];
-			return {
-				filters: {
-					"root_type": 'Liability',
-					"company": d.company,
-					"is_group": 0
-				}
-			}
-		});
-
 		frm.set_query("default_bank_account", function() {
 			return {
 				filters: {
diff --git a/erpnext/controllers/accounts_controller.py b/erpnext/controllers/accounts_controller.py
index ac32fd3..0589f4a 100644
--- a/erpnext/controllers/accounts_controller.py
+++ b/erpnext/controllers/accounts_controller.py
@@ -7,9 +7,8 @@
 import frappe
 from frappe import _, bold, throw
 from frappe.model.workflow import get_workflow_name, is_transition_condition_satisfied
-from frappe.query_builder.functions import Abs, Sum
 from frappe.query_builder.custom import ConstantColumn
-
+from frappe.query_builder.functions import Abs, Sum
 from frappe.utils import (
 	add_days,
 	add_months,
@@ -859,7 +858,6 @@
 				amount = self.get("base_rounded_total") or self.base_grand_total
 			else:
 				amount = self.get("rounded_total") or self.grand_total
-
 			allocated_amount = min(amount - advance_allocated, d.amount)
 			advance_allocated += flt(allocated_amount)
 
@@ -887,16 +885,18 @@
 			amount_field = "credit_in_account_currency"
 			order_field = "sales_order"
 			order_doctype = "Sales Order"
-			party_account = frappe.db.get_values("Company", {"company_name": self.company}, ["default_receivable_account", "default_advances_received_account"])
+			party_account = [
+				get_party_account(party_type, party=party, company=self.company, is_advance=True)
+			]
 		else:
 			party_type = "Supplier"
 			party = self.supplier
 			amount_field = "debit_in_account_currency"
 			order_field = "purchase_order"
 			order_doctype = "Purchase Order"
-			party_account = frappe.db.get_values("Company", {"company_name": self.company}, ["default_receivable_account", "default_advances_paid_account"])		
-		
-		party_account = list(party_account[0])
+			party_account = [
+				get_party_account(party_type, party=party, company=self.company, is_advance=True)
+			]
 
 		order_list = list(set(d.get(order_field) for d in self.get("items") if d.get(order_field)))
 
@@ -2144,35 +2144,43 @@
 	order_list,
 	include_unallocated=True,
 ):
-	journal_entry = frappe.qb.DocType('Journal Entry')
-	journal_acc = frappe.qb.DocType('Journal Entry Account')
-	q = (frappe.qb.from_(journal_entry)
+	journal_entry = frappe.qb.DocType("Journal Entry")
+	journal_acc = frappe.qb.DocType("Journal Entry Account")
+	q = (
+		frappe.qb.from_(journal_entry)
 		.inner_join(journal_acc)
 		.on(journal_entry.name == journal_acc.parent)
 		.select(
-			ConstantColumn('Journal Entry').as_('reference_type'),
-			(journal_entry.name).as_('reference_name'),
-			(journal_entry.remark).as_('remarks'),
-			(journal_acc.debit_in_account_currency if party_type == 'Supplier' else journal_acc.credit_in_account_currency).as_('amount'),
-			(journal_acc.name).as_('reference_row'),
-			(journal_acc.reference_name).as_('against_order'),
-			(journal_acc.exchange_rate)
+			ConstantColumn("Journal Entry").as_("reference_type"),
+			(journal_entry.name).as_("reference_name"),
+			(journal_entry.remark).as_("remarks"),
+			(
+				journal_acc.debit_in_account_currency
+				if party_type == "Supplier"
+				else journal_acc.credit_in_account_currency
+			).as_("amount"),
+			(journal_acc.name).as_("reference_row"),
+			(journal_acc.reference_name).as_("against_order"),
+			(journal_acc.exchange_rate),
 		)
-		.where(journal_acc.account.isin(party_account)
-	 	& (journal_acc.party_type == party_type)
-	 	& (journal_acc.party == party)
-	 	& (journal_acc.is_advance == 'Yes')
-	 	& (journal_entry.docstatus == 1)
-	 	)
-    )
+		.where(
+			journal_acc.account.isin(party_account)
+			& (journal_acc.party_type == party_type)
+			& (journal_acc.party == party)
+			& (journal_acc.is_advance == "Yes")
+			& (journal_entry.docstatus == 1)
+		)
+	)
 	if party_type == "Customer":
 		q = q.where(journal_acc.credit_in_account_currency > 0)
 
+	else:
+		q = q.where(journal_acc.debit_in_account_currency > 0)
+
 	if order_list:
 		q = q.where(journal_acc.reference_type == order_doctype)
 		if include_unallocated:
-			q = q.where(journal_acc.reference_name.isin(order_list)
-			|(journal_acc.reference_name == ''))
+			q = q.where(journal_acc.reference_name.isin(order_list) | (journal_acc.reference_name == ""))
 		else:
 			q = q.where(journal_acc.reference_name.isin(order_list))
 
@@ -2194,69 +2202,119 @@
 	condition=None,
 ):
 
-	q = build_query(party_type, party, party_account, order_doctype, order_list, include_unallocated, against_all_orders, limit, condition)
+	q = build_query(
+		party_type,
+		party,
+		party_account,
+		order_doctype,
+		order_list,
+		include_unallocated,
+		against_all_orders,
+		limit,
+		condition,
+	)
 
 	payment_entries = q.run(as_dict=True)
 
 	return list(payment_entries)
 
-def build_query(party_type, party, party_account, order_doctype, order_list, include_unallocated, against_all_orders, limit, condition):
-	payment_type = "Receive" if party_type == "Customer" else "Pay"
-	payment_entry = frappe.qb.DocType('Payment Entry')
-	payment_ref = frappe.qb.DocType('Payment Entry Reference')
 
-	q = (frappe.qb.from_(payment_entry)
+def build_query(
+	party_type,
+	party,
+	party_account,
+	order_doctype,
+	order_list,
+	include_unallocated,
+	against_all_orders,
+	limit,
+	condition,
+):
+	payment_type = "Receive" if party_type == "Customer" else "Pay"
+	payment_entry = frappe.qb.DocType("Payment Entry")
+	payment_ref = frappe.qb.DocType("Payment Entry Reference")
+
+	q = (
+		frappe.qb.from_(payment_entry)
 		.select(
-			ConstantColumn('Payment Entry').as_('reference_type'),
-			(payment_entry.name).as_('reference_name'),
+			ConstantColumn("Payment Entry").as_("reference_type"),
+			(payment_entry.name).as_("reference_name"),
 			payment_entry.posting_date,
-			(payment_entry.remarks).as_('remarks')
+			(payment_entry.remarks).as_("remarks"),
 		)
 		.where(payment_entry.payment_type == payment_type)
 		.where(payment_entry.party_type == party_type)
 		.where(payment_entry.party == party)
 		.where(payment_entry.docstatus == 1)
 	)
-	
+
 	if party_type == "Customer":
-		q = q.select(payment_entry.paid_from_account_currency) 
-		q = q.select(payment_entry.paid_from) 
-		q = q.where(payment_entry.paid_from.isin(party_account)) 
+		q = q.select(payment_entry.paid_from_account_currency)
+		q = q.select(payment_entry.paid_from)
+		q = q.where(payment_entry.paid_from.isin(party_account))
 	else:
 		q = q.select(payment_entry.paid_to_account_currency)
 		q = q.select(payment_entry.paid_to)
-		q = q.where(payment_entry.paid_to.isin(party_account)) 
+		q = q.where(payment_entry.paid_to.isin(party_account))
 
 	if payment_type == "Receive":
 		q = q.select(payment_entry.source_exchange_rate)
-	else: 
+	else:
 		q.select(payment_entry.target_exchange_rate)
 
 	if include_unallocated:
-		q = q.select((payment_entry.unallocated_amount).as_('amount'))
-		q = q.where(payment_entry.unallocated_amount>0)
+		q = q.select((payment_entry.unallocated_amount).as_("amount"))
+		q = q.where(payment_entry.unallocated_amount > 0)
 
 		if condition:
 			q = q.where(payment_entry.company == condition["company"])
-			q = q.where(payment_entry.posting_date >= condition["from_payment_date"]) if condition.get("from_payment_date") else q
-			q = q.where(payment_entry.posting_date <= condition["to_payment_date"]) if condition.get("to_payment_date") else q
+			q = (
+				q.where(payment_entry.posting_date >= condition["from_payment_date"])
+				if condition.get("from_payment_date")
+				else q
+			)
+			q = (
+				q.where(payment_entry.posting_date <= condition["to_payment_date"])
+				if condition.get("to_payment_date")
+				else q
+			)
 			if condition.get("get_payments") == True:
-				q = q.where(payment_entry.cost_center == condition["cost_center"]) if condition.get("cost_center") else q
-				q = q.where(payment_entry.unallocated_amount >= condition["minimum_payment_amount"]) if condition.get("minimum_payment_amount") else q
-				q = q.where(payment_entry.unallocated_amount <= condition["maximum_payment_amount"]) if condition.get("maximum_payment_amount") else q
+				q = (
+					q.where(payment_entry.cost_center == condition["cost_center"])
+					if condition.get("cost_center")
+					else q
+				)
+				q = (
+					q.where(payment_entry.unallocated_amount >= condition["minimum_payment_amount"])
+					if condition.get("minimum_payment_amount")
+					else q
+				)
+				q = (
+					q.where(payment_entry.unallocated_amount <= condition["maximum_payment_amount"])
+					if condition.get("maximum_payment_amount")
+					else q
+				)
 			else:
-				q = q.where(payment_entry.total_debit >= condition["minimum_payment_amount"]) if condition.get("minimum_payment_amount") else q
-				q = q.where(payment_entry.total_debit <= condition["maximum_payment_amount"]) if condition.get("maximum_payment_amount") else q
+				q = (
+					q.where(payment_entry.total_debit >= condition["minimum_payment_amount"])
+					if condition.get("minimum_payment_amount")
+					else q
+				)
+				q = (
+					q.where(payment_entry.total_debit <= condition["maximum_payment_amount"])
+					if condition.get("maximum_payment_amount")
+					else q
+				)
 
 	elif order_list or against_all_orders:
 		q = q.inner_join(payment_ref).on(payment_entry.name == payment_ref.parent)
 		q = q.select(
-			(payment_ref.allocated_amount).as_('amount'),
-			(payment_ref.name).as_('reference_row'),
-			(payment_ref.reference_name).as_('against_order'),
-			payment_ref.reference_doctype == order_doctype
+			(payment_ref.allocated_amount).as_("amount"),
+			(payment_ref.name).as_("reference_row"),
+			(payment_ref.reference_name).as_("against_order"),
+			payment_ref.reference_doctype == order_doctype,
 		)
-		
+
 		if order_list:
 			q = q.where(payment_ref.reference_name.isin(order_list))
 
@@ -2862,9 +2920,12 @@
 def validate_einvoice_fields(doc):
 	pass
 
-def make_advance_liability_entry(gl_entries, pe, allocated_amount, invoice, party_type):
+
+def make_advance_liability_entry(
+	gl_entries, pe, allocated_amount, invoice, party_type, references=False
+):
 	pe = frappe.get_doc("Payment Entry", pe)
-	if party_type=="Customer":
+	if party_type == "Customer":
 		invoice = frappe.get_doc("Sales Invoice", invoice)
 		account = pe.paid_from
 		dr_or_cr = "debit"
@@ -2880,53 +2941,55 @@
 		against = invoice.credit_to
 		party = invoice.supplier
 		voucher_type = "Purchase Invoice"
-	gl_entries.append(invoice.get_gl_dict(
-		{
-			"account": account,
-			"party_type": party_type,
-			"party": party,
-			"due_date": invoice.due_date,
-			"against": against,
-			dr_or_cr: allocated_amount,
-			dr_or_cr + "_in_account_currency": allocated_amount,
-			rev: 0,
-			rev + "_in_account_currency": 0,
-			"against_voucher": invoice.return_against 
-			if cint(invoice.is_return) and invoice.return_against
-			else invoice.name,
-			"against_voucher_type": invoice.doctype,
-			"cost_center": invoice.cost_center,
-			"project": invoice.project,
-			"voucher_type": voucher_type,
-			"voucher_no": invoice.name
-		},
-		invoice.party_account_currency,
-		item=invoice,
-	))
+	gl_entries.append(
+		invoice.get_gl_dict(
+			{
+				"account": account,
+				"party_type": party_type,
+				"party": party,
+				"due_date": invoice.due_date,
+				"against": against,
+				dr_or_cr: allocated_amount,
+				dr_or_cr + "_in_account_currency": allocated_amount,
+				rev: 0,
+				rev + "_in_account_currency": 0,
+				"against_voucher": invoice.return_against
+				if cint(invoice.is_return) and invoice.return_against
+				else invoice.name,
+				"against_voucher_type": invoice.doctype,
+				"cost_center": invoice.cost_center,
+				"project": invoice.project,
+				"voucher_type": voucher_type,
+				"voucher_no": invoice.name,
+			},
+			invoice.party_account_currency,
+			item=invoice,
+		)
+	)
 
-	(dr_or_cr, rev) = ("credit", "debit") if party_type=="Customer" else ("debit", "credit")
-	gl_entries.append(invoice.get_gl_dict(
-		{
-			"account": against,
-			"party_type": party_type,
-			"party": party,
-			"due_date": invoice.due_date,
-			"against": account,
-			dr_or_cr: allocated_amount,
-			dr_or_cr + "_in_account_currency": allocated_amount,
-			rev: 0,
-			rev + "_in_account_currency": 0,
-			"against_voucher": invoice.return_against
-			if cint(invoice.is_return) and invoice.return_against
-			else invoice.name,
-			"against_voucher_type": invoice.doctype,
-			"cost_center": invoice.cost_center,
-			"project": invoice.project,
-			"voucher_type": voucher_type,
-			"voucher_no": invoice.name
-		},
-		invoice.party_account_currency,
-		item=invoice,
-	))
-
-
+	(dr_or_cr, rev) = ("credit", "debit") if party_type == "Customer" else ("debit", "credit")
+	gl_entries.append(
+		invoice.get_gl_dict(
+			{
+				"account": against,
+				"party_type": party_type,
+				"party": party,
+				"due_date": invoice.due_date,
+				"against": account,
+				dr_or_cr: allocated_amount,
+				dr_or_cr + "_in_account_currency": allocated_amount,
+				rev: 0,
+				rev + "_in_account_currency": 0,
+				"against_voucher": invoice.return_against
+				if cint(invoice.is_return) and invoice.return_against
+				else invoice.name,
+				"against_voucher_type": invoice.doctype,
+				"cost_center": invoice.cost_center,
+				"project": invoice.project,
+				"voucher_type": "Payment Entry" if references else voucher_type,
+				"voucher_no": pe.name if references else invoice.name,
+			},
+			invoice.party_account_currency,
+			item=invoice,
+		)
+	)
diff --git a/erpnext/selling/doctype/customer/customer.js b/erpnext/selling/doctype/customer/customer.js
index 6dac692..35cf8c5 100644
--- a/erpnext/selling/doctype/customer/customer.js
+++ b/erpnext/selling/doctype/customer/customer.js
@@ -34,8 +34,8 @@
 				filters: filters
 			}
 		});
-		
-		frm.set_query('advances_received_account', 'accounts', function (doc, cdt, cdn) {
+
+		frm.set_query('advance_account', 'accounts', function (doc, cdt, cdn) {
 			var d = locals[cdt][cdn];
 			return {
 				filters: {
@@ -46,16 +46,6 @@
 			}
 		});
 
-		frm.set_query('advances_paid_account', 'accounts', function (doc, cdt, cdn) {
-			var d = locals[cdt][cdn];
-			return {
-				filters: {
-					"root_type": 'Asset',
-					"company": d.company,
-					"is_group": 0
-				}
-			}
-		});
 
 		if (frm.doc.__islocal == 1) {
 			frm.set_value("represents_company", "");
diff --git a/erpnext/selling/doctype/customer/customer.json b/erpnext/selling/doctype/customer/customer.json
index 0050279..46b1035 100644
--- a/erpnext/selling/doctype/customer/customer.json
+++ b/erpnext/selling/doctype/customer/customer.json
@@ -337,12 +337,12 @@
    "label": "Default Accounts"
   },
   {
-   "description": "Mention if a non-standard receivable account",
-   "fieldname": "accounts",
-   "fieldtype": "Table",
-   "label": "Accounts",
-   "options": "Party Account"
-  },
+    "description": "Mention if non-standard Receivable account",
+    "fieldname": "accounts",
+    "fieldtype": "Table",
+    "label": "Accounts",
+    "options": "Party Account"
+   },
   {
    "fieldname": "credit_limit_section",
    "fieldtype": "Section Break",
@@ -568,7 +568,7 @@
    "link_fieldname": "party"
   }
  ],
- "modified": "2023-05-29 14:29:17.789578",
+ "modified": "2023-06-05 13:48:46.152659",
  "modified_by": "Administrator",
  "module": "Selling",
  "name": "Customer",
diff --git a/erpnext/setup/doctype/company/company.js b/erpnext/setup/doctype/company/company.js
index 81919af..fb0ee7f 100644
--- a/erpnext/setup/doctype/company/company.js
+++ b/erpnext/setup/doctype/company/company.js
@@ -227,8 +227,7 @@
 		["asset_received_but_not_billed", {"account_type": "Asset Received But Not Billed"}],
 		["unrealized_profit_loss_account", {"root_type": ["in", ["Liability", "Asset"]]}],
 		["default_provisional_account", {"root_type": ["in", ["Liability", "Asset"]]}],
-		["default_advances_received_account", {"root_type": "Liability"}],
-		["default_advances_paid_account", {"root_type": "Asset"}],
+		["default_advance_account", {"root_type": ["in", ["Liability", "Asset"]]}],
 	], function(i, v) {
 		erpnext.company.set_custom_query(frm, v);
 	});
diff --git a/erpnext/setup/doctype/company/company.json b/erpnext/setup/doctype/company/company.json
index 369e139..5b3d3bb 100644
--- a/erpnext/setup/doctype/company/company.json
+++ b/erpnext/setup/doctype/company/company.json
@@ -72,9 +72,8 @@
   "default_finance_book",
   "advance_payments_section",
   "book_advance_payments_as_liability",
-  "default_advances_received_account",
+  "default_advance_account",
   "column_break_cui0",
-  "default_advances_paid_account",
   "auto_accounting_for_stock_settings",
   "enable_perpetual_inventory",
   "enable_provisional_accounting_for_non_stock_items",
@@ -712,24 +711,16 @@
    "label": "Advance Payments"
   },
   {
-   "depends_on": "eval:doc.book_advance_payments_as_liability",
-   "fieldname": "default_advances_received_account",
-   "fieldtype": "Link",
-   "label": "Default Advances Received Account",
-   "mandatory_depends_on": "book_advance_payments_as_liability",
-   "options": "Account"
-  },
-  {
-   "depends_on": "eval:doc.book_advance_payments_as_liability",
-   "fieldname": "default_advances_paid_account",
-   "fieldtype": "Link",
-   "label": "Default Advances Paid Account",
-   "mandatory_depends_on": "book_advance_payments_as_liability",
-   "options": "Account"
-  },
-  {
    "fieldname": "column_break_cui0",
    "fieldtype": "Column Break"
+  },
+  {
+   "depends_on": "eval:doc.book_advance_payments_as_liability",
+   "fieldname": "default_advance_account",
+   "fieldtype": "Link",
+   "label": "Default Account",
+   "mandatory_depends_on": "book_advance_payments_as_liability",
+   "options": "Account"
   }
  ],
  "icon": "fa fa-building",
@@ -737,7 +728,7 @@
  "image_field": "company_logo",
  "is_tree": 1,
  "links": [],
- "modified": "2023-06-02 13:11:41.939016",
+ "modified": "2023-06-05 14:12:37.946451",
  "modified_by": "Administrator",
  "module": "Setup",
  "name": "Company",
diff --git a/erpnext/setup/doctype/customer_group/customer_group.js b/erpnext/setup/doctype/customer_group/customer_group.js
index ef556c7..3a71b43 100644
--- a/erpnext/setup/doctype/customer_group/customer_group.js
+++ b/erpnext/setup/doctype/customer_group/customer_group.js
@@ -37,7 +37,7 @@
 	}
 }
 
-cur_frm.fields_dict['accounts'].grid.get_field('advances_received_account').get_query = function(doc, cdt, cdn) {
+cur_frm.fields_dict['accounts'].grid.get_field('advance_account').get_query = function(doc, cdt, cdn) {
 	var d  = locals[cdt][cdn];
 	return {
 		filters: {
@@ -46,15 +46,4 @@
 			"is_group": 0
 		}
 	}
-}
-
-cur_frm.fields_dict['accounts'].grid.get_field('advances_paid_account').get_query = function(doc, cdt, cdn) {
-	var d  = locals[cdt][cdn];
-	return {
-		filters: {
-			"root_type": 'Asset',
-			"company": d.company,
-			"is_group": 0
-		}
-	}
 }
\ No newline at end of file
diff --git a/erpnext/setup/doctype/supplier_group/supplier_group.js b/erpnext/setup/doctype/supplier_group/supplier_group.js
index e75030d..58ab7fa 100644
--- a/erpnext/setup/doctype/supplier_group/supplier_group.js
+++ b/erpnext/setup/doctype/supplier_group/supplier_group.js
@@ -36,3 +36,14 @@
 		}
 	};
 };
+
+cur_frm.fields_dict['accounts'].grid.get_field('advance_account').get_query = function(doc, cdt, cdn) {
+	var d  = locals[cdt][cdn];
+	return {
+		filters: {
+			"root_type": 'Asset',
+			"company": d.company,
+			"is_group": 0
+		}
+	}
+};
\ No newline at end of file
