Everything depends on whether we have enough money.中whether 引导的是宾语从句,做介词on的宾语,不能用if.但动词后的宾语从句可以用if 替换.如 I don;t know whether/if he will attend the meeting tomorrow.
但表语从句就只能用whether不能用if .如 The question is whether he will attend the meeting tomorrow.系动词后面的才是表语从句.