Merge branch 'develop' into snyk-fix-bfc98e30e876ad63a72b641a42881bc9

This commit is contained in:
gavin 2020-02-08 18:45:17 +05:30 committed by GitHub
commit b8a0370219
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -141,13 +141,13 @@ def get_conditions(filters):
conditions = ""
if filters.get("company"):
conditions += " AND company='%s'"% filters.get('company')
conditions += " AND company=%s"% frappe.db.escape(filters.get('company'))
if filters.get("cost_center") or filters.get("project"):
conditions += """
AND (cost_center='%s'
OR project='%s')
"""% (filters.get('cost_center'), filters.get('project'))
AND (cost_center=%s
OR project=%s)
"""% (frappe.db.escape(filters.get('cost_center')), frappe.db.escape(filters.get('project')))
if filters.get("from_date"):
conditions += " AND transaction_date>=%s"% filters.get('from_date')