fix: annual income and expenses in digest

This commit is contained in:
Gursheen Anand
2023-11-22 18:38:33 +05:30
parent 0ca7527f7a
commit 52305e3000
2 changed files with 5 additions and 1 deletions

View File

@@ -183,6 +183,7 @@ def get_balance_on(
cost_center=None,
ignore_account_permission=False,
account_type=None,
start_date=None,
):
if not account and frappe.form_dict.get("account"):
account = frappe.form_dict.get("account")
@@ -196,6 +197,8 @@ def get_balance_on(
cost_center = frappe.form_dict.get("cost_center")
cond = ["is_cancelled=0"]
if start_date:
cond.append("posting_date >= %s" % frappe.db.escape(cstr(start_date)))
if date:
cond.append("posting_date <= %s" % frappe.db.escape(cstr(date)))
else: