
974 So.2d 790 (2008)
BELLSOUTH TELECOMMUNICATIONS, INC., Plaintiff-Appellee,
v.
William FERGUSON, Defendant-Appellant.
No. 42,742-CA.
Court of Appeal of Louisiana, Second Circuit.
January 16, 2008.
Evelyn Collins Kelly, for Appellant.
Gregory J. Barro, for Appellee.
Before BROWN, WILLIAMS and STEWART, JJ.
WILLIAMS, J.
The defendant, William Ferguson, appeals a judgment in favor of the plaintiff, BellSouth Telecommunications, Inc. ("BellSouth"). The trial court awarded BellSouth court costs and judicial interest from the date of demand. For the following reasons, we affirm.

FACTS
In June 2006, BellSouth mailed a demand letter via first class mail to William Ferguson ("Ferguson") at his residence in Shreveport, seeking payment of $131.07, the amount allegedly due for telephone service. In August 2006, the plaintiff, BellSouth, filed a petition on open account against the defendant, Ferguson, seeking collection of the debt. On August 10, 2006, the defendant was personally served with notice of the petition and on August 18, 2006, the defendant paid the principal amount owed of $131.07 at a BellSouth payment location. In September 2006, the defendant filed an answer to plaintiffs petition alleging the affirmative defense of payment of the debt.
*792 Subsequently, the plaintiff filed a motion for summary judgment seeking to recover court costs, judicial interest and attorney fees. After a hearing, the trial court ruled it would "deny plaintiffs motion for summary judgment and attorney fees," concluding that defendant had paid the debt within the delay provided in LSA-R.S. 9:2781. The defendant's attorney submitted a judgment to the trial court without first presenting the judgment to plaintiffs attorney for approval as to form. The trial court signed the judgment, which in addition to denying summary judgment, further stated that "plaintiffs suit as to this defendant is dismissed with prejudice at plaintiff's cost and with no attorney fees." This judgment was not appealed.
In January 2007, plaintiff filed its "Motion for Rehearing Summary Judgment," alleging that the court had misapplied LSA-R.S. 9:2781 in denying summary judgment. The defendant then filed peremptory exceptions of no cause of action, no right of action and res judicata. The defendant alleged that the motion for rehearing had been abolished in the trial courts and that the prior judgment dismissing plaintiffs claim was conclusive between the parties.
After a hearing, the trial court rendered judgment declining plaintiffs request for review of the denial of summary judgment as to attorney fees, but ordering defendant to pay all court costs and to pay judicial interest on the debt amount from the date of demand. Defendant appeals the judgment. This court denied plaintiffs motion to file a late answer. BellSouth v. Ferguson, 42,742 (La.App.2d Cir.8/23/07).

DISCUSSION
The defendant contends the trial court erred in considering plaintiffs motion for rehearing to assess him with court costs. In two assignments of error, defendant argues that he should not be liable for court costs since the court had previously rendered judgment denying plaintiffs motion for summary judgment.
Every pleading is construed so as to do substantial justice. LSA-C.C.P. art. 865. The caption, or heading, of the pleading does not control and the court is obligated to ascertain the substance of the pleading. Smith v. Cajun Insulation, Inc., 392 So.2d 398 (La.1980); Ford Motor Credit v. Brown, 32,995 (La.App.2d Cir.4/5/00), 756 So.2d 654.
Costs may be taxed by a rule to show cause and the court may render judgment for costs, or any part thereof, against any party as it may consider equitable. LSA-C.C.P. art.1920. The allocation of court costs among the parties is subject to the discretion of the trial court and its allocation of those costs will not be disturbed absent an abuse of that discretion. Street v. May, 35,589 (La.App,2d Cir.12/5/01), 803 So.2d 312.
In this case, the record shows that the trial court treated plaintiffs motion as a rule to tax costs. At the hearing on the motion, the trial court reiterated its decision that plaintiff was not entitled to recover attorney fees. However, the court assessed costs against the defendant finding that defendant's nonpayment of the debt following written demand prompted plaintiff to file the petition. Based upon this record, we cannot say the trial court abused its discretion in assessing defendant with court costs. The assignments of error lack merit.
Peremptory Exceptions
The defendant contends the court should have considered the exception of res judicata and the exceptions of no right and no cause of action. The purpose of the peremptory exception of no cause of *793 action is to test the legal sufficiency of the petition by determining whether plaintiff is afforded a remedy in law based on the facts alleged in the petition. Grocery Supply Co. v. Winterton Food Stores, 31,114 (La.App.2d Cir.12/9/98), 722 So.2d 94. The peremptory exception of no right of action is designed to test whether the plaintiff has a real and actual interest in judicially enforcing the right asserted. Downs v. Hammett Properties, Inc., 39,568 (La. App.2d Cir.4/6/05), 899 So.2d 792.
In this case, the plaintiffs petition adequately alleged facts to establish that there was a legal remedy available for its action to recover the debt allegedly owed by defendant. In addition, the record shows that the plaintiff possessed an actual interest in enforcing its claim to obtain payment for telephone services rendered. Thus, the defendant's argument concerning the exceptions of no cause and no right of action lacks merit.
LSA-R.S. 13:4231(2) provides that if the judgment is in favor of the defendant, all causes of action existing at the time of the final judgment, and arising out of the transaction that is the subject matter of the litigation, are extinguished. A judgment in favor of either party is conclusive, in any subsequent action between them, with respect to any issue actually litigated and determined. LSA-R.S. 13:4231(3).
Initially, we note that the plaintiffs motion for costs was not a separate action, but was an incidental demand of the original action to recover payment of a debt on an open account. Thus, this is not a situation involving a subsequent action between the parties and res judicata is not applicable.
In addition, the record demonstrates that the issue of costs was not previously litigated. At the summary judgment hearing, the issue was the interpretation of LSA-R.S. 9:2781, which provides the procedure for collecting on open accounts and obtaining attorney fees. The statute does not address the allocation of court costs and the parties did not argue the issue of costs at the hearing. Based upon this record, the defendant has not shown that plaintiffs motion for costs and interest was precluded by res judicata. The assignment of error lacks merit.

CONCLUSION
For the foregoing reasons, the trial court's judgment is affirmed. Costs of this appeal are assessed to the appellant, William Ferguson.
AFFIRMED.
