Removing Company Filters Trial Balance for Consolidation

I want to remove the company filter in Trial Balance so that all of the companies Trial balance will be shown for consolidation

  1. How do i remove filters in the trial_balance.py in reports

  2. If i have successfully remove the filters will it output all all companies trial balance’s or will it fail

  3. What is the best way to do this ,Should i modify trial_balance,js or trial_balance,py

  4. I tried removing filters.company in the trial_balance.py but it returns an error should i just remove this line or replace it

1 Like

Company filter in mandatory in trial balance.
In script report you can remove filter from js file.

You can create separate report for Consolidated Trial Balance.
Check this

I have successfully created a consolidated report in Accounting Main Reports by modifying the financial_statements.py I guess my problem is solved.

1 Like

@Lightning Can you please share the report, i need the same.

Im not sure if this will work for you or this is the consolidation that you are looking for ,but here it is sorry for the late reply stilll busy doing the cashflow and other reports :smile:

Consolidated Reports For

a.Accounts Payable
b.Accounts Recievable
c.Balance Sheet
d.General Ledger
e.Trial_balance

STEP 1: Insert a new field in the tables

“tabGL Entry”
“tabAccount”

Name: consolidation
Type: Varchar
Length: 255
Decimals: 0
Default: yes
Character set: utf8
Collation: utf8_general_ci

STEP 2: Create a New Script Report in ERPnext

[Consolidated Trial Balance]
Name:Consolidated Trial Balance
Ref DocType: GL Entry
Is Standard: Yes
Report Type: Script Report
Module: Accounts
Apply User Permissions: check

[Consolidated Balance Sheet]
Name:Consolidated Balance Sheet
Ref DocType: GL Entry
Is Standard: Yes
Report Type: Script Report
Module: Accounts
Apply User Permissions: check

[Consolidated Accounts Receivable]
Name:Consolidated Accounts Receivable
Ref DocType: Sales Invoice
Is Standard: Yes
Report Type: Script Report
Module: Accounts
Apply User Permissions: check

[Consolidated Accounts Payable]
Name:Consolidated Accounts Receivable
Ref DocType: Purchase Invoice
Is Standard: Yes
Report Type: Script Report
Module: Accounts
Apply User Permissions: check

[Consolidated General Ledger]
Name:Consolidated General Ledger
Ref DocType: GL Entry
Is Standard: Yes
Report Type: Script Report
Module: Accounts
Apply User Permissions: check

STEP 3: Copy the files ( Removed ) to frappe-bench/apps/erpnext/erpnext/accounts/report

STEP 4: Add the consolidated reports using frappe-bench/apps/erpnext/erpnext/config/accounts.py

@Lightning Can you please share your github link? i need the same reports.