From 77a9cf639857b8e274d9c5adcaabd084d1524c7b Mon Sep 17 00:00:00 2001 From: l0gesh29 Date: Fri, 29 Aug 2025 16:30:29 +0530 Subject: [PATCH] fix: add is_cancelled in condition --- erpnext/accounts/doctype/gl_entry/gl_entry.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/accounts/doctype/gl_entry/gl_entry.py b/erpnext/accounts/doctype/gl_entry/gl_entry.py index c6f35168c0c..fe3e607aec4 100644 --- a/erpnext/accounts/doctype/gl_entry/gl_entry.py +++ b/erpnext/accounts/doctype/gl_entry/gl_entry.py @@ -308,7 +308,7 @@ def validate_balance_type(account, adv_adj=False): if balance_must_be: balance = frappe.db.sql( """select sum(debit) - sum(credit) - from `tabGL Entry` where account = %s""", + from `tabGL Entry` where is_cancelled = 0 and account = %s""", account, )[0][0]