*647The appeal from the order dated January 26, 2011, must be dismissed because the right of direct appeal therefrom terminated with the entry of the judgment (see Matter of Aho, 39 NY2d 241, 248 [1976]). The issues raised on the appeal from the order are brought up for review and have been considered on the appeal from the judgment (see CPLR 5501 [a] [1]).
The Supreme Court properly granted the plaintiffs motion to dismiss the counterclaims to recover damages for, among other things, legal malpractice. The failure of a party to disclose a cause of action as an asset in a prior bankruptcy proceeding, which the party knew or should have known existed at the time of that proceeding, deprives him or her of “the legal capacity to sue subsequently on that cause of action” (Whelan v Longo, 23 AD3d 459, 460 [2005], affd 7 NY3d 821 [2006]; see Dynamics Corp. of Am. v Marine Midland Bank-N.Y., 69 NY2d 191, 195-196 [1987]; Santori v Met Life, 11 AD3d 597, 599 [2004]; 123 Cutting Co. v Topcove Assoc., 2 AD3d 606, 607 [2003]).
Here, it is undisputed that the defendant did not disclose, in a bankruptcy petition that he filed in September 2007, the existence of the causes of action he now asserts as counterclaims. The plaintiff showed, prima facie, that at the time of the filing of that petition the defendant knew or should have known of the existence of those causes of action, and the defendant failed to raise a triable issue of fact in opposition to that prima facie showing (see Wright v Meyers & Spencer, LLP, 46 AD3d 805 [2007]; Hansen v Madani, 263 AD2d 881, 883 [1999]; see also Whelan v Longo, 23 AD3d at 460). Further, under the circumstances of this case, the fact that the defendant’s bankruptcy petition was later dismissed does not change this result (see Nationwide Assoc., Inc. v Epstein, 24 AD3d 738, 739 [2005]; see also Kunica v St. Jean Fin., Inc., 233 BR 46, 53-54 [SD NY 1999]). Moreover, although the defendant stated in his opposition to the plaintiff’s motion that, in 2010, he filed a second bankruptcy petition in which he did disclose his malpractice cause of action, in support of that claim he submitted only a single page of the Schedule of Assets from that petition. He also submitted no evidence as to the ultimate disposition of the second bankruptcy petition. He therefore failed to raise a triable issue of fact as to whether he regained his capacity to assert his legal malpractice claims against the plaintiff by filing the second bankruptcy petition (see Nationwide Assoc., Inc. v Epstein, 24 AD3d at 739).
*648The Supreme Court properly denied the defendant’s motion for leave to amend his counterclaims in light of his lack of capacity to assert those counterclaims (see Putnam County Sav. Bank v Aditya, 91 AD3d 840, 841-842 [2012]; Romano v Damiano, 242 AD2d 267, 268 [1997]).
The Supreme Court did not err in granting the plaintiffs motion for summary judgment on the issue of liability on its causes of action to recover damages for breach of contract and unjust enrichment. The plaintiff made a prima facie showing of entitlement to judgment as a matter of law on the issue of liability as to those causes of action, and the defendant did not raise a triable issue of fact in opposition (see Law Offs. of Clifford G. Kleinbaum v Shurkin, 88 AD3d 659, 660 [2011]; Pryor & Mandelup, LLP v Sabbeth, 82 AD3d 731, 732 [2011]). Rivera, J.P., Dickerson, Leventhal and Cohen, JJ., concur.