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
This commit is contained in:
OSS Technolab 2018-05-23 13:17:53 +08:00 committed by Nabin Hait
parent 2f69254e56
commit 4fb4ca6b10

View File

@ -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)