From 4fb4ca6b103ac4d80740be5fdc1a64a894a49768 Mon Sep 17 00:00:00 2001 From: OSS Technolab Date: Wed, 23 May 2018 13:17:53 +0800 Subject: [PATCH] Project Budget does not filter per Project (#14179) * Project Budget does not filter per Project Project Budget does not filter per Project and always return actual expense amount of all entries tagged to a project. * Update budget.py --- erpnext/accounts/doctype/budget/budget.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/accounts/doctype/budget/budget.py b/erpnext/accounts/doctype/budget/budget.py index ab9b93bb475..db7d9c446d7 100644 --- a/erpnext/accounts/doctype/budget/budget.py +++ b/erpnext/accounts/doctype/budget/budget.py @@ -227,7 +227,7 @@ def get_actual_expense(args): where lft>=%(lft)s and rgt<=%(rgt)s and name=gle.cost_center)""" elif args.budget_against_field == "Project": - condition2 = "and exists(select name from `tabProject` where name=gle.project)" + condition2 = "and exists(select name from `tabProject` where name=gle.project and gle.project = %(budget_against)s)" return flt(frappe.db.sql(""" select sum(gle.debit) - sum(gle.credit)