def METHOD_NAME(filters):
	if (filters.get("payment_type") == _("Incoming") and filters.get("party_type") == "Supplier") or (
		filters.get("payment_type") == _("Outgoing") and filters.get("party_type") == "Customer"
	):
		frappe.throw(
			_("{0} payment entries can not be filtered by {1}").format(
				filters.payment_type, filters.party_type
			)
		)