The Supreme Court, and the courts of appeal, may affirm, reverse, or modify any judgment or order appealed from, and may direct the proper judgment or order to be entered, or direct a new trial or further proceedings to be had. In giving its decision, if a new trial be granted, the court shall pass upon and determine all the questions of law involved in the case, presented upon such appeal, and necessary to the final determination of the case. Its judgment in appealed cases shall be remitted to the court from which the appeal was taken.
Ca. Civ. Proc. Code § 43