From 6b29c06511185d69a6a461bb7ecd0222f9acf73e Mon Sep 17 00:00:00 2001 From: l0gesh29 Date: Thu, 28 Aug 2025 19:16:10 +0530 Subject: [PATCH] fix: ignore cancelled gl and add company filter (cherry picked from commit afb067ce50a55116f6351a4bafeb47c69b3b2009) --- .../trial_balance_simple/trial_balance_simple.json | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/erpnext/accounts/report/trial_balance_simple/trial_balance_simple.json b/erpnext/accounts/report/trial_balance_simple/trial_balance_simple.json index fab3a76a0c4..6b926649ca6 100644 --- a/erpnext/accounts/report/trial_balance_simple/trial_balance_simple.json +++ b/erpnext/accounts/report/trial_balance_simple/trial_balance_simple.json @@ -4,15 +4,25 @@ "disabled": 0, "docstatus": 0, "doctype": "Report", + "filters": [ + { + "fieldname": "company", + "fieldtype": "Link", + "label": "Company", + "mandatory": 1, + "options": "Company", + "wildcard_filter": 0 + } + ], "idx": 0, "is_standard": "Yes", - "modified": "2019-01-17 17:20:42.374958", + "modified": "2025-08-28 19:06:54.273322", "modified_by": "Administrator", "module": "Accounts", "name": "Trial Balance (Simple)", "owner": "Administrator", "prepared_report": 0, - "query": "select fiscal_year as \"Fiscal Year:Data:80\",\n\tcompany as \"Company:Data:220\",\n\tposting_date as \"Posting Date:Date:100\",\n\taccount as \"Account:Data:380\",\n\tsum(debit) as \"Debit:Currency:140\",\n\tsum(credit) as \"Credit:Currency:140\",\n\tfinance_book as \"Finance Book:Link/Finance Book:140\"\nfrom `tabGL Entry`\ngroup by fiscal_year, company, posting_date, account\norder by fiscal_year, company, posting_date, account", + "query": "select fiscal_year as \"Fiscal Year:Data:80\",\n\tcompany as \"Company:Data:220\",\n\tposting_date as \"Posting Date:Date:100\",\n\taccount as \"Account:Data:380\",\n\tsum(debit) as \"Debit:Currency:140\",\n\tsum(credit) as \"Credit:Currency:140\",\n\tfinance_book as \"Finance Book:Link/Finance Book:140\"\nfrom `tabGL Entry`\nwhere is_cancelled = 0 and company = %(company)s\ngroup by fiscal_year, company, posting_date, account\norder by fiscal_year, company, posting_date, account", "ref_doctype": "GL Entry", "report_name": "Trial Balance (Simple)", "report_type": "Query Report",