mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-06 05:39:12 +00:00
get accounts for opening entry
This commit is contained in:
@@ -410,7 +410,7 @@ def get_opening_accounts(company):
|
|||||||
"""get all balance sheet accounts for opening entry"""
|
"""get all balance sheet accounts for opening entry"""
|
||||||
from erpnext.accounts.utils import get_balance_on
|
from erpnext.accounts.utils import get_balance_on
|
||||||
accounts = frappe.db.sql_list("""select name from tabAccount
|
accounts = frappe.db.sql_list("""select name from tabAccount
|
||||||
where group_or_ledger='Ledger' and report_type='Profit and Loss' and company=%s""", company)
|
where group_or_ledger='Ledger' and report_type='Balance Sheet' and company=%s""", 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]
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user