
956 N.E.2d 558 (2011)
353 Ill. Dec. 696
Jesse E. HERNANDEZ and Yolanda Hernandez, Plaintiffs-Appellants,
v.
Isadore BERNSTEIN, John L. Grazian, Richard S. Volpe, and Bernstein and Grazian, P.C., Defendants-Appellees.
No. 1-10-2646.
Appellate Court of Illinois, First District, Fifth Division.
August 19, 2011.
*559 Donald L. Johnson, Julie A. Boynton, Joseph Gentleman, Chicago, for Appellants.
Hinshaw & Culbertson LLP, Chicago (Matthew R. Henderson, Timothy G. Shelton), for Appellees John L. Grazian, Richard S. Volpe.
Donohue, Brown, Mathewson & Smyth, Chicago, for Appellees Isadore Bernstein, Bernstein and Grazian, P.C.

OPINION
Judge EPSTEIN delivered the judgment of the court, with opinion.
¶ 1 Plaintiffs, Jesse and Yolanda Hernandez, maintain the trial court erroneously dismissed their complaint pursuant to section 2-619(a)(4) of the Illinois Code of Civil Procedure (735 ILCS 5/2-619(a)(4) (West 2008)), as barred by res judicata. We reverse and remand.

¶ 2 BACKGROUND
¶ 3 In 2005, plaintiffs filed a legal negligence action against Jesse Hernandez's former attorneys, defendants Isadore Bernstein, John L. Grazian, Richard S. Volpe, and Bernstein and Grazian, P.C., a professional corporation engaged in the practice of law. Jesse hired defendants in 1999 to represent him with respect to injuries *560 he sustained at work. Plaintiffs claimed in their lawsuit:
"8. Upon undertaking the representation of plaintiffs the defendants owed a duty to exercise ordinary case and skill in the representation.
9. The defendants owed plaintiffs a duty to inform them of all potential claims and causes of action they possessed or which might arise from the injuries in question.
10. In March 1999 the defendants filed a worker[s'] compensation application for Jesse Hernandez.
11. However, the defendants: (a) failed to advise plaintiffs that they might have claims against parties other than Jesse Hernandez's employer to recover for the injuries Jesse Hernandez suffered at work; (b) failed to file an action against others who had contributed to the events and conditions which caused injuries to Jesse Hernandez; and (c) or to advise plaintiffs that they needed to retain other counsel to file an action against others who had contributed to the events and conditions which caused injuries to Jesse Hernandez."
Defendants moved to dismiss plaintiffs' complaint, arguing, inter alia, that the underlying third-party claims expired prior to the commencement of defendants' representation in 1999. Defendants maintained, and the trial court agreed, that the underlying claims had a two-year statute of limitations that began to run in 1995 while Jesse was represented by Spector & Lenz for a social security disability claim. Plaintiffs responded defendants were nonetheless liable for legal negligence because they did not advise plaintiffs to sue Spector & Lenz for not filing the underlying claims or advising plaintiffs to seek other counsel for those claims. In August 2007, the trial court dismissed plaintiffs' complaint without prejudice (August Order). Plaintiffs filed an amended complaint adding their Spector & Lenz allegations and reasserting the time-barred underlying claims. The trial court denied defendants' motion to dismiss the amended complaint. It also declined to revisit the statute of limitations issue. In April 2009, plaintiffs voluntarily dismissed their lawsuit without prejudice pursuant to section 2-1009 (735 ILCS 5/2-1009 (West 2008)).
¶ 4 In September 2009, plaintiffs filed the instant legal negligence lawsuit. They refiled a single-count complaint against defendants, reasserting their Spector & Lenz allegations, as well as the time-barred underlying claims. Defendants moved to dismiss the complaint, arguing the statute of limitations and res judicata bar plaintiffs' refiled action. The trial court dismissed plaintiffs' complaint with prejudice based on res judicata. Plaintiffs appeal.

¶ 5 ANALYSIS
¶ 6 A motion to dismiss pursuant to section 2-619 presents a question of law reviewed de novo. DeLuna v. Burciaga, 223 Ill.2d 49, 59, 306 Ill.Dec. 136, 857 N.E.2d 229 (2006). Such a motion "admits the legal sufficiency of the complaint but asserts affirmative matter to avoid or defeat the claim." Giannini v. Kumho Tire U.S.A., Inc., 385 Ill.App.3d 1013, 1015, 325 Ill.Dec. 816, 898 N.E.2d 1095 (2008). "One defense that a defendant may raise in a section 2-619 motion is that a prior judgment bars the plaintiff's cause of action, i.e., that the prior judgment has res judicata effect in the subsequent lawsuit." Kasny v. Coonen & Roth, Ltd., 395 Ill. App.3d 870, 873, 338 Ill.Dec. 577, 924 N.E.2d 1103 (2009). "Res judicata is an equitable doctrine designed to prevent the multiplicity of lawsuits between the same parties and involving the same facts and the same issues." Murneigh v. Gainer, *561 177 Ill.2d 287, 299, 226 Ill.Dec. 614, 685 N.E.2d 1357 (1997). It "applies to bar issues that were actually decided in the first action, as well as matters that could have been decided." Lane v. Kalcheim, 394 Ill.App.3d 324, 329, 333 Ill.Dec. 572, 915 N.E.2d 93 (2009). "Under the doctrine of res judicata, a final judgment on the merits rendered by a court of competent jurisdiction bars any subsequent actions between the same parties or their privies on the same cause of action." Id. "A ruling which is not a final order does not in any manner affect or determine any subsequent proceeding." Arnold Schaffner, Inc. v. Goodman, 73 Ill.App.3d 729, 732, 29 Ill.Dec. 818, 392 N.E.2d 375 (1979). At issue here is whether the August Order bars the instant litigation. It does not.
¶ 7 "An order is final and thus appealable if it either terminates the litigation between the parties on the merits or disposes of the rights of the parties, either on the entire controversy or a separate branch thereof." Hull v. City of Chicago, 165 Ill.App.3d 732, 733, 117 Ill.Dec. 369, 520 N.E.2d 720 (1987). It is undisputed the August Order did not terminate the initial litigation.
"An order disposes of a separate branch of a controversy when the bases for recovery of the counts which are dismissed are different from those which are left standing. [Citations.] This may occur when the grounds for recovery under the various counts arise from different statutes or common law doctrines or when different elements are required to recover under different theories." Rice v. Burnley, 230 Ill.App.3d 987, 991, 172 Ill.Dec. 826, 596 N.E.2d 105 (1992).
Defendants maintain the August Order was final because it allegedly disposed of one of plaintiffs' two grounds for recovery:
"[P]laintiffs here alleged two separate negligence theories: that the Bernstein defendants were negligent in failing to bring a products liability or chemical exposure case and that the Bernstein defendants were negligent in failing to advise plaintiffs with respect to suing Spector & Lenz for failing to bring a products liability or chemical exposure case."
We disagree. Plaintiffs have alleged only a single theory of recovery: legal negligence. To state such a claim, one must plead:
"(1) the existence of an attorney-client relationship which establishes a duty on the part of the attorney; (2) a negligent act or omission constituting a breach of that duty; (3) proximate cause establishing that `but for' the attorney's negligence, the plaintiff would have prevailed in the underlying action; and (4) damages." Ignarski v. Norbut, 271 Ill. App.3d 522, 525, 207 Ill.Dec. 829, 648 N.E.2d 285 (1995).
Plaintiffs maintain that during the course of their representation, defendants owed them "a duty to inform them of all potential claims and causes of action they possessed or which might arise from the injuries in question." Plaintiffs originally claimed that duty was breached when
"defendants: (a) failed to advise plaintiffs that they might have claims against parties other than Jesse Hernandez's employer to recover for the injuries Jesse Hernandez suffered at work; (b) failed to file an action against others who had contributed to the events and conditions which caused injuries to Jesse Hernandez; and (c) or to advise plaintiffs that they needed to retain other counsel to file an action against others who had contributed to the events and conditions which caused injuries to Jesse Hernandez."
*562 The trial court disagreed, holding these alleged breaches could not sustain plaintiffs' negligence complaint because the underlying claims expired prior to the commencement of defendants' representation. The trial court declined to dismiss plaintiffs' negligence claim with prejudice, however, granting them leave to replead:
"THE COURT: * * * I'm going to say the statute of limitations began to run, at the latest, his last date of employment, which is in '95.
According to those numbers then, the defendant should prevail on his motion, right? Am I right?
[PLAINTIFFS' COUNSEL]: Yeah, he would prevail on that, except for the fact that if you're making a specific finding that it ran in 1995, then I would amend my complaint to add allegations of negligence for these defendants failing to tell my client to sue the lawyer who was involved representing [sic] him in the Social Security claim.
So I would like leave to fileamend the complaint because they should have filed a malpractice case against them under those circumstances because the statute wouldn't have run against them at that point.
So if that's what your ruling is, then I would ask leave to file the amended complaint to add those allegations of negligence.
THE COURT: I suppose
[DEFENDANTS' COUNSEL]: Judge, if you're inclined to give him leave to amend, I guess our motion to dismiss is with prejudice, but it's your discretion if you're going to give him another shot.
THE COURT: Based on my finding here, I'll allow him to bring that."
The trial court's order did not alter plaintiffs' theory of recovery-negligence. It simply allowed them to plead new facts in support of that claim.
"This court has held that the dismissal of certain allegations under a single theory of recovery does not terminate litigation between the parties on the merits or dispose of the rights of the parties on a separate branch of the controversy. Rice, 230 Ill.App.3d at 992-93 [172 Ill. Dec. 826], 596 N.E.2d at 107. Rather, the dismissal of certain allegations under one theory of recovery merely determines which allegations under that theory are allowed to remain." Piagentini v. Ford Motor Co., 387 Ill.App.3d 887, 894, 327 Ill.Dec. 253, 901 N.E.2d 986 (2009).
This rule is persuasively illustrated in Rice v. Burnley, albeit in the context of Supreme Court Rule 304(a) (Ill.S.Ct. R. 304(a) (eff.Feb.26, 2010)):
"The statement of a single claim in multiple counts does not warrant a separate appeal upon the dismissal of one count. [Citations.] * * * [C]ounts II and IV, which are still viable, allege negligence for these defendants' failure to have smoke detectors in the common areas of the condominium building. Counts VII and VIII, which were dismissed, also alleged negligence, albeit based on different acts or omissions, for defendants' failure to ensure that there were smoke detectors in Burnley's condominium unit. As in Hull [v. City of Chicago, 165 Ill.App.3d 732, 117 Ill.Dec. 369, 520 N.E.2d 720 (1987)], the plaintiff here has advanced only one theory of recovery-negligence. For the plaintiff to recover under either counts II and IV or the dismissed counts VII and VIII, she must establish the same elements: duty, breach, and injury proximately resulting from the breach. (Compare Freeman v. White Way Sign & Maintenance Co., 82 Ill.App.3d [884] at 891 [38 Ill.Dec. 264, 403 N.E.2d 495 (1980) ] (determination that separate claims existed based on comparison of elements necessary *563 to establish a proper claim; claims of negligence and strict products liability constituted separate and distinct causes of action since different elements necessary to establish a proper claim in negligence action as opposed to a strict products liability action).) While the dismissed counts and the remaining counts deal with different acts or omissions, they advance the same theory of recoverynamely, negligenceand accordingly we conclude that the dismissal of counts VII and VIII did not determine the merits of a separate claim, and therefore is not a final order." Rice v. Burnley, 230 Ill.App.3d 987, 992, 172 Ill.Dec. 826, 596 N.E.2d 105.
"An examination of finality in the context of Rule 304(a) is the same as any other analysis of whether an order is final or nonfinal." Curtis v. Lofy, 394 Ill.App.3d 170, 185, 333 Ill.Dec. 41, 914 N.E.2d 248 (2009). That the factual allegations here appeared in two separate pleadings, as opposed to a single complaint, is also of no consequence since the allegations were made to advance a single theory of recovery: negligence based on defendants' alleged failure "to inform [plaintiffs] of all potential claims and causes of action they possessed or which might arise from the injuries in question." As the August Order barred only certain allegations in support of that theory, as opposed to the entire negligence claim, the August Order was not final.
¶ 8 Matejczyk v. City of Chicago, 397 Ill.App.3d 1, 337 Ill.Dec. 166, 922 N.E.2d 24 (2009), cited by defendants in support of a contrary conclusion, is unavailing:
"Matejczyk filed an initial complaint [in 2006], under circuit court number 06 L 11961, to recover for injuries he allegedly sustained while walking on a public sidewalk. Thereafter, Matejczyk filed a two-count, amended complaint. The City filed a motion to dismiss count II pursuant to section 2-619(a)(9) * * * as barred by the statute of limitations. On August 31, 2007, Judge Jeffrey Lawrence granted the City's motion to dismiss count II, with Matejczyk being granted leave to refile count II within 28 days. On September 5, 2007, Matejczyk instead filed a second amended complaint with a single count. The following day, Matejczyk voluntarily dismissed his one-count, second amended complaint. On September 18, 2007, Matejczyk filed, under circuit court number 07 L 9824, a new lawsuit with two counts in which he acknowledged the new action was a refiling of the complaint filed in 2006. Judge Diane Larsen granted the City's motion to dismiss the 2007 complaint on res judicata grounds; Matejczyk appeal[ed]." Id. at 2, 337 Ill.Dec. 166, 922 N.E.2d 24.
He argued, inter alia, that the dismissal of count II in the first action did not bar the second lawsuit because "in both the 2006 and 2007 lawsuits, he alleged only a single cause of action for negligence." Id. at 4, 337 Ill.Dec. 166, 922 N.E.2d 24. The court rejected that argument:
"While the negligence theory of recovery was shared by the two counts, the respective allegation in paragraph 3 of each count differed. It was Matejczyk that pled his cause of action in two counts, which the City properly addressed as distinct claims. Matejczyk should not be allowed on appeal to recast his first amended complaint into one that seeks to render pointless Judge Lawrence's ruling." Id.

The court further noted, "[h]ad Matejczyk not insisted on pursuing his negligence suit in two counts that offered him no greater chance of recovery, he would not be in the predicament he finds himself today." Id. at 12, 337 Ill.Dec. 166, 922 N.E.2d 24. Plaintiffs here did not file a multicount complaint. They filed a single-count complaint that the trial court dismissed with leave to replead. Matejczyk is inapposite.
*564 ¶ 9 "[A]n order dismissing a complaint but granting leave to replead is not a final order for purposes of res judicata until the trial court enters an order dismissing the suit with prejudice." Williams v. Ingalls Memorial Hospital, 408 Ill.App.3d 360, 364, 348 Ill.Dec. 468, 944 N.E.2d 421 (2011); Piagentini, 387 Ill.App.3d at 894, 327 Ill.Dec. 253, 901 N.E.2d 986. The August Order expressly allowed plaintiffs to replead the dismissed complaint, subsequent to which the lawsuit was dismissed without prejudice. The August Order was not final.
¶ 10 Defendants disagree, based on Hudson v. City of Chicago, 228 Ill.2d 462, 321 Ill.Dec. 306, 889 N.E.2d 210 (2008), and Rein v. David A. Noyes & Co., 172 Ill.2d 325, 334, 216 Ill.Dec. 642, 665 N.E.2d 1199 (1996), claiming once plaintiffs voluntarily dismissed the initial lawsuit "all orders [including the August Order] became final at that time." This argument fails. "While Hudson stands for the proposition that a voluntary dismissal terminates the suit in its entirety, rendering all final orders immediately appealable (Hudson, 228 Ill.2d at 468 [321 Ill.Dec. 306], 889 N.E.2d at 214)," it does not provide that "a nonfinal order becomes final upon voluntary dismissal of a suit." (Emphasis added.) Piagentini, 387 Ill.App.3d at 895, 327 Ill. Dec. 253, 901 N.E.2d 986. Rein is similarly distinguishable. It "stands for the proposition that a plaintiff who splits his claims by voluntarily dismissing and refiling part of an action after a final judgment has been entered on another part of the case subjects himself to a res judicata defense." (Emphasis added.) Hudson, 228 Ill.2d at 473, 321 Ill.Dec. 306, 889 N.E.2d 210. As there was no final order entered in the initial litigation here prior to plaintiffs' voluntary dismissal (supra ¶¶ 7-9), Rein and Hudson are inapposite. Res judicata does not apply. We reverse the trial court's dismissal of the instant lawsuit. We need not and do not reach the other grounds addressed by the parties.

¶ 11 CONCLUSION
¶ 12 The August Order was not final and thus does not bar the instant litigation. We reverse the trial court's dismissal of plaintiffs' complaint.
¶ 13 Reversed and remanded.
Presiding Justice FITZGERALD SMITH and Justice JOSEPH GORDON concurred in the judgement and opinion.
