From 835e32cec77b101bf0515a349677185f8812a3bc Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Sat, 11 Jul 2026 18:18:17 +0530 Subject: [PATCH] fix(banking): allow negative balance in bank statement import (backport #56959) (#57054) fix(banking): allow negative balance in bank statement import (#56959) (cherry picked from commit d449ad3b3f9d451fd115a94e781e4c9cc269f289) Co-authored-by: Nikhil Kothari --- .../bank_statement_import_log/bank_statement_import_log.json | 3 +-- .../bank_statement_import_log/bank_statement_import_log.py | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/erpnext/accounts/doctype/bank_statement_import_log/bank_statement_import_log.json b/erpnext/accounts/doctype/bank_statement_import_log/bank_statement_import_log.json index c34b21f7a91..d7b68b42860 100644 --- a/erpnext/accounts/doctype/bank_statement_import_log/bank_statement_import_log.json +++ b/erpnext/accounts/doctype/bank_statement_import_log/bank_statement_import_log.json @@ -54,7 +54,6 @@ "fieldtype": "Currency", "in_list_view": 1, "label": "Closing Balance", - "non_negative": 1, "options": "currency" }, { @@ -191,7 +190,7 @@ "grid_page_length": 50, "index_web_pages_for_search": 1, "links": [], - "modified": "2026-05-08 17:55:25.615942", + "modified": "2026-07-09 17:55:25.615942", "modified_by": "Administrator", "module": "Accounts", "name": "Bank Statement Import Log", diff --git a/erpnext/accounts/doctype/bank_statement_import_log/bank_statement_import_log.py b/erpnext/accounts/doctype/bank_statement_import_log/bank_statement_import_log.py index c4ac1deef69..2298330aa17 100644 --- a/erpnext/accounts/doctype/bank_statement_import_log/bank_statement_import_log.py +++ b/erpnext/accounts/doctype/bank_statement_import_log/bank_statement_import_log.py @@ -557,7 +557,7 @@ class BankStatementImportLog(Document): docname=self.name, ) - if self.closing_balance and self.closing_balance > 0 and self.end_date: + if self.closing_balance is not None and self.end_date: set_closing_balance_as_per_statement( self.bank_account, frappe.utils.getdate(self.end_date), self.closing_balance )