| gPlaintiff, Lemmon Law Firm, L.L.C. (“Lemmon”), appeals the trial court judgment granting the exceptions of no cause of action and no right of action filed by the St. Charles Parish School Board (“the School Board”) and dismissing plaintiffs petition with prejudice. For the following reasons, we reverse the judgment as to both exceptions and remand the case for further proceedings.
FACTS AND PROCEDURAL HISTORY
On September 30, 2009, Lemmon filed suit against the School Board seeking to recover attorney fees resulting from its representation of the School Board in a civil proceeding filed in the United States District Court for the Eastern District of Louisiana, No. 04-2511, entitled School Board of St. Charles, et al. v. Shell Oil Company (“Shell litigation”)1. In its petition, Lemmon alleges that when it was *233retained by the School Board, through an authorized representative, it was agreed that Lemmon was to be paid “the maximum allowable hourly rate and receive the statutory attorney fee, if one was recovered, after credit was given for |sthe hourly payments received during the litigation.” Lemmon asserts that the federal court ultimately rendered a judgment in the Shell litigation, awarding $1,053,620.74 in taxes, interest, and penalties to the School Board, as well as an additional 10% in attorney fees, in accordance with the St. Charles School Board General Sales and Use Tax Ordinance (September 1, 1965) (as amended) § 9.03.2 Accordingly, Lem-mon claims that it is entitled to this statutory attorney fee, after credit is given for the hourly payments received during the litigation, as per its agreement with the School Board.
In the alternative, Lemmon asserts that it is entitled to past-due attorney fees resulting from the underpayment of the hourly rate from April 1, 2004 to January 31, 2007, in the amount of $26,951.25. Lemmon states that during the time it was employed by the School Board, the maximum hourly rate permitted by the Louisiana Department of Justice increased from $150.00 per hour to $175.00 per hour, but the School Board continued to pay Lem-mon $150.00 per hour. Lemmon asserts that it discussed this issue with the School Board in June of 2007 and the School Board agreed to pay the difference retroactive to January of 2007. However, Lem-mon claims that it was entitled to payment at the $175.00 per hour rate retroactive to April of 2004.
In response to Lemmon’s petition, on November 9, 2009, the School Board filed a “Peremptory Exception of No Cause/ Right of Action, Answer and Affirmative Defense.” In this pleading, the School Board claims that Lemmon has no cause of action against it for the statutory attorney fee awarded, because it is a claim to a contingency fee, which must be in writing pursuant to LSA-R.S. 37:218 and Rule 1.5(c) of the Louisiana Rules of Professional Conduct. It contends that Lemmon and the School Board did not have a written contract for legal services in |4the Shell litigation, so Lemmon has not stated a cause of action against the School Board. The School Board further argues that Lemmon does not have a right of action against it for attorney fees, because the total of the payments already made to Lemmon by the School Board for its representation in the Shell litigation exceeds the amount of the statutory attorney fee awarded.
On September 24, 2012, Lemmon filed a “First Supplemental and Amending Petition,” asserting that the services provided by Lemmon for the School Board “constitute an open account pursuant to LSA-R.S. 9:2781 et seq.”
The peremptory exceptions of no cause of action and no right of action came for hearing before the trial judge on December 10, 2012. At the conclusion of the hearing, the trial judge took the matter under advisement. On January 16, 2013, the trial judge rendered a judgment granting the exceptions of no cause of action and no right of action, and dismissing Lemmon’s petition with prejudice. Lem-mon appeals.
LAW AND DISCUSSION
On appeal, Lemmon first argues that the trial court erred by granting the School Board’s exception of no cause of *234action. It contends that neither LSA-R.S. 37:218 nor Rule 1.5(c) of the Louisiana Rules of Professional Conduct applies in this case, because the statutory attorney fee awarded in the Shell litigation was not a contingency fee and thus, the agreement between Lemmon and the School Board for Lemmon to recover this fee was not required to be in writing. Lemmon further notes that the School Board’s exception of no cause of action claimed only that Lemmon did not state a cause of action for recovery of the statutory attorney fee. It did not assert that Lemmon failed to state a cause of action for attorney fees on open account or for the outstanding attorney fees due to the underpayment of the hourly rate.
| sThe School Board responds that Lem-mon has not stated a cause of action for the statutory attorney fee awarded, because this fee was not guaranteed and was contingent on the outcome of the Shell litigation. Thus, the School Board maintains that the statutory attorney fee was a contingency fee and that contingency fee agreements must be in writing to be enforceable.
In his reasons for judgment, the trial judge found that Lemmon did not state a cause of action for attorney fees, because it failed to allege the critical elements of its claim that either the parties had a written contingency fee agreement that entitles Lemmon to any statutory attorney fee or that Lemmon is seeking to recover fees based on quantum meruit.
An exception of no cause of action tests the legal sufficiency of the petition and is triable on the face of the petition. Fink v. Bryant, 01-987, p. 3 (La.11/28/01), 801 So.2d 346, 348-349; Cleco Corp. v. Johnson, 01-175, p. 3 (La.9/18/01), 795 So.2d 302, 304. An appellate court conducts a de novo review of a trial court’s judgment sustaining a peremptory exception of no cause of action, because the objection raises a question of law. Donnaud’s Inc. v. Gulf Coast Bank and Trust Co., 03-427, p. 5 (La.App. 5 Cir. 9/16/03), 858 So.2d 4, 7, writ denied, 03-2862 (La.1/9/04), 862 So.2d 985. On review, the court asks whether, in the light most favorable to the plaintiff and with every doubt resolved in the plaintiffs favor, the petition states any valid cause of action. Ramey v. DeCaire, 03-1299, p. 8 (La.3/19/04), 869 So.2d 114, 119; Taylor v. Leger Construction, L.L.C., 10-749, p. 3 (La.App. 3 Cir. 12/8/10), 52 So.3d 1098, 1101.
The function of the peremptory exception of no cause of action is to question whether the law extends a remedy against the defendant to anyone under the factual allegations of the petition. Industrial Companies, Inc. v. Durbin, 02-665, p. 6 (La.1/28/03), 837 So.2d 1207, 1213; Cleco Corp., 01-175 at 3, 795 So.2d at 304. The standard for granting an exception of no cause of action is not the likelihood that the plaintiff will prevail at trial; rather, it is whether, on the face of the petition, accepting all allegations as true, the petition states a valid cause of action for relief. Doe v. Smith, 05-653, p. 2 (La.App. 4 Cir. 7/13/05), 913 So.2d 140, 141.
The general rule is that where the petition states a cause of action as to any ground or portion of a demand, an exception of no cause of action should be denied. Sevarg Co., Inc. v. Energy Drilling Co., 591 So.2d 1278, 1281 (La.App. 3 Cir.1991), writ denied, 595 So.2d 662 (La.1992). The only recognized exception to such rule is when separate and distinct causes of action are included in one petition. Id. See also Lybrand v. Newman, Drolla, Mathis, Brady, & Wakefield, 95-9 (La.App. 5 Cir. 10/31/95), 663 So.2d 850. A petition should not be dismissed for *235failure to state a cause of action unless it appears beyond doubt that the plaintiff can prove no set of facts in support of any claim which would entitle him to relief. Industrial, 02-665 at 6, 837 So.2d at 1213; Fink, 01-987 at 4, 801 So.2d at 349. The language of the petition must be accorded every reasonable interpretation in favor of maintaining its sufficiency and granting the plaintiff the opportunity to present evidence at trial. Industrial, 02-665 at 7, 837 So.2d at 1213.
In the present case, the allegations set forth by Lemmon in its petitions are sufficient to support a cause of action against the School Board for attorney fees. In its original petition, Lemmon contends that it was hired to represent the School Board in the Shell litigation filed in federal court. Lemmon further asserts that it had an agreement with the School Board to be paid the maximum allowable hourly rate and to receive the statutory attorney fee, if one was recovered, after credit was given for payments made during the litigation. Lemmon contends that a statutory attorney fee of $105,362.07 was, in fact, awarded and that it is entitled to this fee, ^subject to a credit for payments made during the litigation. Lemmon further asserts that the maximum hourly rate increased from $150.00 to $175.00, but the School Board continued to pay Lemmon at the $150.00 per hour rate. Although the School Board did acknowledge the discrepancy and paid the difference in these hourly fees retroactive to January of 2007, Lemmon claims it should have been paid retroactive to April of 2004, resulting in a deficiency of $26,951.25. Finally, in its First Supplemental and Amending Petition, Lemmon asserts that the services provided by Lemmon were on open account, pursuant to LSA-R.S. 9:2781 et seq.
In its exception of no cause of action, the School Board does not contend that Lem-mon has no cause of action for the underpayment of attorney fees from April of 2004 to January of 2007. In fact, at the hearing on the exceptions, counsel for the School Board stated that the exception had “nothing to do with Mr. Lemmon’s claim to an additional twenty-five dollars an hour.” He added that the issue before the court was whether Lemmon was entitled to the statutory attorney fee, which was a contingency fee. Moreover, at the hearing, the trial judge stated that it was “not before me today whether or not it is an open account.” Nevertheless, when the trial judge rendered his judgment granting the exceptions of no cause of action and no right of action, he dismissed Lemmon’s petition in its entirety, with prejudice.
Accepting the factual allegations set forth in the petitions as true, we find that Lemmon has stated a valid cause of action for attorney fees. Accordingly, the trial court erred by granting the School Board’s exception of no cause of action, and we reverse the trial court’s ruling.
The second issue Lemmon raises on appeal is whether the trial court erred by granting the School Board’s exception of no right of action. Lemmon contends that it represented the School Board during the Shell litigation and thus, it clearly | shas the right to assert a claim for unpaid attorney fees arising from that representation.
The School Board responds that the trial court correctly granted its exception of no right of action. The School Board maintains that Lemmon cannot claim entitlement to the statutory attorney fee awarded in the Shell litigation, because this fee was subject to a credit for payments made to Lemmon during the litigation and the amount already paid exceeds the amount of the statutory attorney fee.
*236In his reasons for judgment, the trial judge found that Lemmon has no right of action, because the statutory attorney fee awarded was $105,362.07, but the payments previously made to Lemmon by the School Board exceed $244,000.00. Thus, the trial court found that the credit due to the School Board more than offsets the statutory attorney fee awarded, leaving Lemmon with no right of action.
An exception of no right of action assumes that the petition states a cause of action for some person and questions whether the plaintiff in the particular case is a member of the class that has a legal interest in the subject matter of the litigation. Gibson v. State, 03-1112, p. 4 (La.App. 5 Cir. 2/10/04), 866 So.2d 375, 378, writ denied, 04-960 (La.4/8/05), 899 So.2d 8, cert. denied, 546 U.S. 838, 126 S.Ct. 73, 163 L.Ed.2d 96 (2005); Robertson v. Sun Life Financial, 09-2275, p. 6 (La.App. 1 Cir. 6/11/10), 40 So.3d 507, 511. The exception of no right of action tests whether the plaintiff has a “real and actual interest” in the action, but it does not raise questions of the plaintiffs ability to prevail on the merits or whether the defendant may have a valid defense. Ferguson v. Dirks, 95-560, p. 4 (La.App. 5 Cir. 11/28/95), 665 So.2d 585, 587; Jackson v. Slidell Nissan, 96-1017 (La.App. 1 Cir. 5/9/97), 693 So.2d 1257, 1261; Cutitto v. Boyes, 97-63 (La.App. 5 Cir. 5/28/97), 695 So.2d 1080.
lain the instant case, it is clear that Lemmon has a “real and actual interest” in this suit for unpaid attorney fees. Lem-mon is a law firm that represented the School Board during the Shell litigation in federal court and, as such, it has the right to assert a claim for outstanding or unpaid legal fees. The trial court granted the exception of no right of action on the grounds that the evidence presented in support of the exception of no right of action shows that the payments made to Lemmon during the litigation more than offset the statutory attorney fee awarded. However, while it may be true that Lem-mon has been paid all of the attorney fees to which it is entitled, this is not an appropriate consideration in determining an exception of no right of action. Therefore, the trial court erred in granting the School Board’s exception of no right of action.
In conclusion, while we express no opinion as to the merits of Lemmon’s claims, we find that Lemmon has made sufficient allegations in its petitions to defeat the School Board’s exceptions of no cause of action and no right of action. Accordingly, we reverse the judgment of the trial court and remand for further proceedings.
DECREE
For the foregoing reasons, we reverse the trial court judgment granting the School Board’s exceptions of no cause of action and no right of action, and we remand this case for further proceedings.
REVERSED AND REMANDED.
. According to Lemmon, the School Board filed suit against Shell Oil Co. in September of 2004, seeking to recover payment of underpaid sales and use taxes.
. The ordinance provides that attorney fees are assessed at 10% of the tax, interest, and penalties.