[Fix] Opening Entry, Unknown column 'warehouse' in 'where clause' (#9585)
* [Fix] Opening Entry, Unknown column 'warehouse' in 'where clause' * escaped company name in get_opening_accounts
This commit is contained in:
parent
ea92682cfd
commit
3e4bcfe2d8
@ -733,11 +733,10 @@ def get_opening_accounts(company):
|
|||||||
accounts = frappe.db.sql_list("""select
|
accounts = frappe.db.sql_list("""select
|
||||||
name from tabAccount
|
name from tabAccount
|
||||||
where
|
where
|
||||||
is_group=0 and
|
is_group=0 and report_type='Balance Sheet' and company=%s and
|
||||||
report_type='Balance Sheet' and
|
name not in(select distinct account from tabWarehouse where
|
||||||
ifnull(warehouse, '') = '' and
|
account is not null and account != '')
|
||||||
company=%s
|
order by name asc""", frappe.db.escape(company))
|
||||||
order by name asc""", company)
|
|
||||||
|
|
||||||
return [{"account": a, "balance": get_balance_on(a)} for a in accounts]
|
return [{"account": a, "balance": get_balance_on(a)} for a in accounts]
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user