def METHOD_NAME(filters, mode_of_payments):
	data = []
	conditions = get_conditions(filters)
	entry = frappe.db.sql(
		"""
		select branch, mode_of_payment, sum(net_pay) as net_pay, sum(gross_pay) as gross_pay
		from `tabSalary Slip` sal
		where docstatus = 1 %s
		group by branch, mode_of_payment
		"""
		% (conditions),
		as_dict=1,
	)
	branch_wise_entries, gross_pay = prepare_data(entry)
	branches = frappe.db.sql_list(
		"""
		select distinct branch from `tabSalary Slip` sal
		where docstatus = 1 %s
	"""
		% (conditions)
	)
	total_row = {"total": 0, "branch": "Total"}
	for branch in branches:
		total = 0
		row = {"branch": branch}
		for mode in mode_of_payments:
			if branch_wise_entries.get(branch).get(mode):
				row[mode] = branch_wise_entries.get(branch).get(mode)
				total += branch_wise_entries.get(branch).get(mode)
		row["total"] = total
		data.append(row)
	total_row = get_total_based_on_mode_of_payment(data, mode_of_payments)
	total_deductions = gross_pay - total_row.get("total")
	report_summary = []
	if data:
		data.append(total_row)
		data.append({})
		data.append({"branch": "<b>Total Gross Pay</b>", mode_of_payments[0]: gross_pay})
		data.append({"branch": "<b>Total Deductions</b>", mode_of_payments[0]: total_deductions})
		data.append({"branch": "<b>Total Net Pay</b>", mode_of_payments[0]: total_row.get("total")})
		currency = erpnext.get_company_currency(filters.company)
		report_summary = get_report_summary(
			gross_pay, total_deductions, total_row.get("total"), currency
		)
	return data, total_row, report_summary