Merge pull request #49379 from aerele/balance-type

fix: add is_cancelled in condition
This commit is contained in:
ruthra kumar
2025-09-02 10:56:32 +05:30
committed by GitHub

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]