Q. If one mixes up his Shabbos Shemoneh Esreis, between Maariv, Shacharis, and Mincha, is he still yotzei?

A. Shulchan Aruch (O.H. 268: 6) rules that if one unwittingly exchanged one of the Amidos of Shabbos with another excepting Musaf, if he has already finished the intermediate brocho, he complies after the fact. Mishna Berura (ibid.) explains that the fourth brocho of Retzeh is common to all of the three tefilos with the exception of Musaf, since it requires the mention of its own particular Korbonos.

If he did switch over and for example recited on Friday night the Shacharis Amida, next morning most Poskim rule that he should daven the Tefila that is normally said and recite Shacharis again. (Piskei Teshuvos 268: n. 55, quoting Aruch Hashulchon, Kaf Hachaim, Eliyahu Rabah and others.) However, Mekor Chaim (ibid.) disagrees.

Horav Shlomo Miller Shlit”a pointed out that since every one of the three Tefilos represent different sources and dimensions of Shabbos (Friday night is the Shabbos of creation or Shabbos Bereshis, Shacharis stands for the Shabbos of the Torah giving and Mincha for the Shabbos of the times to come, from Sidur Hagrah), therefore the proper Tefilah corresponding to that time of the day should be recited.

Rabbi A. Bartfeld as revised by Horav Shlomo Miller Shlit”a