#### B AND B LAND ACQUISITION, INC., Plaintiff-Appellant, v. DORIS R. MANDELL, Indiv. and as Successor Trustee of the Jack Mandell 1987 Trust, Defendant-Appellee.

Second District

No. 2—98—1138

Opinion filed June 23, 1999.

Rehearing denied August 13, 1999.

*1069James M. Hess, of Rockford, for appellant.

Steven P. Mandell, of Davidson, Mandell & Menkes, of Chicago, for appellee.

JUSTICE COLWELL

delivered the opinion of the court:

Plaintiff, B&B Land Acquisition, Inc., appeals the trial court’s dismissal of its amended complaint against defendant, Doris R. Mandell. Plaintiff argues that the Frauds Act (740 ILCS 80/0.01 et seq. (West 1996)) does not render its legal claims unenforceable and that, in the alternative, plaintiff asserted a valid claim under the equitable theory of unjust enrichment. We affirm in part, reverse in part, and remand the cause for further proceedings.

Plaintiff’s amended complaint alleged as follows. On or about December 29, 1993, plaintiff entered into a written contract to purchase real property from Jack Mandell in his capacity as trustee of the Jack Mandell 1987 Trust (the trust). The contract was signed by both parties and included a purchase price of $43,756. Although the contract stated that closing would occur no later than December 30, 1994, the parties subsequently agreed to change that date to July 31, 1996. Plaintiff paid to the trust a sum of $2,000 in exchange for that extension.

Count I of the amended complaint alleged that, on or about April 2, 1996, the parties agreed to modify their contract upon a proposal that was made by a representative of the trust. According to the modified contract, the trust agreed to sell the subject property to a different buyer and give to plaintiff half of the proceeds of the sale. This modification would be effective only if the sale price was at least $150,000. Upon the trust’s request, plaintiff (1) provided information about the value of comparable real estate; (2) tendered a survey, aerial photograph, and description of the subject property; and (3) paid taxes *1070on the property in the amount of $1,000 for the year 1995. These actions constituted full performance of plaintiffs obligations under the modified contract. During the fall of 1996, the trust sold the property for approximately $195,000. Defendant, Jack Mandell’s widow and successor trustee of the trust, did not give to plaintiff half of the proceeds of the sale, thereby breaching the modified contract.

Count II set out the same basic allegations but stated that the parties entered into a joint venture to sell the subject property. Plaintiff alleged that, after it relinquished its rights under the original contract and fully performed its obligations under the joint venture agreement, defendant breached the latter by failing to tender half of the proceeds of the sale.

Count III contained an equitable claim. There plaintiff alleged that it justifiably relied upon the parties’ joint venture agreement by forfeiting its right to purchase the subject property under the parties’ original contract. By retaining the entire proceeds of the sale of the property, defendant was unjustly enriched to plaintiff’s detriment. Plaintiff sought the recovery of half of the proceeds on that basis. Finally, in count IV, plaintiff claimed an entitlement to interest on the amount due that had accrued since the date of the sale.

Plaintiff attached two letters to its amended complaint. These letters purportedly evinced the modified contract or joint venture agreement between the parties. Each letter was dated April 2, 1996, and was written and signed by a representative of plaintiff. Collectively, the letters set out the terms of the agreement described in the complaint. Neither letter was signed by a representative of the trust.

Defendant moved to dismiss the amended complaint pursuant to section 2—615 of the Code of Civil Procedure (Code) (735 ILCS 5/2—615 (West 1996)). Defendant argued that the claims asserted in counts I and II of the complaint were unenforceable under the Frauds Act, while the claim in count III was barred by the presence of an express contract between the parties. The trial court dismissed counts I, II, and III upon those respective grounds. The court dismissed count IV upon its dismissal of the substantive counts. Each count was dismissed with prejudice. Plaintiff now appeals to this court, arguing that neither the Frauds Act nor any other applicable law should have resulted in the dismissal of its amended complaint.

