
384 S.C. 512 (2009)
682 S.E.2d 824
Cecil BRAZELL and Jackie Brazell, Petitioners,
v.
Audrey B. WINDSOR, Respondent.
No. 26715.
Supreme Court of South Carolina.
Heard June 10, 2009.
Decided September 8, 2009.
Rehearing Denied October 7, 2009.
*514 Brian Dumas, of Peake, Fowler & Associates, of Columbia, for Petitioners.
J. Rutledge Young, Jr., Stephen L. Brown, William L. Howard, Sr., and Russell G. Hines, all of Young, Clement, Rivers, of Charleston, for Respondent.
Chief Justice TOAL.
Petitioners filed a breach of contract action against Respondent arising out of a purchase contract for the sale of a home and sought rescission of the entire contract. The trial court granted Respondent's 12(b)(6), SCRCP, motion to dismiss the remedy of rescission and the court of appeals affirmed. We granted a writ of certiorari to review that decision and now reverse.

FACTUAL/PROCEDURAL BACKGROUND
On October 20, 2004, Petitioners and Respondent entered into a sales contract for the purchase of a home located on Edisto Island. The closing took place on November 30, 2004. Although neither party was present at the closing, Petitioners executed a HUD-1 Settlement Statement and a deed to Respondent prior to the closing, and the parties submitted pre-signed closing documents at the closing. The total purchase price of the home was $550,000, and after satisfying liens on the property, Petitioners were to receive $327,818.54.
On December 3, 2004, Respondent notified Petitioners that the reverse osmosis water filtration system did not work. On December 6, 2004, the deed was recorded. Respondent's attorney forwarded a check of the net proceeds to Petitioners but withheld $2,000 from the check and noted that the amount reflected the "sellers' proceeds less $2,000 escrow for reverse osmosis system repair." The attorney sent an escrow agreement regarding how the parties would treat the $2,000. Petitioners refused to sign the escrow agreement and refused to accept the check.
*515 Petitioners filed suit alleging breach of contract and seeking rescission of the entire contract. The trial court reviewed the complaint as well as the HUD-1 Statement and granted Respondent's motion to dismiss the remedy of rescission. The court of appeals affirmed. Brazell v. Windsor, 376 S.C. 83, 655 S.E.2d 736 (Ct.App.2007). We granted a writ of certiorari to review the following issues:
I. Did the court of appeals err in holding that the Rule 12(b)(6), SCRCP, motion was not converted into a motion for summary judgment after the trial court considered the HUD-1 Statement, which was not attached to the complaint?
II. Did the court of appeals err in holding the trial court properly granted the motion to dismiss the remedy of rescission?

STANDARD OF REVIEW
Under Rule 12(b)(6), a defendant may move to dismiss a complaint based on a failure to state facts sufficient to constitute a cause of action. If the facts and inferences drawn from the facts alleged in the complaint, viewed in the light most favorable to the plaintiff, would entitle the plaintiff to relief on any theory, then the grant of a motion to dismiss for failure to state a claim is improper. Gentry v. Yonce, 337 S.C. 1, 5, 522 S.E.2d 137, 139 (1999). In deciding whether the trial court properly granted the motion to dismiss, the appellate court must consider whether the complaint, viewed in the light most favorable to the plaintiff, states any valid claim for relief. Id.

LAW/ANALYSIS

