fix: add is_cancelled in condition

This commit is contained in:
l0gesh29
2025-08-29 16:30:29 +05:30
parent aedb171dd4
commit 77a9cf6398

View File

@@ -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]