We first note that defendant’s motion to dismiss was improperly based upon section 2—615 of the Code. A motion to dismiss pursuant to section 2—615 attacks the legal sufficiency of the face of a complaint. Lawson v. City of Chicago, 278 Ill. App. 3d 628, 634 (1996). Defendant’s motion did not do so; instead, it raised defenses that purportedly negated plaintiffs cause of action. Therefore, the motion *1071should have been brought under section 2—619 of the Code. 735 ILCS 5/2—619 (West 1996); Lawson, 278 Ill. App. 3d at 634.

However, we are permitted to address the merits of defendant’s motion as if it had been brought under the proper section, as long as plaintiff was not prejudiced by the error. Cosman v. Ford Motor Co., 285 Ill. App. 3d 250, 254 (1996). Because plaintiff argued the merits of defendant’s motion in the trial court and now does so on appeal, we find no prejudice. We will therefore address the validity of the motion under section 2—619.

A motion to dismiss pursuant to section 2—619 should be granted only when there are no material facts in dispute and the moving party is entitled to dismissal as a matter of law. Rochon v. Rodriguez, 293 Ill. App. 3d 952, 958 (1997). A dismissal may be affirmed only if there exists no set of facts that could entitle the plaintiff to recover when all well-pleaded allegations in the complaint are taken as true. American National Bank & Trust Co. v. Thomas, 288 Ill. App. 3d 343, 346 (1997). When we evaluate a trial court’s ruling on a motion based on section 2—619, our standard of review is de novo. Epstein v. Chicago Board of Education, 178 Ill. 2d 370, 383 (1997).

In count I of its amended complaint, plaintiff seeks to enforce an agreement that allegedly modified the terms of a written contract for the sale of real property. Defendant argues that plaintiffs claim is unenforceable under the Frauds Act. Section 2 of the Frauds Act states:

> “No action shall be brought to charge any person upon any contract for the sale of lands, *** unless such contract or some memorandum or note thereof shall be in writing, and signed by the party to be charged therewith, or some other person thereunto by him lawfully authorized in writing, signed by such party.” 740 ILCS 80/2 (West 1996).

By its explicit terms, section 2 governs the parties’ original contract for the sale of land. Also, because the Frauds Act applies to any modification of a contract that falls within its coverage, section 2 applies to the modification alleged here. See Melrose Park National Bank v. Carr, 249 Ill. App. 3d 9, 15 (1993).

It is indisputable that an agreement to modify the original contract was not set out in any writing signed by defendant or any representative of the trust. The letters that plaintiff submitted are evidently the only writings that document the modification, and they were signed by plaintiffs representative alone. As a result, plaintiff would ordinarily be unable to enforce the modified contract against defendant. Sims v. Broughton, 225 Ill. App. 3d 1076, 1080 (1992).

However, we hold that the Frauds Act may not be applied to *1072dismiss count I of plaintiffs amended complaint for two reasons. First, plaintiff alleged that it fully performed its obligations under the modified contract by producing information about the value of comparable real estate, providing descriptive materials relating to the subject property, and paying the property taxes for 1995. When that allegation is taken as true, the Frauds Act does not bar recovery.

It is well established that the Frauds Act does not apply to a contract that has been performed completely by one party. Estate of Jesmer v. Rohlev, 241 Ill. App. 3d 798, 806 (1993). The trial court correctly stated that a party’s partial performance of a contract does not remove it from the scope of the Frauds Act in an action at law for money damages. Cain v. Cross, 293 Ill. App. 3d 255, 259 (1997). However, if in fact plaintiff fully performed, the Frauds Act would not apply to the modified contract. As a result, count I of plaintiff’s amended complaint contains allegations that could enable plaintiff to recover, and dismissal was improper.

