Added finance book filtering logic to financial_statements.py
This commit is contained in:
parent
8cbbdfdf30
commit
a78a0e241f
@ -375,6 +375,11 @@ def get_additional_conditions(from_date, ignore_closing_entries, filters):
|
||||
additional_conditions.append("project = '%s'" % (frappe.db.escape(filters.get("project"))))
|
||||
if filters.get("cost_center"):
|
||||
additional_conditions.append(get_cost_center_cond(filters.get("cost_center")))
|
||||
if filters.get("finance_book"):
|
||||
additional_conditions.append("finance_book = '%s'" % frappe.db.escape(filters.get("finance_book")))
|
||||
else:
|
||||
additional_conditions.append("ifnull(finance_book, '') = ''")
|
||||
|
||||
|
||||
return " and {}".format(" and ".join(additional_conditions)) if additional_conditions else ""
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user