From 622bfa6633cf9b9ac7423811d04e42249b96d30a Mon Sep 17 00:00:00 2001 From: creative-paramu Date: Fri, 27 Dec 2024 17:54:20 +0530 Subject: [PATCH] fix: Bank Reconciliation Statement Report Company Filter (cherry picked from commit 50c92034ba2267562ed7f5fdb312ddb57155c96d) --- .../bank_reconciliation_statement.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/erpnext/accounts/report/bank_reconciliation_statement/bank_reconciliation_statement.py b/erpnext/accounts/report/bank_reconciliation_statement/bank_reconciliation_statement.py index c7dba16492e..bfc2f2d56ff 100644 --- a/erpnext/accounts/report/bank_reconciliation_statement/bank_reconciliation_statement.py +++ b/erpnext/accounts/report/bank_reconciliation_statement/bank_reconciliation_statement.py @@ -142,7 +142,8 @@ def get_journal_entries(filters): where jvd.parent = jv.name and jv.docstatus=1 and jvd.account = %(account)s and jv.posting_date <= %(report_date)s and ifnull(jv.clearance_date, '4000-01-01') > %(report_date)s - and ifnull(jv.is_opening, 'No') = 'No'""", + and ifnull(jv.is_opening, 'No') = 'No' + and jv.company = %(company)s """, filters, as_dict=1, ) @@ -163,6 +164,7 @@ def get_payment_entries(filters): (paid_from=%(account)s or paid_to=%(account)s) and docstatus=1 and posting_date <= %(report_date)s and ifnull(clearance_date, '4000-01-01') > %(report_date)s + and company = %(company)s """, filters, as_dict=1, @@ -181,6 +183,7 @@ def get_pos_entries(filters): sip.account=%(account)s and si.docstatus=1 and sip.parent = si.name and account.name = sip.account and si.posting_date <= %(report_date)s and ifnull(sip.clearance_date, '4000-01-01') > %(report_date)s + and si.company = %(company)s order by si.posting_date ASC, si.name DESC """,