ERPNext Foundation ERPNext Cloud Chat Blog Discuss Frappé* Donate

Need Help on Consolidation of Trial Balance Report


#1

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.


#2

Will you contribute?


#3

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 . . .


#4

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


#5

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


#6

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.


#7

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)

#8

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.


#9

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


#10

@Lightning was there any progress with this?