Defendant Yongmei Hu (Hu) appeals from a judgment entered in favor of plaintiff Li Guan (Guan). Guan initially sued Hu for breach of a contract. However, several months before trial, the trial court dismissed the breach of contract claim with prejudice. As a result, Guan proceeded to trial on various fraud-based claims (e.g., rescission, cancellation, and fraud in the inducement) that effectively disaffirmed the validity of the parties' contract.
Following a bench trial, the trial court found that Guan had failed to prevail on any of his claims because, while his evidence in support of those claims was "considerable," it was nonetheless "insufficient." However, because there was evidence showing that Hu had breached the parties' contract, the trial court awarded damages to Guan. The trial court justified its decision in favor of Guan on language in Civil Code section 1692,1 which purportedly allowed it under these circumstances to " 'adjust the equities' " between the parties.
We hold that the trial court's interpretation of section 1692 was flawed and, as a result, we reverse the judgment and direct that judgment be entered in favor of Hu. We further hold that the trial court did not abuse its discretion in denying Guan's posttrial motion to conform his pleadings to the proof presented at trial.
BACKGROUND
I. The parties' dispute
In 2010, Hu, a concert pianist, became romantically involved with QiWei Chen (Chen), a professor at a university in China. At Chen's request, Guan, a Chinese businessman and friend of Chen's, loaned $2.55 million to Hu so that she could purchase a house in Malibu. The parties documented the transaction in two separate but related documents, both dated February 23, 2011: a one-page "Agreement" signed by Guan, Hu and Chen; and a one-page "Arrangement" signed by Guan and Hu only. Together, the two documents constituted the parties' contract.
The contract provided, among other things that Hu would hold title to the house as its "nominal owner." The contract further provided that Hu would sell the house when and if instructed to do so by Chen. Upon sale of the house, Hu was to remit the proceeds to Guan. Under the terms of the contract, Hu would be entitled to certain benefits when she sold the *798house. Specifically, Hu would "get 20%" if the house was "sold from Jan 1st, 2012" and her percentage of the equity would increase by 20 percent each year the house was not sold, with Hu obtaining 100 percent of the equity "as a gift from Mr. Guan after Jan. 1st, 2016." Escrow closed in early March 2011 and Hu moved into the house shortly thereafter.
The relationship between Chen and Hu proved to be somewhat tempestuous. For example, in November 2011, Chen emailed Hu telling her that "[i]t is very sad now both of us realize the relationship can not work" and advising her that she was "not qualified to own the house." A month later, however, in December 2011, Chen visited Hu at the Malibu house, gave her thousands of dollars in gifts, and said nothing further about selling the house. Eventually, in July 2012, after their romantic relationship had ended, Chen emailed Hu telling her that " '[i]t is over! Don't you realize it with normal sense?! S[ell] the house as instructed by Mr. Guan Li so that you could stil[l] be benefited from the deal.' " Hu, however, in the wake of Chen's July 2012 email did not sell the house or take any steps to sell the house or seek any assistance in selling the house.
II. The parties litigate their dispute
In February 2015, Guan filed suit against Hu, alleging breach of a written contract, as well as fraud and various other related claims.
Guan's initial complaint, however, did not attach the contract. As a result, in April 2015, Guan filed a verified first amended complaint attaching the parties' contract and adding a claim for rescission. The trial court sustained Hu's demurrer to the first amended complaint with leave to amend, noting, inter alia, that "[a]ny amendment must clarify the nature of the [contract] sued upon."
In June 2015, Guan filed a second amended complaint, alleging three principal causes of action: breach of contract, fraud, and rescission. In August 2015, Hu demurred again and again the trial court sustained the demurrer to the breach of contract claim but this time without leave to replead, stating that Guan had failed to "cure the defects previously noted by the Court."
In September 2015, Guan filed a third amended complaint asserting three claims: rescission, cancellation; and a common count for money had and received. The trial court overruled Hu's demurrer to this pleading.
A. THE OPERATIVE COMPLAINT
In January 2016, just two months before the start of trial, Guan filed a fourth amended complaint (FAC) adding to the claims from the previous pleading a claim for fraud in the inducement and promissory estoppel.
During pretrial briefing on motions in limine, Guan advised the trial court that "this case has been narrowed through the pleadings to concern only rescission of the contract and related theories. The case is now about [Hu's] fraudulent conduct, requiring rescission and a full refund ... of all the money [Guan] provided for the purchase of the property ... and not about whether or not the Contract required [Hu] to sell the property...." (Underscore added.) At trial, in a similar vein, Guan's counsel stressed his client's claims were all premised on rescission. For example, during closing argument his counsel repeatedly stated that "all roads in this case lead to Rome, meaning that all roads lead to rescission."
B. THE TRIAL COURT'S DECISION
Over the course of five days in late March to early April 2016, the trial court *799presided over a bench trial. On April 5, 2016, four days after closing arguments, the trial court issued a written tentative decision finding in favor of Guan even though the court could "not find a basis to rescind the contract." Instead, the court found that Hu "deliberately breached the contract."
On April 28, 2016, over Hu's objections, the trial court issued a final statement of decision (the statement of decision) re-affirming its decision in favor of Guan. Consistent with the causes of action alleged in the FAC and consistent with the representations made by Guan's counsel both before and during trial concerning the gravamen of Guan's claims, the statement of decision noted that all of the FAC's "causes of action allege[d] that Hu had no intention when she signed the contract to comply with a written instruction to sell the house, and, therefore, the contract is subject to rescission or some other remedy to restore the parties to their pre-contract position." The trial court then went on to find that Guan had failed to prove any of his rescission-related causes of action: "Plaintiff argued but did not prove that Hu, at the moment when she signed the contract, did not intend to perform her contract obligation to sell the house when and if Chen gave her written instruction that she do so. There is evidence, but not sufficient evidence, ... to support rescission of the contract"
However, the trial court nonetheless found for Guan because the evidence showed that Hu "repudiated her contract responsibilities in failing, after receiving Chen's instruction in his July 21, 2012 email to her, to sell the house and remit the proceeds, net of her share, to Guan." The trial court justified its decision to find for Guan despite his failure of proof by citing to section 1692 : "the court may exercise equitable jurisdiction to 'adjust the equities among the parties' even if it does not find a basis to rescind the contract. Civil Code 1692.... In exercising equitable jurisdiction, Civil Code 1692 authorizes the court to "grant any party to the action any other relief to which he may be entitled under the circumstances." In its statement of decision, however, the trial court did not address its earlier decision dismissing Guan's breach of contract claim without leave to replead.
On April 18, 2016-nearly two weeks after the trial court issued its tentative statement of decision, Guan filed a motion to conform the FAC to the proof presented at trial by adding a breach of contract cause of action (the motion).
On May 11, 2016, the trial court denied the motion, explaining that Guan had "unreasonably delayed" in seeking to amend the FAC and noting that Guan filed the motion "after completion of trial, after the matter was submitted, and, indeed, after the court had issued its Statement of Tentative Decision."
Hu timely appealed from the judgment and Guan timely cross-appealed from the denial of the motion.
DISCUSSION
I. The judgment must be reversed because the trial court misapplied section 1692
On appeal, Hu argues that section 1692"does not grant trial courts authority to grant relief to plaintiffs who do not prove the claims they advanced at trial. It merely permits trial courts to adjust the equities if a plaintiff proves that it is entitled to rescission or, if a plaintiff fails to prove rescission, to award relief should the plaintiff establish a right to relief on other claims in the operative complaint." We agree.
*800A. THE STANDARD OF REVIEW
We review the trial court's interpretation of section 1692 de novo. (People ex rel. Lockyer v. Shamrock Foods Co . (2000) 24 Cal.4th 415, 432, 101 Cal.Rptr.2d 200, 11 P.3d 956 ; Reid v. Google, Inc . (2010) 50 Cal.4th 512, 527, 113 Cal.Rptr.3d 327, 235 P.3d 988 ; Cuiellette v. City of Los Angeles (2011) 194 Cal.App.4th 757, 765, 123 Cal.Rptr.3d 562.)
B. THE LAW GOVERNING STATUTORY INTERPRETATION
"We begin with the fundamental rule that our primary task is to determine the lawmakers' intent." (Delaney v. Superior Court (1990) 50 Cal.3d 785, 798, 268 Cal.Rptr. 753, 789 P.2d 934.) "In construing statutes, we aim 'to ascertain the intent of the enacting legislative body so that we may adopt the construction that best effectuates the purpose of the law.' " (Klein v. United States of America (2010) 50 Cal.4th 68, 77, 112 Cal.Rptr.3d 722, 235 P.3d 42.) California courts "have established a process of statutory interpretation to determine legislative intent that may involve up to three steps." (Alejo v. Torlakson (2013) 212 Cal.App.4th 768, 786-787, 151 Cal.Rptr.3d 420 (Alejo ).) The "key to statutory interpretation is applying the rules of statutory construction in their proper sequence ... as follows: 'we first look to the plain meaning of the statutory language, then to its legislative history and finally to the reasonableness of a proposed construction.' " (MacIsaac v. Waste Management Collection & Recycling, Inc . (2005) 134 Cal.App.4th 1076, 1082, 36 Cal.Rptr.3d 650 (MacIsaac ).)
"The first step in the interpretive process looks to the words of the statute themselves." (Alejo , supra , 212 Cal.App.4th at p. 787, 151 Cal.Rptr.3d 420 ; see Klein v. United States of America , supra , 50 Cal.4th at p. 77, 112 Cal.Rptr.3d 722, 235 P.3d 42 [" 'statutory language is generally the most reliable indicator of legislative intent' "].)
"If the interpretive question is not resolved in the first step, we proceed to the second step of the inquiry. [Citation.] In this step, courts may 'turn to secondary rules of interpretation, such as maxims of construction, "which serve as aids in the sense that they express familiar insights about conventional language usage." ' [Citation.] We may also look to the legislative history. [Citation.] 'Both the legislative history of the statute and the wider historical circumstances of its enactment may be considered in ascertaining the legislative intent.' [Citation.] [¶] 'If ambiguity remains after resort to secondary rules of construction and to the statute's legislative history, then we must cautiously take the third and final step in the interpretive process. [Citation.] In this phase of the process, we apply "reason, practicality, and common sense to the language at hand." [Citation.] Where an uncertainty exists, we must consider the consequences that will flow from a particular interpretation. [Citation.] Thus, "[i]n determining what the Legislature intended we are bound to consider not only the words used, but also other matters, 'such as context, the object in view, the evils to be remedied, the history of the times and of legislation upon the same subject, public policy and contemporaneous construction.' [Citation.]" [Citation.] These "other matters" can serve as important guides, because our search for the statute's meaning is not merely an abstract exercise in semantics. To the contrary, courts seek to ascertain the intent of the Legislature for a reason-"to effectuate the purpose of the law." ' " (Alejo , supra , 212 Cal.App.4th at pp. 787-788, 151 Cal.Rptr.3d 420 ; MacIsaac , supra , 134 Cal.App.4th at p. 1084, 36 Cal.Rptr.3d 650.)
We do not necessarily engage in all three steps of the analysis. "It is only *801when the meaning of the words is not clear that courts are required to take a second step and refer to the legislative history." (Soil v. Superior Court (1997) 55 Cal.App.4th 872, 875, 64 Cal.Rptr.2d 319.) "If ambiguity remains after resort to secondary rules of construction and to the statute's legislative history, then we must cautiously take the third and final step in the interpretative process." (MacIsaac , supra , 134 Cal.App.4th at p. 1084, 36 Cal.Rptr.3d 650.)
C. SECTION 1692
Section 1692 provides as follows: "When a contract has been rescinded in whole or in part, any party to the contract may seek relief based upon such rescission by (a) bringing an action to recover any money or thing owing to him by any other party to the contract as a consequence of such rescission or for any other relief to which he may be entitled under the circumstances or (b) asserting such rescission by way of defense or cross-complaint. [¶] If in an action or proceeding a party seeks relief based upon rescissionand the court determines that the contract has not been rescinded, the court may grant any party to the action any other relief to which he may be entitled under the circumstances . [¶] A claim for damages is not inconsistent with a claim for relief based upon rescission. The aggrieved party shall be awarded complete relief, including restitution of benefits, if any, conferred by him as a result of the transaction and any consequential damages to which he is entitled; but such relief shall not include duplicate or inconsistent items of recovery. [¶] If in an action or proceeding a party seeks relief based upon rescission, the court may require the party to whom such relief is granted to make any compensation to the other which justice may require and may otherwise in its judgment adjust the equities between the parties ." (Italics added.)
D. SECTION 1692'S LEGISLATIVE HISTORY
Section 1692 was added by the Legislature in 1961. Prior to 1961, California law recognized two methods by which a party entitled to rescind could obtain rescissionary relief-the first an " 'action to enforce a rescission' " and the second an " 'action to obtain a rescission.' " (California Law Revision Commission's Recommendations and Study relating to Rescission of Contracts (1960) in 3 Cal.Law Revision Com.Rep. (Sept. 1961) D-5, D-15 (Law Revision Report); see Philpott v. Superior Court (1934) 1 Cal.2d 512, 524, 36 P.2d 635 [discussing pre-1961 law] ; Runyan v. Pacific Air Industries, Inc . (1970) 2 Cal.3d 304, 311-312, 85 Cal.Rptr. 138, 466 P.2d 682 (Runyan ) [same].) The first was an action at law, while the second was an "action in 'equity.' " (Law Revision Report, supra , p. D-5.) Neither method was expressly recognized in the Civil Code. (Id . at pp. D-15-D-16.)
"Significant substantive and procedural differences existed between these two methods for obtaining rescissionary relief. The right to a jury trial, the applicable statute of limitations, the availability of the provisional remedy of attachment and the possibility of joinder of other claims all depended upon which of these two methods the plaintiff elected to use in seeking rescissionary relief." (Runyan , supra , 2 Cal.3d at p. 312, 85 Cal.Rptr. 138, 466 P.2d 682.)
The result was a body of law which was "unnecessarily complex and confusing to both courts and attorneys, to say nothing of laymen." (Law Revision Report, supra , at p. D-6.) Accordingly, the Law Revision Report recommended a number of changes to the Code of Civil Procedure and the Civil Code, including the adoption of section 1692. (See Law Revision Report, supra , at pp. D-9-D-11.) The purpose of these proposed changes was to eliminate *802the confusing and complex duality of rescission procedures by "providing a single, simple procedure to be followed in all situations where rescissionary relief is sought." (Id . at p. D-6.) As our Supreme Court has observed, "[i]t is manifest that section 1692... was intended by the Legislature to effectuate the recommendations of the Law Revision Commission ... since the section is identical in language with the measure suggested by the Commission." (Runyan , supra , 2 Cal.3d at p. 313, 85 Cal.Rptr. 138, 466 P.2d 682.) In sum, the 1961 legislation "abolished the action to obtain court rescission and left only an action to obtain relief based upon a party effected rescission." (Paularena v. Superior Court (1965) 231 Cal.App.2d 906, 913, 42 Cal.Rptr. 366.)
The Law Revision Report, however, did not address or offer any general recommendations regarding the role of pleadings at trial or the power of a trial court to ignore either the pleadings or the evolution of the parties' pleadings in fashioning an equitable award. (Law Revision Report, supra , passim.)
E. THE TRIAL COURT'S INTERPRETATION OF SECTION 1692 IS UNTENABLE
According to the trial court, pursuant to section 1692, it "may exercise equitable jurisdiction to 'adjust the equities among the parties' even if [it] does not find a basis to rescind the contract." The trial court's interpretation of section 1692 is untenable for two reasons.
First, it is based on a patent misreading of section 1692. The "adjust the equities" language relied upon by the trial court comes from the section's fourth paragraph, which states as follows: "If in an action or proceeding a party seeks relief based upon rescission, the court may require the party to whom such relief is granted to make any compensation to the other which justice may require and may otherwise in its judgment adjust the equities between the parties." (Italics added.) That paragraph plainly provides that a court may "adjust the equities" only when the litigant seeking rescission prevails on that claim-that is, when "such relief is granted." Here, no rescissionary relief was granted to Guan. The trial court expressly found that while there was some evidence to support Guan's claim for rescission, it was "not sufficient evidence, in the court's view, to support rescission of the contract on statutory grounds." In other words, the factual finding as to Guan's claim for rescission made it legally impossible for the trial court to adjust the equities between Guan and Hu.
Second, to the extent that the trial court's decision was based on section 1692's second paragraph, it rests on a flawed interpretation of that provision's language. Section 1692's second paragraph provides as follows: "If in an action or proceeding a party seeks relief based upon rescission and the court determines that the contract has not been rescinded, the court may grant any party to the action any other relief to which he may be entitled under the circumstances." (Italics added.) The statement of decision indicated that trial court believed that Guan, although he failed to prevail on any of his claims, was nonetheless entitled to relief because Hu breached the Agreement. Such an interpretation of the term "entitled," however, is inconsistent with (1) that term's plain meaning, (2) section 1692's legislative history, and (3) established judicial policy.
1. The plain meaning of entitled is inconsistent with the trial court's interpretation
The plain meaning of entitled-both in general usage and as that term is generally understood in a legal sense-links a conferred benefit with a right to receive that benefit. For example, Webster's *803Third New International Dictionary defines "entitle" as "to give a right or legal title to quantify (one) for something ...: [to] furnish with proper grounds for seeking or claiming something." (Webster's 3d New Internat. Dict. (2002) p. 758, col. 1.) Similarly, Black's Law Dictionary defines "entitle" as "to ... qualify for" and an "entitlement" as "[a]n absolute right to a ... benefit ... granted immediately upon meeting a legal requirement." (Black's Law Dict. (10th ed. 2014) p. 649, col. 2.) A respected scholar on legal writing and usage has described the phrase "is entitled to" as "[w]ords of [a]uthority," which mean " 'has a right to.' " (Garner, Dict. Of Modern Legal Usage (2d ed. 1997), p. 319, col. 1 and p. 942, col. 1.) Here, Guan was not "entitled" to any relief under the circumstances, because he failed to prevail on any of the claims alleged in his FAC-that is, he failed to establish a right to relief.
Although California is a "code pleading" state, pleadings and the claims asserted therein are not empty formalities. (See generally, 4 Witkin Cal. Procedure (5th ed. 2008) Pleadings §§ 1, 33, 419, pp. 65, 97, 556-557.) In fact, pleadings, especially complaints, perform an essential role-they determine what a party must prove at trial in order to be entitled to relief. As our Supreme Court has observed, "The complaint in a civil action serves a variety of purposes [citation], of which two are relevant here: it serves to frame and limit the issues [citation] and to apprise the defendant of the basis upon which the plaintiff is seeking recovery." (Committee On Children's Television, Inc. v. General FoodsCorp . (1983) 35 Cal.3d 197, 211-212, 197 Cal.Rptr. 783, 673 P.2d 660, superseded on other grounds as stated in Californians for Disability Rights v. Mervyn's, LLC (2006) 39 Cal.4th 223, 227-228, 46 Cal.Rptr.3d 57, 138 P.3d 207 ; Simmons v. Ware (2013) 213 Cal.App.4th 1035, 1048, 153 Cal.Rptr.3d 178 [" 'The pleadings are supposed to define the issues to be tried' "].)
Consequently, as explained by our Supreme Court, "[a] party is entitled to 'any and all relief which may be appropriate under the scope of his pleadings and within the facts alleged and proved .' " (Estrin v. Superior Court (1939) 14 Cal.2d 670, 678, 96 P.2d 340, italics added.) Indeed, as one trusted treatise on California law has stated, "it is error to give a remedy or relief entirely outside the issues raised by the pleadings." (2 Witkin, Cal. Procedure (5th ed. 2008) Jurisdiction, § 291, p. 901.) In other words, " '[a] judgment must be confined to matters which have been placed in issue by the parties' " (Tokio Marine & Fire Ins. Corp. v. Western Pacific Roofing Corp . (1999) 75 Cal.App.4th 110, 123, 89 Cal.Rptr.2d 1.)
Here, if Guan had alleged both breach of contract and rescission in the FAC, then the trial court's interpretation of section 1692 would have been consistent with its plain meaning. However, there were no claims for breach of contract in the FAC. Moreover, there was no suggestion by Guan at trial that he was pursuing a breach of contract theory of liability in addition to his rescission-based claims; in fact his counsel stressed just the opposite, that all of Guan's claims and supporting evidence, "all roads," led to rescission. Under the plain meaning of section 1692, when Guan failed to prove up any of the claims in the FAC, he lost any entitlement to relief.2
*8042. The legislative history does not support the trial court's interpretation of its powers under section 1692
There is nothing in the Law Revision Report indicating that section 1692 and the other related proposed amendments were designed to alter the general role that pleadings play at trial and/or the role that courts play in setting the parties' pleadings. Rather, the legislative history of section 1692 shows that the Legislature enacted the statute for a far more limited purpose, namely to simplify and streamline procedures for asserting a claim for rescission. (Law Revision Report, supra , at p. D-6.)
In addition, there is nothing in the Law Revision Report stating or even suggesting that section 1692 allows a trial court to award damages to a plaintiff based on a claim that was previously dismissed without leave to replead. In fact, courts have held the exact opposite. A trial court's authority under section 1692"to adjust the equities is one that must be exercised in accordance with established principles of law and equity." (Sharabianlou v. Karp (2010) 181 Cal.App.4th 1133, 1147, 105 Cal.Rptr.3d 300, italics added.) Put a little differently, although a trial court's equitable powers are broad (see Abers v. Rohrs (2013) 217 Cal.App.4th 1199, 1208, 159 Cal.Rptr.3d 414 ), they are not unlimited. " '[A] court of equity will never lend its aid to accomplish by indirect means what the law or its clearly defined policy forbids to be done directly.' " (Tuthill v. City of San Buenaventura (2014) 223 Cal.App.4th 1081, 1088, 167 Cal.Rptr.3d 820, italics added.)
Guan argues that the legislative history of section 1692 does support the trial court's award because of the following language in the Law Revision Report: "The statute should ... make plain that the court may grant any other relief that is appropriate under the circumstances if it develops at the trial that the plaintiff has mistaken his remedy and the purported rescission was not effective." (Law Revision Report, supra , at p. D-7.) This passage is unavailing to Guan's cause.
The trial did not reveal that Guan had mistaken his desired remedy by inadvertently asserting a rescission claim when he meant to allege a breach of contract claim. Rather, the case's procedural history shows that Guan knew he had a breach of contract claim against Hu. That history shows further that Guan repeatedly tried to allege a breach of contract claim. Moreover, the history of the case reveals that the absence of a breach of contract claim from the FAC was not a voluntary one; rather, it was forced upon Guan by his own failings. The trial court finally dismissed Guan's breach of contract claim without leave to replead after he failed repeatedly to cure the defects identified by the trial court.
Compounding matters, Guan did not challenge the trial court's dismissal of his breach of contract claim in any way. There was no motion for reconsideration. Nor did Guan seek immediate review by extraordinary writ-"[a]lthough [appellate courts] rarely grant extraordinary relief at the pleading stage of a lawsuit, mandamus will lie when it appears that the trial court has deprived a party of an opportunity to plead his cause of action ..., and when extraordinary relief may prevent a needless and expensive trial and reversal." (Taylor v. Superior Court (1979) 24 Cal.3d 890, 894, 157 Cal.Rptr. 693, 598 P.2d 854.) If Guan felt committed to his breach of contract claim, he could have dismissed the remaining *805causes of action immediately following the court's order on Hu's demurer to the second amended complaint, and then appealed from the subsequent judgment with regard to the breach of contract claim. (See Code Civ. Proc, § 472c.) Instead, Guan elected to abandon his breach of contract claim entirely and proceed to trial on his rescission-based claims alone. Under such circumstances, holding Guan to the consequences of his deliberate, "all roads lead to rescission" strategy does not create an injustice.
In short, there is nothing in the legislative history showing that the trial court was empowered by section 1692 to effectively restore posttrial-sua sponte and without any advance notice to the defendant-a breach of contract claim that had previously been dismissed from the action without leave to replead.
3. The trial court's interpretation of section 1692 is inconsistent with established judicial policy.
The trial court's decision to revive Guan's breach of contract claim and base the judgment in favor of Guan on that claim alone conflicts with a number of touchstone legal policies.
First, " ' "[i]t is well established that an amendatory pleading supersedes the original one, which ceases to perform any function as a pleading." ' [Citations.] Thus, an amended complaint supersedes all prior complaints. [Citations.] The amended complaint furnishes the sole basis for the cause of action, and the original complaint ceases to have any effect either as a pleading or as a basis for judgment. [Citation.] [¶] ... Thus, once an amended complaint is filed, it is error to grant [judgment ] on a cause of action contained in a previous complaint ." (State Comp. Ins. Fund v. Superior Court (2010) 184 Cal.App.4th 1124, 1130-1131, 109 Cal.Rptr.3d 88, italics added.) The trial court's interpretation of section 1692 would stand this deep-rooted policy on its head.
Second, the trial court's interpretation of section 1692 would render the sustaining of demurrers without leave to amend meaningless-that is, it would allow claims dismissed without leave to replead to be reasserted into the action. California courts have long held that "orders sustaining demurrers without leave to amend" effectively "constitute a trial on the merits" and, as such, "must be considered as judgments after trial." (Smith v. City of Los Angeles (1948) 84 Cal.App.2d 297, 302, 190 P.2d 943.)3 This is so, because it is " 'well settled that a trial need not involve the determination of a fact, but may consist solely or partially in the determination of an issue of law.' " (Ibid . ) Consequently, sustaining a demurrer without leave to amend effectively dismisses that claim with prejudice and California courts have held that "with prejudice," as that term is used in the context of dismissals, "clearly means the plaintiff's right of action is terminated and may not be revived ." (Roybal v. University Ford (1989) 207 Cal.App.3d 1080, 1086-1087, 255 Cal.Rptr. 469, italics added.)
Third, to use section 1692 to award contract and benefit of the bargain damages would run counter to California jurisprudence. It is well-established that there are fundamental differences between the cause of action at issue here (rescission) and the cause of action used by the trial court to justify its award (breach of contract). "When one party has been injured by a breach of contract and she either lacks the ability or the desire to *806keep the contract alive, she can choose between two different remedies. [Citation.] She can treat the contract as rescinded and recover damages resulting from the rescission. Or she can treat the contract as repudiated by the other party and recover damages to which she would have been entitled had the other party not breached the contract or prevented her performance. [Citation.] An action for rescission is based on the disaffirmance of the contract and an action for damages for breach of contract is based on its affirmance . [Citations.] An action for rescission and an action for breach of contract are alternative remedies. The election of one bars recovery under the other ." (Akin v. Certain Underwriters at Lloyd's London (2006) 140 Cal.App.4th 291, 296, 44 Cal.Rptr.3d 284 (Akin ), italics added.) Section 1692, in other words, precludes the prevailing party from receiving "inconsistent items of recovery." (§ 1692 ; Akin , at p. 297, 44 Cal.Rptr.3d 284.)
Due to the significant differences between a claim for breach of contract and a claim for rescission, courts have held that a "plaintiff cannot recover damages under section 1692 for a claim based upon the affirmance of the contract." (Akin , supra , 140 Cal.App.4th at p. 297, 44 Cal.Rptr.3d 284, italics added.) Yet that is exactly the kind of damages that the trial court awarded here pursuant to section 1692. Instead of returning the parties to the status quo ante, as required by a rescission claim, the trial court structured the damages award so that it gave the parties the benefits and "implications" of their bargain. Most notably, the trial court awarded Hu, pursuant to the parties' contract, 20 percent of the proceeds from the sale of the house. In other words, the trial court used section 1692-a statute premised on claims disaffirming a contract-to impermissibly award damages based on an affirmance of the parties' contract.4
In sum, having reviewed the entire record, we believe that the trial court, after hearing the evidence, was acting in good faith and trying to achieve substantial justice between the parties. However, in trying to achieve that noble aim, the trial court went too far and ignored too easily the plain language and clear history of section 1692, established judicial policy, and the consequences of its own prior actions.5
As our Supreme Court recognized long ago, even where a court has jurisdiction over a matter, " 'it is still limited in its modes of procedure, and in the extent and character of its judgments. It must act judicially in all things, and cannot then transcend the power conferred by the law.' " (Baar v. Smith (1927) 201 Cal. 87, 100, 255 P. 827.) If a court " 'transcend[s] the limits of its authority,' " the resulting judgment would be " 'absolutely void.' " (Ibid . ) Here, the trial court exceeded the limits of its authority under section 1692. Accordingly, the judgment here must be reversed.
*807II. The trial court properly denied Guan's motion to conform
In his cross-appeal, Guan contends that the trial court erred by denying the motion, because "there was no delay in bringing it as the breach of contract claim was alleged multiple times before" and because the motion "only relates to adding a legal theory, i.e., breach of contract, rather than adding facts," and, as a result, there was no prejudice to Hu. (Italics omitted.) We disagree.
Guan's argument is completely beside the point-his breach of contract claim was not only raised multiple times prior to trial, but it was dismissed without leave to replead (i.e., dismissed with prejudice) six months before trial. Put differently, Guan's argument would only have merit if his breach of contract claim had not been dismissed without leave to replead.
A. GUIDING PRINCIPLES AND STANDARD OF REVIEW
The Code of Civil Procedure gives trial courts discretion to allow a party to amend his or her pleadings "in furtherance of justice" (Code Civ. Proc., § 473 ) and provides that such leave to amend may be granted even after the commencement of trial. (Code Civ. Proc., § 576.) Code of Civil Procedure section 469 specifically governs motions to amend at trial to conform to proof, and provides in relevant part as follows: "No variance between the allegation in a pleading and the proof is to be deemed material, unless it has actually misled the adverse party to his prejudice in maintaining his action or defense upon the merits."
"As summarized by our Supreme Court ...: '[T]he allowance of amendments to conform to the proof rests largely in the discretion of the trial court and its determination will not be disturbed on appeal unless it clearly appears that such discretion has been abused. [Citations.] Such amendments have been allowed with great liberality "and no abuse of discretion is shown unless by permitting the amendment new and substantially different issues are introduced in the case or the rights of the adverse party prejudiced [citation]." (Italics added.)' " (Garcia v. Roberts (2009) 173 Cal.App.4th 900, 909, 93 Cal.Rptr.3d 286.)
" 'Generally, "the trial court has wide discretion in determining whether to allow the amendment, but the appropriate exercise of that discretion requires the trial court to consider a number of factors: 'including the conduct of the moving party and the belated presentation of the amendment' " ' " (Duchrow v. Forrest (2013) 215 Cal.App.4th 1359, 1377, 156 Cal.Rptr.3d 194.) " ' " ' "[E]ven if a good amendment is proposed in proper form, unwarranted delay in presenting it may-of itself-be a valid reason for denial." ' " ' " (Ibid . ) " 'Thus, [if the trial court denies a motion to amend during trial,] appellate courts are less likely to find an abuse of discretion where, for example, the proposed amendment is " 'offered after long unexplained delay ... or where there is a lack of diligence....' " ' " (Ibid . ) In addition, courts are generally disinclined to allow an amendment when the plaintiffs has " 'blow[n] hot and cold' " with respect to his or her claims-that is, repeatedly raising and withdrawing claims. (Brautigam v. Brooks (1964) 227 Cal.App.2d 547, 561, 38 Cal.Rptr. 784.)
Under the abuse of discretion standard of review, "there is no abuse of discretion requiring reversal if there exists a reasonable or fairly debatable justification under the law for the trial court's decision or, alternatively stated, if that decision falls within the permissible range of options set by the applicable legal criteria." ( *808Cahill v. San Diego Gas & Electric Co . (2011) 194 Cal.App.4th 939, 957, 124 Cal.Rptr.3d 78.) Additionally, " '[a] judgment or order of a lower court is presumed to be correct on appeal, and all intendments and presumptions are indulged in favor of its correctness.' " (In re Marriage of LaMoure (2011) 198 Cal.App.4th 807, 132 Cal.Rptr.3d 1.) The appealing party has the burden to affirmatively show error. (Phillips, Spallas & Angstadt, LLP v. Fotouhi (2011) 197 Cal.App.4th 1132, 1138, 128 Cal.Rptr.3d 320.)
B. THE TRIAL COURT DID NOT ABUSE ITS DISCRETION IN DENYING THE MOTION
As discussed above, when the trial court sustained Hu's demurrer to Guan' breach of contact claim without leave to amend, that claim was dismissed with prejudice from the case and could not be revived. (Smith v. City of LosAngeles , supra , 84 Cal.App.2d at p. 302, 190 P.2d 943 ; Roybal v. University Ford , supra , 207 Cal.App.3d at pp. 1086-1087, 255 Cal.Rptr. 469.) Because the trial court's order denying leave to replead was akin to a judgment after trial on Guan's breach contract claim, there would be few things more prejudicial to Hu than to have that judgment replaced posttrial with a new judgment against her based on a revival of that very claim. Accordingly, the trial court did not abuse its discretion in denying the motion.
DISPOSITION
The order denying Li Guan's motion to conform is affirmed. The judgment is reversed and the trial court is directed to enter judgment in favor of Yongmei Hu. The parties are to bear their own costs on appeal.
We concur:
ROTHSCHILD, P.J.
LUI, J.
All further statutory references are to the Civil Code unless otherwise indicated.
Although the pleadings of both parties must be considered in determining the issues raised at trial (Estrin v. Superior Court, supra, 14 Cal.2d at p. 676, 96 P.2d 340 ), Hu's answer to the FAC, which generally denied the allegations of the FAC, did not, on balance, affirm the parties' contract to such a degree that it overwhelmed the rescissionary gravamen of the FAC. While Hu asserted some affirmative defenses that arguably affirmed the parties' agreement (e.g., "breach" and "anticipatory repudiation"), she also asserted other defenses that expressly disavowed the parties' contract (e.g., "[n]o contractual relationship" and "[v]oid [a]greement or [a]greements").
Of course, sustaining a demurrer with leave to amend does not constitute a trial because it is not " 'a final determination of the rights of the parties.' " (Mass v. Superior Court (1961) 197 Cal.App.2d 430, 435, 17 Cal.Rptr. 549.)
Although section 1692 allows the recovery of certain types of damages, its reference to " 'complete relief' " does not entitle the plaintiff to traditional " 'benefit of [the] bargain' " and breach of contract damages. (Akin, supra, 140 Cal.App.4th at p. 298, 44 Cal.Rptr.3d 284 ; Sharabian l ou v. Karp, supra, 181 Cal.App.4th at pp. 1144-1145, 1146, 105 Cal.Rptr.3d 300 [not available in a § 1692 action].)
Under California law, if a trial court comes to believe that one of its prior interim orders was erroneous, it may, sua sponte, reconsider its decision, provided it "inform[s] the parties of this concern, solicit [s] briefing, and hold[s] a hearing." (Le Francois v. Goel (2005) 35 Cal.4th 1094, 1108-1109, 29 Cal.Rptr.3d 249, 112 P.3d 636.) Here, the trial court did none of those things.