From 9d5fabd7ac48f9ba8dd4f202ce145ae395253ebd Mon Sep 17 00:00:00 2001 From: Deepesh Garg Date: Wed, 29 Apr 2020 22:14:45 +0530 Subject: [PATCH 1/2] fix: get_period_list API change fixes --- erpnext/hr/report/vehicle_expenses/vehicle_expenses.py | 3 ++- .../item_group_wise_sales_target_variance.py | 5 +++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/erpnext/hr/report/vehicle_expenses/vehicle_expenses.py b/erpnext/hr/report/vehicle_expenses/vehicle_expenses.py index e5622b7ae1..eab58ffbbc 100644 --- a/erpnext/hr/report/vehicle_expenses/vehicle_expenses.py +++ b/erpnext/hr/report/vehicle_expenses/vehicle_expenses.py @@ -12,7 +12,8 @@ def execute(filters=None): columns, data, chart = [], [], [] if filters.get('fiscal_year'): company = erpnext.get_default_company() - period_list = get_period_list(filters.get('fiscal_year'), filters.get('fiscal_year'),"Monthly", company) + period_list = get_period_list(filters.get('fiscal_year'), filters.get('fiscal_year'), + '', '', 'Fiscal Year', 'Monthly', company=company) columns=get_columns() data=get_log_data(filters) chart=get_chart_data(data,period_list) diff --git a/erpnext/selling/report/sales_partner_target_variance_based_on_item_group/item_group_wise_sales_target_variance.py b/erpnext/selling/report/sales_partner_target_variance_based_on_item_group/item_group_wise_sales_target_variance.py index 0cb606b277..2d0d60ac06 100644 --- a/erpnext/selling/report/sales_partner_target_variance_based_on_item_group/item_group_wise_sales_target_variance.py +++ b/erpnext/selling/report/sales_partner_target_variance_based_on_item_group/item_group_wise_sales_target_variance.py @@ -11,9 +11,10 @@ from erpnext.accounts.doctype.monthly_distribution.monthly_distribution import g def get_data_column(filters, partner_doctype): data = [] - period_list = get_period_list(filters.fiscal_year, filters.fiscal_year, - filters.period, company=filters.company) + period_list = get_period_list(filters.fiscal_year, filters.fiscal_year, '', '', + 'Fiscal Year', filters.period, company=filters.company) + print(period_list) rows = get_data(filters, period_list, partner_doctype) columns = get_columns(filters, period_list, partner_doctype) From 7c2d50fa15193a367b7f77cc19a61b3df27b2669 Mon Sep 17 00:00:00 2001 From: Deepesh Garg Date: Wed, 29 Apr 2020 22:16:47 +0530 Subject: [PATCH 2/2] fix: Remove print --- .../item_group_wise_sales_target_variance.py | 1 - 1 file changed, 1 deletion(-) diff --git a/erpnext/selling/report/sales_partner_target_variance_based_on_item_group/item_group_wise_sales_target_variance.py b/erpnext/selling/report/sales_partner_target_variance_based_on_item_group/item_group_wise_sales_target_variance.py index 2d0d60ac06..857b9823e0 100644 --- a/erpnext/selling/report/sales_partner_target_variance_based_on_item_group/item_group_wise_sales_target_variance.py +++ b/erpnext/selling/report/sales_partner_target_variance_based_on_item_group/item_group_wise_sales_target_variance.py @@ -14,7 +14,6 @@ def get_data_column(filters, partner_doctype): period_list = get_period_list(filters.fiscal_year, filters.fiscal_year, '', '', 'Fiscal Year', filters.period, company=filters.company) - print(period_list) rows = get_data(filters, period_list, partner_doctype) columns = get_columns(filters, period_list, partner_doctype)