Need Help on Consolidation of Trial Balance Report

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 Assets Liabilities , Expenses and Income

Please Help.

Any explanation on the current situation would help.

Will you contribute?

1 Like

Well Im already trying to contribute Like this one " Here" . but its still not ready

i gave a copy to someone but did not receive any feedback but i later discovered that there are some problems like this one . . .

You can at least push it online if you need help.

https://github.com/kinzunite/Consolidated-Trial-Balance-Test

Can you explain what you did.

Seems like a lot of code duplication. If you want to add more parameters to core functions, you should edit the main code.

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)

You should avoid duplication, if there is a change upstream, how will you maintain your report?

You can just update the existing trial balance report and add a check box for consolidated, that will not add the company filter.

thnx rmehta . .i will try that one out and see what happens

@Lightning was there any progress with this?