From cece0c7ffe63cb4b81feb973c1a05a1615ee7321 Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Thu, 11 Sep 2014 13:58:43 +0530 Subject: [PATCH] Opening entry should not be considered in bank reconciliation statement --- .../bank_reconciliation_statement.py | 3 ++- 1 file changed, 2 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 4fda0300b6..923aa340c0 100644 --- a/erpnext/accounts/report/bank_reconciliation_statement/bank_reconciliation_statement.py +++ b/erpnext/accounts/report/bank_reconciliation_statement/bank_reconciliation_statement.py @@ -26,7 +26,7 @@ def execute(filters=None): amounts_not_reflected_in_system = frappe.db.sql("""select sum(ifnull(jvd.debit, 0) - ifnull(jvd.credit, 0)) from `tabJournal Voucher Detail` jvd, `tabJournal Voucher` jv where jvd.parent = jv.name and jv.docstatus=1 and jvd.account=%s - and jv.posting_date > %s and jv.clearance_date <= %s + and jv.posting_date > %s and jv.clearance_date <= %s and ifnull(jv.is_opening, 'No') = 'No' """, (filters["account"], filters["report_date"], filters["report_date"])) amounts_not_reflected_in_system = flt(amounts_not_reflected_in_system[0][0]) \ @@ -61,6 +61,7 @@ def get_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' order by jv.name DESC""", filters, as_list=1) return entries