Merge pull request #49416 from frappe/mergify/bp/version-14-hotfix/pr-49379

fix: add is_cancelled in condition (backport #49379)
This commit is contained in:
ruthra kumar
2025-09-02 11:16:44 +05:30
committed by GitHub

View File

@@ -261,7 +261,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]