From d2d84e3c9de5a36e621338c70d23539a2b83c57f Mon Sep 17 00:00:00 2001 From: deepeshgarg007 Date: Tue, 26 Feb 2019 11:46:56 +0530 Subject: [PATCH] fix: Company filter fix --- .../sales_person_wise_transaction_summary.js | 3 ++- .../sales_person_wise_transaction_summary.py | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/erpnext/selling/report/sales_person_wise_transaction_summary/sales_person_wise_transaction_summary.js b/erpnext/selling/report/sales_person_wise_transaction_summary/sales_person_wise_transaction_summary.js index 67051c8b5e..b236151bad 100644 --- a/erpnext/selling/report/sales_person_wise_transaction_summary/sales_person_wise_transaction_summary.js +++ b/erpnext/selling/report/sales_person_wise_transaction_summary/sales_person_wise_transaction_summary.js @@ -33,7 +33,8 @@ frappe.query_reports["Sales Person-wise Transaction Summary"] = { label: __("Company"), fieldtype: "Link", options: "Company", - default: frappe.defaults.get_user_default("Company") + default: frappe.defaults.get_user_default("Company"), + reqd: 1 }, { fieldname:"item_group", 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 db11ae95c2..41c7f76517 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 @@ -15,7 +15,7 @@ def execute(filters=None): item_details = get_item_details() data = [] - company_currency = get_company_currency(filters["company"]) + company_currency = get_company_currency(filters.get("company")) for d in entries: if d.stock_qty > 0 or filters.get('show_return_entries', 0):