Dismissal thereunder Sec. 2, Rule 17 is without prejudice, except when otherwise stated in the motion to dismiss or when stated to be with prejudice in the order of the court. On a parity of rationale, the same rule should apply to a counterclaim duly interposed in an Answer and which is likewise dismissed but not on the merits thereof.

* * * * * * * * * * *

Facts:

Ziga filed a complaint for rescission of a contract of lease over a parcel of land against Meliton on the ground of breach of contract. She alleged that Meliton failed to pay the monthly rentals due, constructed a concrete wall and roof on the leased premises and subleased the property without her consent. 

Meliton filed an answer and set up counterclaims for the recovery of the value of her kitchenette constructed on the leased parcel of land and which was demolished by Ziga. 

Subsequently, Ziga filed a motion to dismiss her complaint alleging that her cause of action had become moot and academic by the expiration of the lease contract. The RTC dismissed the complaint. The counterclaims of Meliton were also dismissed for non-payment of docket fees. 

Meliton later filed a complaint against Ziga for the recovery of the amounts involved in her counterclaims. Ziga filed a motion to dismiss on the ground that the cause of action was barred by prior judgment.

The RTC denied the motion on the ground that the dismissal of the counterclaims in the earlier case is not an adjudication on the merits as the court did not acquire jurisdiction over the counterclaims for failure of Meliton to pay the docket fees, hence the said dismissal does not constitute a bar to the filing of the later complaint. 

The CA reversed the RTC's decision and ordered the dismissal of the case stating that the failure of the respondents to seek a reconsideration of the dismissal of their counterclaim or to take an appeal therefrom rendered the dismissal final. Such dismissal barred the prosecution of their counterclaim by another action.


Issues:

1. Whether or not the counterclaims of petitioners are compulsory in nature

2. Whether or not petitioners, having failed to seek reconsideration of or to take an appeal from the order of dismissal of their counterclaims, are already barred from asserting the same in another action.


Held:

1. The counterclaims of petitioner are compulsory in nature. 

Section 4 of Rule 9 of the Rules of Court provides that a counterclaim is compulsory if (a) it arises out of, or is necessarily connected with, the transaction or occurrence which is the subject matter of the opposing party's claim; (b) it does not require for its adjudication the presence of third parties of whom the court cannot acquire jurisdiction; and (c) the court has jurisdiction to entertain the claim.

The "one compelling test of compulsoriness" is the logical relationship between the claim alleged in the complaint and that in the counterclaim, that is, where conducting separate trials of the respective claims of the parties would entail a substantial duplication of effort and time, as where they involve many of the same factual and/or legal issues.

In the aforesaid Civil Case No. 88-1480, all the requisites of a compulsory counterclaim are present. The counterclaims are logically related to the complaint. Private respondents's complaint was for rescission of the contract of lease due to petitioner's breach of her obligations under the said contract. On the other hand, Petitioner's counterclaims were for damages for unlawful demolition of the improvements she introduced pursuant to her leasehold occupancy of the premises, as well as for the filing of that civil suit which is contended to be clearly unfounded.

Both the claims arose from the same contract of lease. The rights and obligations of the parties, as well as their potential liability for damages, emanated from the same contractual relation. That contract of lease pleaded by private respondentconstitutes the foundation and basis relied on by both parties for recovery of their respective claims.


2. Petitioners are not barred by res judicata.

In order that a prior judgment will constitute a bar to a subsequent case, the following requisites must concur: (1) the judgment must be final; (2) the judgment must have been rendered by a court having jurisdiction over the subject matter and the parties; (3) the judgment must be on the merits; and (4) there must be between the first and second actions, identity of parties, of subject matter, and of causes of action. 

The first case, Civil Case No. RTC 88-1480, was dismissed upon motion of private respondent, plaintiff therein, under Section 2 of Rule 17. Dismissal thereunder is without prejudice, except when otherwise stated in the motion to dismiss or when stated to be with prejudice in the order of the court. The order of dismissal of the first case was unqualified, hence without prejudice and, therefore, does not have the effect of an adjudication on the merits. On a parity of rationale, the same rule should apply to a counterclaim duly interposed therein and which is likewise dismissed but not on the merits thereof.

In the order of dismissal of the complaint, the counterclaims of herein petitioners were dismissed by reason of the fact the court a quo had not acquired jurisdiction over the same for non-payment of the docket fees. The said dismissal was without prejudice, since a dismissal on the ground of lack of jurisdiction does not constitute res judicata,  there having been no consideration and adjudication of the case on the merits.

The dismissal of the case without prejudice indicates the absence of a decision on the merits and leaves the parties free to litigate the matter in a subsequent action as though the dismissal action had not been commenced. The discontinuance of a case not on the merits does not bar another action on the same subject matter. Evidently, therefore, the prior dismissal of herein petitioners' counterclaims is not res judicata and will not bar the filing of another action based on the same causes of action. (Sps. Lydia and Virgilio Meliton vs. Court of Appeals, G.R. No. 101883 December 11, 1992)