I. HUD-1 Statement
Petitioners argue that the court of appeals erred in holding that the trial court did not convert the 12(b)(6) motion into a summary judgment motion in considering the HUD-1 Statement which was not attached to the complaint. We disagree.
In the complaint, Petitioners alleged that Respondent had not paid the amount due under the sales contract "as set forth *516 upon the HUD-1 Settlement Statement attached to and incorporated herein by reference." Although Petitioners failed to actually attach the HUD-1 Statement to the complaint, Respondent's counsel attached a copy of it to their memorandum in support of the motion to dismiss the remedy of rescission. The trial court specifically referenced the HUD-1 statement in its order and considered the document in making the ruling.
A copy of a document which is an exhibit to a pleading is a part of the pleading for all purposes if a copy is attached to such a pleading. Rule 10(c), SCRCP. In considering a 12(b)(6) motion, the trial court must base its ruling solely upon the allegations set forth on the face of the complaint. However, on a 12(b)(6) motion, if matters outside the pleading are presented to and not excluded by a court, the motion shall be treated as one for summary judgment and disposed of as provided in Rule 56, SCRCP, and all parties shall be given reasonable opportunity to present all material made pertinent to such a motion by Rule 56. See Rule 12(b), SCRCP.
We hold that the trial court did not convert the 12(b)(6) motion into a motion for summary judgment by considering the HUD-1 Statement in making his ruling. Petitioners explicitly stated that the Statement was attached and incorporated by reference into the complaint. Thus, they brought the HUD-1 Statement to the attention of trial court and were on notice of any information contained in it. In our view, allowing a trial court to consider documents that are incorporated by reference in the complaint but not actually attached thereto prevents a plaintiff from benefiting from his own oversight or from surviving a motion to dismiss by intentionally omitting documents upon which their claims are based.
Accordingly, we hold that the trial court did not convert the 12(b)(6) motion into a motion for summary judgment by considering the HUD-1 Statement.

