Merge pull request #15570 from shreyashah115/fix-filter-error
[Bug] Item wise sales register filters
diff --git a/erpnext/accounts/report/item_wise_sales_register/item_wise_sales_register.py b/erpnext/accounts/report/item_wise_sales_register/item_wise_sales_register.py
index a8d8159..c95c8df 100644
--- a/erpnext/accounts/report/item_wise_sales_register/item_wise_sales_register.py
+++ b/erpnext/accounts/report/item_wise_sales_register/item_wise_sales_register.py
@@ -14,10 +14,10 @@
def _execute(filters=None, additional_table_columns=None, additional_query_columns=None):
if not filters: filters = {}
- filters.update({"from_date": filters.get("date_range")[0], "to_date": filters.get("date_range")[1]})
+ filters.update({"from_date": filters.get("date_range") and filters.get("date_range")[0], "to_date": filters.get("date_range") and filters.get("date_range")[1]})
columns = get_columns(additional_table_columns)
- company_currency = erpnext.get_company_currency(filters.company)
+ company_currency = erpnext.get_company_currency(filters.get('company'))
item_list = get_items(filters, additional_query_columns)
if item_list: