
    461 A.2d 304
    Daniel J. KREIDER, Appellant v. Walter H. KLEINFELTER and Jennie Kleinfelter. Daniel J. KREIDER v. Walter H. KLEINFELTER and Jennie Kleinfelter, Appellants.
    Superior Court of Pennsylvania.
    Argued Jan. 7, 1981.
    Filed June 3, 1983.
    
      Thomas P. Harlan, Lebanon, for appellant (at No. 2016) and for appellee (at No. 2109).
    Loren H. Schrum, Lebanon, for appellants (at No. 2109) and for appellees (at No. 2016).
    Before PRICE, WIEAND and HOFFMAN, JJ.
   HOFFMAN, Judge:

Appellant contends that the lower court erred in granting appellees’ motion for judgment on the pleadings based on res judicata. We agree that the requirements for res judicata have not been met and, accordingly, reverse and remand for proceedings consistent with this opinion.

In the summer of 1976, appellees allegedly entered into an oral contract with Allen L. Brown, appellant’s employee, whereby Brown would receive a commission if he secured a purchaser for appellees’ real estate and business. On August 31, 1977, after producing a buyer and unsuccessfully attempting to collect his fee, Brown filed suit against appellees. In response to appellees preliminary objections, the lower court dismissed Brown’s complaint because he was not a licensed real estate broker. Thereafter, Brown filed a motion to amend his complaint, seeking to join appellant, a licensed broker, as a voluntary plaintiff. Appellees’ preliminary objections challenging the timeliness of the attempted amendment were sustained. On appeal to this Court, we affirmed. Brown v. Kleinfelter, 267 Pa. Superior Ct. 144, 406 A.2d 560 (1979).

Appellant filed suit, seeking Brown’s commission, on February 8, 1980. Appellees counter-claimed for costs and fees and motioned for judgment on the pleadings alleging that the action (1) was barred by the statute of limitations; (2) violated professional ethical standards; and (3) was brought in bad faith because of appellant’s knowledge of the earlier suit. The court granted the motion finding appellant’s suit barred by res judicata, and dismissed appellee’s counterclaim for costs and fees. This appeal followed.

Appellant contends that judgment on the pleadings was inappropriate because the requirements of res judicata were not met. We agree. Res judicata involves the effect of one judgment on a subsequent proceeding. Notoro v. Hyer Estate, 239 Pa. Superior Ct. 10, 361 A.2d 766 (1976). For a later action to be wholly barred, there must be a concurrence of four elements:

(1) an identity of the thing sued upon;
(2) an identity of the cause of action;
(3) an identity of the persons and parties to the action; and
(4) an identity of the quality or capacity of the parties suing or sued.

Dunham v. Temple University of the Commonwealth System of Higher Education, 288 Pa. Superior Ct. 522, 527, 534, 432 A.2d 993, 999 (1981); see Schubach v. Silver, 461 Pa. 366, 336 A.2d 328 (1975); Del Boring Tire Services, Inc. v. Barr Machines, Inc., 285 Pa. Superior Ct. 66, 426 A.2d 1143 (1981).

Even if we assume a concurrence of the first three identities, we cannot agree that as between appellant and Brown there is “an identity of the quality or capacity of the parties suing____” Dunham v. Temple University of the Commonwealth System of Higher Education, supra, 288 Pa. Superior Ct. at 534, 432 A.2d at 999. Section 16 of the Real Estate Brokers License Act provides:

No action or suit shall be instituted nor recovery therein be had, in any court of this Commonwealth, by any person, copartnership, association or corporation for compensation for any act done or service rendered, the doing or rendering of which is prohibited under the provisions of this act to others than licensed real estate brokers, unless such person, copartnership, association or corporation was duly licensed.

Act of May 1, 1929, P.L. 1216, § 16, 63 P.S. § 446, repealed as of February 19, 1980, P.L. 15, No. 9, § 901. Courts have interpreted this section “as precluding any recovery of a commission, fee, or other consideration, by anyone who without a license acts as a broker in a transaction involving real estate.” Burke v. Israel, 264 Pa. Superior Ct. 286, 290, 399 A.2d 779, 781 (1979). See Verona v. Schenley Farms Co., 312 Pa. 57, 167 A. 317 (1933); Harrison v. Soffer, 221 Pa. Superior Ct. 275, 289 A.2d 752 (1972). If a licensed real estate salesperson, employed by a licensed real estate broker, negotiates a real estate transaction, only the broker has the capacity to sue for an unpaid commission. If a licensed salesperson or any unlicensed person sues for a commission owed, the underlying agreement or contract may not be enforced in his favor. See Burke v. Israel, supra (obtaining a license is a condition precedent to the enforcement of an agreement); Kusche v. Vulcanized Rubber and Plastics Co., Inc., 416 Pa. 364, 206 A.2d 40 (1965); Burns v. Gartzman, 139 Pa. Superior Ct. 453, 11 A.2d 708 (1939).

Although only a licensed broker may sue on a contract, either a licensed broker or a licensed salesperson may engage in the business of transacting real estate. 63 P.S. § 436(a). Therefore, a determination that an agreement is unenforceable because of the absence of a broker’s license, applies to the ability of the party to sue and not to the invalidity or validity of the underlying agreement.

Although Brown had no standing to sue for the commission, his inability does not affect appellant’s statutory capacity to sue or the validity or enforceability of the underlying agreement. Therefore, the actual determination that must be made, in light of appellant’s and Brown’s differing capacities to sue, is whether Brown was a licensed salesperson at the time the alleged agreement was made. If Brown was licensed, then the merits of the action, the existence and enforceability of the alleged contract, must be reached because of his capacity to enter into a real estate contract. If, on the other hand, Brown was not a licensed salesperson, the alleged contract would be wholly void and unenforceable as to any party, pursuant to a statutory inability to enter into the agreement. 63 P.S. § 436(a). See n. 6.

Based on the foregoing analysis, we find that the lower court erred in granting judgment on the pleadings. The identity of a capacity to sue, required for res judicata, has not been met. Accordingly, we reverse the order of the lower court and remand for proceedings consistent with this opinion.

Reversed and remanded.

JURISDICTION IS RELINQUISHED.

PRICE, J., did not participate in the consideration or decision in this case. 
      
      . Appellees have not appealed from the dismissal of their counterclaim.
     
      
      
        . A motion for judgment on the pleadings, pursuant to Pa.R.Civ.P. 1034, "may be granted in cases which are so free from doubt that a trial would clearly be fruitless exercise.” Bata v. Central-Penn National Bank of Philadelphia, 423 Pa. 373, 378, 224 A.2d 174, 178 (1966).
     
      
      . Appellant’s contention that the lower court’s action was improper because res judicata was not affirmatively pleaded by appellees as required by Pa.R.Civ.P. 1030, is meritless. In a motion for judgment on the pleadings, the court may only consider the pleadings themselves and any attachments thereto. Bata v. Central-Penn National Bank of Philadelphia, supra; Johns v. Castellucci, 264 Pa. Superior Ct. 591, 401 A.2d 753 (1979). Appellees’ new matter states that ”[t]he actions of the Plaintiff in joining this suit are malicious, vexatious and capricious because he was aware of a prior action involving ALLEN L. BROWN which was dismissed____" (Answer at 3, ¶ 16) (emphasis added). We find that the pleadings sufficiently preserved the issue for the lower court’s review.
     
      
      . A real estate salesperson includes "any person employed by a licensed real estate broker to list for sale, sell or offer for sale, to buy or offer to buy, or negotiate the purchase or sale or exchange of real estate, or negotiate a loan on real estate, or to lease or rent, or offer to lease, rent or place for rent, any real estate, or collect or offer, or attempt to collect, rent for the use of real estate, for or in behalf of such real estate broker____”63 P.S. § 432(b). The salesperson must also have a license. 63 P.S. § 436(a). A real estate broker is defined in 63 P.S. § 432(a).
     
      
      . Section 445(b) of the Real Estate Brokers License Act provides that “[n]o real estate salesperson] shall accept or receive compensation of any kind from any person, other than the licensed real estate broker by whom he is employed, for any service rendered or work done by such salesman in buying, selling, exchanging, leasing or negotiating a loan upon real estate or interest therein.” 63 P.S. § 445(b). Therefore, if a suit is necessary to collect a fee, the broker must first sue and then pay the salesperson the amount due him.
     
      
      . Section 436(a) prohibits anyone besides a licensed broker or salesperson "from engag[ing] in or carry[ing] on the business or act[ing] in the capacity of a real estate broker, or a real estate salesperson] ... without first obtaining a license."
     
      
      . The record does not indicate whether the lower court made a determination as to Brown's employment status. Appellant alleges in both his Memorandum supporting his motion for reconsideration of judgment on the pleadings (at 6) and in his brief to our Court (at 21-22) that Brown was, at all times pertinent to this action, a licensed salesperson employed by him.
     
      
      . We find appellees’ contention, that appellant’s action was barred by the statute of limitations, meritless. The Judiciary Act of 1978 provided for a four year statute of limitations for oral contract actions. 42 Pa.C.S.A.. § 5525(3). The Judicial Code, § 25(a), states that in any civil action or proceeding:
      (1) the time heretofore limited by statute for the commencement of which is reduced by any provision of this act; and
      (2) which is not fully barred by statute on the day prior to the effective date of this act; may be commenced within one year after the effective date of this act or within the period heretofore limited by statute, whichever is less ----
      
        Act of July 9, 1976, P.L. 586, No. 142. In the instant case, the agreement was allegedly entered into on August 2, 1976. Appellant’s action was brought on February 8, 1980. The new four-year statute of limitations was effective as of June 28, 1978. Appellees claim that because one year past the statute’s effective date is a lesser time period than the four years provided in the statute, appellant’s action should have been filed by June 27, 1979. This rather simplistic interpretation has no foundation, as the legislature could not have intended that a claimant’s time in which to bring an action, once six years and now four years, would be further reduced to one year. We interpret the act to allow those claimants whose six years were reduced to four years, and whose four years had already run, one year past the effective date of the act in which to bring the action. See Wilson v. Central Penn Industries, Inc., 306 Pa.Superior Ct. 146, 452 A.2d 257 (1982).
     