
837 So.2d 78 (2002)
Edward AUGUST
v.
GRAND LAKE CONSTRUCTION.
No. 02-CA-632.
Court of Appeal of Louisiana, Fifth Circuit.
December 30, 2002.
*79 J. Courtney Wilson, New Orleans, LA, for Plaintiff/Appellant.
Jana Smith Creely, Metairie, LA, for Defendant/Appellee.
Panel composed of Judges EDWARD A. DUFRESNE, SOL GOTHARD, and CLARENCE E. McMANUS.
SOL GOTHARD, Judge.
Plaintiff, Edward August, appeals an adverse judgment of the trial court that granted a defense exception of no cause of action.
This action began when plaintiff filed a "Petition for Breach of Contract" in which he alleged that defendant, Grand Lake Construction, Inc., (Grand Lake), repaired a patio top and part of a roof at his residence in February 1994. The petition also alleges that the area repaired had to be repaired again in June 2000 because of leaks in the earlier work done by Grand Lake. Plaintiff asserts that, because he could not locate Grand Lake, he was required to spend $6,595.00 with another construction company to repair the damage.
Grand Lake filed an exception of no cause of action in which it asserted that the suit is perempted by LSA-R.S. 9:2772, which was amended to reduce the peremptive period for such suits from ten to seven years. Plaintiff argued that the effective date of that amendment was August 15, 1999, and does not apply to the contract at issue. After a hearing on the merits, the trial court found that the petition for breach of contract, filed on May 8, 2001, over seven years from the date of the renovation, was perempted by LSA-R.S. 9:2772, and rendered a judgment granting the exception. Plaintiff filed a timely appeal from that judgment.
Plaintiff argues correctly that the 1999 amendment to LSA-R.S. 9:2772 only applies prospectively and does not apply to the contract at issue herein. When the statute was amended in 1999, the legislature provided, "(t)he provisions of this Act shall have prospective application only and shall apply only to contracts entered into on or after the effective date of this Act." That act became effective on August 15, 1999. Since the contract at issue was confected in 1994, the ten-year peremptive period is applicable. Thus, the trial court erred in ruling that plaintiff's action is perempted pursuant to the seven-year peremptive period in that statute.
However, that does not end our inquiry. In brief to this Court, Grand Lake raises the issue of prescription, citing the following sections of LSA-R.S. 9:2772:
A. No action, whether ex contractu, ex delicto, or otherwise, including *80 but not limited to an action for failure to warn, to recover on a contract, or to recover damages shall be brought against any person performing or furnishing land surveying services, as such term is defined in R.S. 37:682(11)(a), including but not limited to those services preparatory to construction, or against any person performing or furnishing the design, planning, supervision, inspection, or observation of construction or the construction of immovables, or improvement to immovable property, including but not limited to a residential building contractor as defined in R.S. 37:2150.1(9):
B. (1) The causes which are perempted within the time described above include any action:
(a) For any deficiency in the performing or furnishing of land surveying services, as such term is defined in R.S. 37:682(11)(a), including but not limited to those preparatory to construction or in the design, planning, inspection or observation of construction, or in the construction of any improvement to immovable property, including but not limited to any services provided by a residential building contractor as defined in R.S. 37:2150.1(9).
D. Actions for the causes enumerated in Sub-section B of this Section, against the persons enumerated in Sub-section A of this Section, shall prescribe by the applicable prescriptive periods established by law for such actions.
Pursuant to sub-section D above, we must establish the prescriptive period for the cause of action in the instant matter. The petition alleges faulty workmanship pursuant to a construction contract. An inquiry into the timeliness of a suit filed for such a cause of action begins with LSA-C.C. art. 2762, which provides:
If a building, which an architect or other workman has undertaken to make by the job, should fall to ruin either in whole or in part, on account of the badness of the workmanship, the architect or undertaker shall bear the loss if the building falls to ruin in the course of ten years, if it be a stone or brick building, and of five years if it be built in wood or with frames filled with bricks.
We note that the above cited article establishes a cause of action when construction falls to ruin within the applicable time period. It does not set out a period when the action must be brought. Orleans Parish School Bd. v. Pittman Const. Co., 260 So.2d 661, 665 (La.1972). Thus, article 2762 establishes a cause of action when the badness of the workmanship results in ruin within the applicable time period. The time within which the cause of action may be asserted is governed by the prescriptive articles. Orleans Parish School Bd. v. Pittman Const. Co., supra. 260 So.2d at 666.
Therefore, while Grand Lake argues prescription, we find the initial issue before the court is whether a cause of action was established. Pursuant to LSA-C.C.P. art. 927B an appellate court may notice the failure of a plaintiff to assert a cause of action on its own motion. The cause of action cannot be asserted before it accrues, and it must follow that any prescriptive period for asserting the cause of action cannot begin to run until the cause of action comes into being. Orleans Parish School Bd. v. Pittman Const. Co., supra, 260 So.2d at 666.
The function of an exception of no cause of action is to test the legal sufficiency of the petition by determining whether the law affords a remedy on the facts alleged in the pleading. No evidence may be introduced to support or controvert the objection that the petition fails to *81 state a cause of action. La.Code Civ. P. art. 931. Therefore, the court reviews the petition and accepts well pleaded allegations of fact as true, and the issue at the trial of the exception is whether, on the face of the petition, the plaintiff is legally entitled to the relief sought. (some citations omitted)

Hall v. Zen-Noh Grain Corp., XXXX-XXXX (La.4/30/01), 787 So.2d 280, 281.
The reviewing court is to make a de novo determination because the exception raises a question of law and the lower court's decision is based only on the sufficiency of the petition. Thus, assuming that all the facts in plaintiff's petition are true, this court must determine if the plaintiff has a cause of action. Millet v. Treasure Chest Casino, L.L.C., 00-18 (La.App. 5 Cir. 5/30/01), 788 So.2d 713, 715; writ denied, 01-1908 (La.10/5/01), 799 So.2d 485.
The petition in this matter only states that "(b)y June 2000 the ridge over the living room and other items had to be repaired because of leaks in the work done by defendant." The type of construction is not asserted, so it is not clear from the petition whether the ruin was within the time period that would establish a cause of action. Therefore, on its face, the petition does not state a cause of action. LSA-C.C.P. art. 934 provides that when "the grounds of the objections pleaded by the peremptory exception may be removed by amendment of the petition, the judgment sustaining the exception shall order such amendment within the delay allowed by the court."
In conclusion, we find that the judgment of the trial court granting the exception of no cause of action, although based on incorrect law, was correctly granted. However, that portion of the judgment that dismissed plaintiff's action with prejudice is incorrect and is hereby reversed. In accordance with LSA-C.C.P. art. 931, we amend the judgment to allow the plaintiff fifteen days from the rendition of this opinion to amend his petition to state a cause of action.
For the reasons discussed herein, the judgment of the trial court is reversed insofar as it dismisses plaintiff's action with prejudice. The judgment is amended to allow the plaintiff fifteen days to amend his petition to state a cause of action. In all other respects, the judgment is affirmed as amended and the matter is remanded.
REVERSED IN PART; AMENDED, AND AFFIRMED AS AMENDED, AND REMANDED.
