From 1f5b21673ce00f34f67d34a9b7b9b99cef03ff51 Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Tue, 26 May 2015 11:07:23 +0530 Subject: [PATCH] minor fix in report --- .../sales_person_wise_transaction_summary.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/erpnext/selling/report/sales_person_wise_transaction_summary/sales_person_wise_transaction_summary.py b/erpnext/selling/report/sales_person_wise_transaction_summary/sales_person_wise_transaction_summary.py index e102f0d7688..65b0c08680b 100644 --- a/erpnext/selling/report/sales_person_wise_transaction_summary/sales_person_wise_transaction_summary.py +++ b/erpnext/selling/report/sales_person_wise_transaction_summary/sales_person_wise_transaction_summary.py @@ -50,10 +50,14 @@ def get_conditions(filters, date_field): conditions = [""] values = [] - for field in ["company", "customer", "territory", "sales_person"]: + for field in ["company", "customer", "territory"]: if filters.get(field): conditions.append("dt.{0}=%s".format(field)) values.append(filters[field]) + + if filters.get("sales_person"): + conditions.append("st.sales_person=%s") + values.append(filters["sales_person"]) if filters.get("from_date"): conditions.append("dt.{0}>=%s".format(date_field))