Merge pull request #22854 from nabinhait/gl-balance-fix
fix: Ignore cancelled gl entries to get account balance
diff --git a/erpnext/accounts/utils.py b/erpnext/accounts/utils.py
index 824b2f2..51ac7cf 100644
--- a/erpnext/accounts/utils.py
+++ b/erpnext/accounts/utils.py
@@ -122,7 +122,7 @@
cost_center = frappe.form_dict.get("cost_center")
- cond = []
+ cond = ["is_cancelled=0"]
if date:
cond.append("posting_date <= %s" % frappe.db.escape(cstr(date)))
else:
@@ -206,7 +206,7 @@
return flt(bal)
def get_count_on(account, fieldname, date):
- cond = []
+ cond = ["is_cancelled=0"]
if date:
cond.append("posting_date <= %s" % frappe.db.escape(cstr(date)))
else: