def METHOD_NAME(filters=None):
	if not filters:
		return [], []
	validate_filters(filters)
	columns = get_columns(filters)
	group_by_field = get_group_by_field(filters.get("group_by"))
	pos_entries = get_pos_entries(filters, group_by_field)
	if group_by_field != "mode_of_payment":
		concat_mode_of_payments(pos_entries)
	# return only entries if group by is unselected
	if not group_by_field:
		return columns, pos_entries
	# handle grouping
	invoice_map, grouped_data = {}, []
	for d in pos_entries:
		invoice_map.setdefault(d[group_by_field], []).append(d)
	for key in invoice_map:
		invoices = invoice_map[key]
		grouped_data += invoices
		add_subtotal_row(grouped_data, invoices, group_by_field, key)
	# move group by column to first position
	column_index = next(
		(index for (index, d) in enumerate(columns) if d["fieldname"] == group_by_field), None
	)
	columns.insert(0, columns.pop(column_index))
	return columns, grouped_data