Furthermore, we determine that, if plaintiffs allegations are true, defendant is estopped to raise the Frauds Act as a defense to plaintiffs action. Estoppel applies when one party detrimentally relies upon an oral modification of a written contract. Although the doctrine requires only a showing of detrimental reliance, estoppel is particularly appropriate when the modification was induced by the party who seeks to assert the Frauds Act. Estate of Barth v. Schlangen, 249 Ill. App. 3d 70, 76 (1993); Werner v. Timm, 4 Ill. App. 3d 573, 575 (1972).

Here, plaintiff clearly alleged that it detrimentally relied upon the modification of the contract. Plaintiff claimed that it essentially waived its right to purchase the subject property at a price that was less than one-fourth of the amount for which the land was ultimately sold. Plaintiff also performed various services, including the payment of $1,000 in property taxes, in compliance with the modified contract. Finally, plaintiff alleged that the modification was originally requested by a representative of the trust. If plaintiff is able to prove the truth of these allegations, it would be fundamentally unfair to allow defendant to assert the Frauds Act to prevent plaintiffs recovery. Therefore, we reverse the trial court’s dismissal of count I of plaintiffs amended complaint.

The same reasoning applies to count II. The two claims are virtually identical, except that in count II plaintiff alleged that the parties modified their contract through a joint venture agreement. Whether a joint venture exists is a question of the intent of the parties (Fitchie v. Yurko, 212 Ill. App. 3d 216, 227 (1991)), and plaintiff adequately asserted that the parties intended to create one. However, defendant argues that the alleged joint venture agreement is unenforceable under the Frauds Act.

*1073Indeed, the Frauds Act would ordinarily apply. Section 2 does not govern a joint venture agreement if the partnership engages in the purchase or sale of real property that is owned by the partnership. However, the statute is applicable to the joint venture agreement if the partners agree to share the proceeds of a sale of land that is owned by one partner alone. Goldstein v. Nathan, 158 Ill. 641, 646-47 (1895).

Although the latter case is present here, the Frauds Act may not effect the dismissal of count II for the reasons set out in our analysis of count I. Plaintiff again alleged that it fully performed its obligations under the parties’ joint venture agreement and detrimentally relied upon it. If plaintiff proves the truth of either allegation, the Frauds Act will not bar plaintiff from enforcing that agreement. We therefore reverse the trial court’s dismissal of count II.

Count III, however, was properly dismissed. To state a cause of action based upon a theory of unjust enrichment, a plaintiff must allege that the defendant unjustly retained a benefit to the plaintiffs detriment and that the defendant’s retention of that benefit violates fundamental principles of justice, equity, and good conscience. F.H. Prince & Co. v. Towers Financial Corp., 275 Ill. App. 3d 792, 804 (1995). Because the theory is based upon an implied contract, it has no application when an express contract governs the relationship between the parties. F.H. Prince, 275 Ill. App. 3d at 804; Industrial Lift Truck Service Corp. v. Mitsubishi International Corp., 104 Ill. App. 3d 357, 360-62 (1982).

In count III, plaintiff asserted that the parties entered into an express contract in the form of a joint venture agreement. Plaintiff alleged that defendant breached that contract and then prayed for its enforcement. Thus, count III is not substantively different from count II. Plaintiff again seeks to enforce an actual contract; it does not seek to imply the existence of a contract when none is alleged to exist in fact. An unjust enrichment claim is simply inappropriate in that context. We therefore affirm the trial court’s dismissal of count III.

Finally, because the dismissal of count IV was based only upon the dismissal of the substantive counts, we reverse the dismissal of count IV in accordance with our reversal of the dismissal of counts I and II.

For these reasons, we affirm the trial court’s dismissal of count III of plaintiffs amended complaint; we reverse the trial court’s dismissal of counts I, II, and IV of plaintiffs amended complaint; and we remand the cause for further proceedings.

Affirmed in part and reversed in part; cause remanded.

GEIGER and THOMAS, JJ., concur.