II. Motion to Dismiss
Petitioners argue the court of appeals erred in affirming the trial court's grant of Respondent's motion to dismiss the remedy of rescission. We agree.
A breach of contract claim warranting rescission of the contract must be so substantial and fundamental as to *517 defeat the purpose of the contract. Rogers v. Salisbury Brick Corp., 299 S.C. 141, 143, 382 S.E.2d 915, 917 (1989). Thus, a rescission will not be granted for a minor or casual breach of a contract, but only for those breaches which defeat the object of the contracting parties. Id. at 143-44, 382 S.E.2d at 917. In the absence of fraud, rescission is appropriate only if both parties can be returned to the status quo prior to the contract. King v. Oxford, 282 S.C. 307, 313, 318 S.E.2d 125, 129 (Ct.App. 1984).
In the complaint, Petitioners alleged Respondent breached the contract:
a. In proceeding with the closing on terms other than those as specified in the written agreement;
b. In failing to honor the "time is of the essence" provision of the agreement;
c. In failing initially to forward any proceeds of the sale as specified in the duly executed HUD-1 Settlement Statement to the [Petitioners] in a timely manner;
d. In failing to subsequently forward appropriate funds as clearly specified on the HUD-1 Settlement Statement;
e. By arbitrarily and unilaterally withholding funds from the [Petitioners]; all of the above constituting substantial and material breaches of the written agreement for sale of real estate as existing between the parties.
The trial court found that the allegation that Respondent withheld $2,000 from the contract price was a minor breach as a matter of law and that rescission would not restore either party to the status quo. Similarly, the court of appeals held that the remedy of rescission was not available because the alleged breach was not fundamental or substantial enough to defeat the purpose of the contract. However, the court of appeals declined to address whether the parties could be returned to the status quo in light of its dispositive holding that the breach was not fundamental.
We hold that the trial court erred in granting Respondent's motion to dismiss the remedy of rescission, and likewise, that the court of appeals erred in affirming this decision. In the complaint, Petitioners alleged Respondent breached several provisions in the contract by withholding $2,000 from the *518 purchase price. While $2,000 may constitute a relatively small portion of the total purchase price, Petitioners alleged the withholding of the proceeds was a material breach, and thus, the allegations support a claim for relief.
In our view, the trial court's and court of appeals' error stems from focusing on the dollar amount withheld in determining whether Respondent's actions defeated the purpose of the contract and the objective of the contracting parties.[1] Numerous legal documents are executed in a real estate transaction and several entities involved in the transaction, including the buyer, seller, lender, mortgage company, and title insurance company, rely on the finality of the closing. Indeed, this Court has noted the importance of attorneys' compliance with the proper real estate closing standards in disciplinary matters. See In re Barbare, 360 S.C. 560, 573, 602 S.E.2d 382, 388 (2004) and In re Lathan, 360 S.C. 326, 339, 600 S.E.2d 902, 908-09 (2004) (noting the Court's trouble with "real estate transactions which have been the subject of misleading, fraudulent, and/or criminal schemes. Inaccurate HUD-1 Settlement Statements and other closing documents contribute to these deceptive activities."). For these reasons, real estate contracts are unique and courts should evaluate the purpose of the real estate contract and the materiality of a breach in light of these differences.
In the instant case, we find that the overriding purpose of the contract was not merely to receive proceeds from the sale of a home, but rather to finalize a real estate transaction and transfer title from Petitioners to Respondent. Respondent could have negotiated for provisions in the contract regarding the reverse osmosis system or could have sought relief by filing her own breach of contract action. By withholding proceeds from the purchase price, however, the transaction was not final, thereby potentially defeating the purpose of the contract.
As a final matter, we hold that the trial court erred in dismissing the remedy of rescission because the parties could not be restored to the status quo. Petitioners immediately *519 took action after Respondent failed to act in accordance with the contract. When Respondent failed to deliver the entire amount specified in the contract, Petitioners instructed Respondent not to file the deed or take any further action regarding title to the property. Petitioners refused to accept the check or sign the escrow agreement. Nine days later, Petitioners filed the breach of contract action seeking rescission of the contract "returning the parties to the status quo." Moreover, it is feasible and practicable to transfer title in the property back to Petitioners and return any additional moneys paid to restore the parties to their original position. See Ellie, Inc. v. Miccichi, 358 S.C. 78, 94, 594 S.E.2d 485, 494 (Ct.App. 2004) (noting that rescission entitles the party to a return of the consideration paid as well as any additional sums necessary to restore him to the position occupied prior to the making of the contract).
We note that whether it would be fair and equitable to rescind the contract is a different issue from whether Petitioners have sufficiently alleged a material breach of contract and sufficiently alleged that rescission would allow them to be restored to the status quo. See King, 282 S.C. at 314-15, 318 S.E.2d at 129 (refusing to rescind the contract where the plaintiff would be materially prejudiced by rescission and where the defendant could not restore the plaintiff to his former position). Likewise, whether Petitioners would be able to survive a motion for summary judgment is a different issue from whether Petitioners have failed to state a claim. We merely hold that because Petitioners have stated facts which, if true, would entitle them to relief, the trial court erred in granting Respondent's motion to dismiss the remedy of rescission.

CONCLUSION
For the foregoing reasons, we hold that the court of appeals correctly held that the trial court did not convert the 12(b)(6) motion into a motion for summary judgment in considering the HUD-1 Settlement Statement, but erred in affirming the grant of Respondent's motion to dismiss the remedy of rescission. Accordingly, we reverse and remand for further proceedings.
*520 WALLER, BEATTY, JJ., and Acting Justice JAMES E. MOORE, concur. PLEICONES, J., dissenting in a separate opinion.
Justice PLEICONES.
I respectfully dissent and would affirm the Court of Appeals which upheld the trial court's order granting respondent's Rule 12(b)(6), SCRCP motion. In my opinion, placing $2,000 in an escrow account pending resolution of the reverse osmosis system issue may not have been the best decision, but it was in no way "so substantial and fundamental as to defeat the purpose of the contract." Moreover, I do not agree with the majority that a special standard should apply to real estate transactions, since in my view the purpose of any sale is to transfer title from the seller to the buyer. Finally, I agree with the trial judge that rescission cannot lie here as it is impossible to return respondent to the status quo ante the closing.
I would affirm.
NOTES
[1]  In the order, the trial court noted that Respondent paid 99.6% of the contract price and withheld only .04%. The court found that Petitioners' complaint was "over a minor .04%."
