Merge pull request #56155 from aerele/fix/party-type-filter-v16

fix: fetch party types based on account type in journal entry
This commit is contained in:
Shllokkk
2026-06-21 00:02:02 +05:30
committed by GitHub

View File

@@ -33,14 +33,11 @@ def get_party_type(doctype: str, txt: str, searchfield: str, start: int, page_le
if filters and filters.get("account"):
account_type = frappe.db.get_value("Account", filters.get("account"), "account_type")
if account_type:
if account_type in ["Receivable", "Payable"]:
# Include Employee regardless of its configured account_type, but still respect the text filter
condition_list.append(
(PartyType.account_type == account_type) | (PartyType.name == "Employee")
)
else:
condition_list.append(PartyType.account_type == account_type)
if account_type in ["Receivable", "Payable"]:
# Include Employee regardless of its configured account_type, but still respect the text filter
condition_list.append((PartyType.account_type == account_type) | (PartyType.name == "Employee"))
else:
condition_list.append(PartyType.account_type == account_type)
for condition in condition_list:
get_party_type_query = get_party_type_query.where(condition)