fix: Group by filter fix in item wise sales and purchase register

This commit is contained in:
Deepesh Garg 2020-04-29 12:05:56 +05:30
parent cb8ea6643e
commit 60256e7299
2 changed files with 2 additions and 2 deletions

View File

@ -102,7 +102,7 @@ def _execute(filters=None, additional_table_columns=None, additional_query_colum
data.append(row)
if filters.get('group_by'):
if filters.get('group_by') and item_list:
total_row = total_row_map.get(prev_group_by_value or d.get('item_name'))
total_row['percent_gt'] = flt(total_row['total']/grand_total * 100)
data.append(total_row)

View File

@ -111,7 +111,7 @@ def _execute(filters=None, additional_table_columns=None, additional_query_colum
data.append(row)
if filters.get('group_by'):
if filters.get('group_by') and item_list:
total_row = total_row_map.get(prev_group_by_value or d.get('item_name'))
total_row['percent_gt'] = flt(total_row['total']/grand_total * 100)
data.append(total_row)