A judgment or decree, when based upon a decision by the court, or the special verdict of a jury, may, upon motion of the party aggrieved, be set aside and vacated by the same court, and another and different judgment entered, for either of the following causes, materially affecting the substantial rights of the party and entitling the party to a different judgment:
Ca. Civ. Proc. Code § 663