fix(procurement-tracker): concatenate filter conditions with leading whitespaces (#18440)

This commit is contained in:
Mangesh-Khairnar 2019-07-22 11:16:40 +05:30 committed by Nabin Hait
parent 60a291af8f
commit 16a0458e29
3 changed files with 19 additions and 5 deletions

View File

@ -7,7 +7,7 @@
"doctype": "Report",
"idx": 0,
"is_standard": "Yes",
"modified": "2019-03-29 17:18:06.678728",
"modified": "2019-07-21 23:24:21.094269",
"modified_by": "Administrator",
"module": "Buying",
"name": "Procurement Tracker",
@ -16,5 +16,12 @@
"ref_doctype": "Purchase Order",
"report_name": "Procurement Tracker",
"report_type": "Script Report",
"roles": []
"roles": [
{
"role": "Purchase Manager"
},
{
"role": "Purchase User"
}
]
}

View File

@ -150,10 +150,10 @@ def get_conditions(filters):
"""% (filters.get('cost_center'), filters.get('project'))
if filters.get("from_date"):
conditions += "AND transaction_date>=%s"% filters.get('from_date')
conditions += " AND transaction_date>=%s"% filters.get('from_date')
if filters.get("to_date"):
conditions += "AND transaction_date<=%s"% filters.get('to_date')
conditions += " AND transaction_date<=%s"% filters.get('to_date')
return conditions
def get_data(filters):

View File

@ -157,6 +157,13 @@ def get_data():
"reference_doctype": "Purchase Order",
"onboard": 1,
},
{
"type": "report",
"is_query_report": True,
"name": "Procurement Tracker",
"reference_doctype": "Purchase Order",
"onboard": 1,
},
{
"type": "report",
"is_query_report": True,
@ -228,5 +235,5 @@ def get_data():
}
]
},
]