fix: SQL query in accounts receivable, payable reports (#22888)
This commit is contained in:
parent
e211bb7a53
commit
b7311c8fc1
@ -643,6 +643,8 @@ class ReceivablePayableReport(object):
|
|||||||
account_type = "Receivable" if self.party_type == "Customer" else "Payable"
|
account_type = "Receivable" if self.party_type == "Customer" else "Payable"
|
||||||
accounts = [d.name for d in frappe.get_all("Account",
|
accounts = [d.name for d in frappe.get_all("Account",
|
||||||
filters={"account_type": account_type, "company": self.filters.company})]
|
filters={"account_type": account_type, "company": self.filters.company})]
|
||||||
|
|
||||||
|
if accounts:
|
||||||
conditions.append("account in (%s)" % ','.join(['%s'] *len(accounts)))
|
conditions.append("account in (%s)" % ','.join(['%s'] *len(accounts)))
|
||||||
values += accounts
|
values += accounts
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user