I have succesfully created some consolidated Report after removing the company filter General Ledger Accounts Recievable and other reports, works Fine But Trial Balance Returns two Rows of AssetsLiabilities , Expenses and Income
Please Help.
Any explanation on the current situation would help.
I added a new Field in TabAccounts and TabGL Entry a new field named consolidation i set it to default yes
then instead of using company as filter i changed it to consolidation so that it will show all companies result instead of 1 company
Like this in consolidated_financial_statements.py
def get_accounts(consolidation, root_type):
# root lft, rgt
root_account = frappe.db.sql("""select lft, rgt from `tabAccount`
where consolidation=%s and root_type=%s and ifnull(parent_account, '') = ''
order by lft limit 1""",
(consolidation, root_type), as_dict=True)
accounts = frappe.db.sql("""select * from `tabAccount`
where consolidation=%(consolidation)s and lft >= %(lft)s and rgt <= %(rgt)s order by lft""",
{ "consolidation": consolidation, "lft": lft, "rgt": rgt }, as_dict=True)