Merge pull request #39371 from ruthra-kumar/fix_customer_ledger_summary_report
fix: incorrect sql error if account name has '%'
This commit is contained in:
commit
28ebc4cfee
@ -376,6 +376,10 @@ class PartyLedgerSummaryReport(object):
|
|||||||
if not income_or_expense_accounts:
|
if not income_or_expense_accounts:
|
||||||
# prevent empty 'in' condition
|
# prevent empty 'in' condition
|
||||||
income_or_expense_accounts.append("")
|
income_or_expense_accounts.append("")
|
||||||
|
else:
|
||||||
|
# escape '%' in account name
|
||||||
|
# ignoring frappe.db.escape as it replaces single quotes with double quotes
|
||||||
|
income_or_expense_accounts = [x.replace("%", "%%") for x in income_or_expense_accounts]
|
||||||
|
|
||||||
accounts_query = (
|
accounts_query = (
|
||||||
qb.from_(gl)
|
qb.from_(gl)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user