fix: add is_cancelled in condition

(cherry picked from commit 77a9cf6398)
This commit is contained in:
l0gesh29
2025-08-29 16:30:29 +05:30
committed by Mergify
parent faeedb01a8
commit b9f9be3d88

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]