delivered the opinion of the Court.
The defendant in this ease appeals from a judgment for the plaintiff and assigns, as grounds for reversal, the following two errors as committed by the lower court: In holding that it had jurisdiction to take cognizance of the second cause of action alleged in the complaint; and in ordering that his cross-complaint be stricken out.
In the first cause of action set up in the amended complaint, filed in November, 1927, it is alleged that the defendant subscribed and delivered to the plaintiff in November, 1926, several promissory notes maturing in 1927, one for $1,030.11 and all of them aggregating the sum of $3,141.83, as the purchase price of certain fertilizer delivered to him, which promissory notes have not been paid. It is stated in the second cause of action that the defendant had borrowed from the plaintiff the sum of $326.34, paid over by the plaintiff to several persons with the consent of the defendant for specified items.
The two causes of action set up by the plaintiff may be joined under section 104 of the Code of Civil Procedure, as both of them arise out of contracts; hence the total amount of the two claims should be taken into account for determining the jurisdiction of the court, as has been held by us in Ramírez v. Muñoz et al., 33 P.R.R. 350, and in Perea v. Castro, 25 P.R.R. 98.
In regard to the second error assigned we will say that the cross-complaint contains two causes of action. In the first it is sought to annul a mortgage deed executed by the *154defendant in favor of the plaintiff on June 17, 1922, and the proceedings for the foreclosure thereof pending in another district court; also a review and examination under the supervision of the court of the current account existing between the parties since 1922, in order that the court may ascertain the true balance of such account and order the payment thereof by the party legally owing it.
It is alleged in the second cause of action that from 1924-to 1926 the cross-complainant rendered services to the cross-defendant in the sale of chemical fertilizers upon the promise-of the former to pay to the latter a liberal commission, which has not been paid, and that his services are reasonably valued at two thousand dollars per year.
Section 110 of the Code of Civil Procedure provides that the answer of the defendant shall contain a general or specific denial of the material allegations of the complaint controverted by the defendant and a statement of any new matter-constituting a defense or counterclaim. Section 111 prescribes that said counterclaim must be one existing in favor of the defendant and against the plaintiff, between whom a several judgment might be had in the action, and arising out of one of the following causes of action: (1) A cause of action arising out of the transaction set forth in the complaint, as the foundation of the plaintiff’s claim, or connected with the subject of the action; (2) in an action arising upon contract, any other cause of action arising also upon contract and existing at the commencement of the action.
The several cross-demands set up by the defendant in the first cause of action of his cross-complaint seeking the nullity of the mortgage executed by him as well as of the foreclosure proceeding, which is being prosecuted in another court, and that the account between the parties be liquidated, can not be pleaded by way of cross-complaint under the code above-cited, because they do not arise out of the transaction set forth in the complaint as the foundation thereof, which is the recovery of a debt evidenced by promissory notes, nor *155are they connected with the subject of the action, nor do they arise out of a contract between the parties.
It is otherwise as regards the allegations-set forth in the second cause of action of the cross-complaint, for it arising upon a contract for services rendered by the cross-complainant to the cross-defendant, the reasonable value of which he claims, and said cause having existed prior to the commencement of the action, it lies under subdivision 2 of section 111 already quoted, even though the value of such services has not been determined. 1 Bancroft’s Pleading, p. 553. Of course, we are only holding that in an action of debt there may be pleaded by way of cross-complaint a cause of action of the defendant for the recovery of compensation under a contract of employment.
The judgment appealed from must be reversed and the . case remanded to the lower court for further proceedings not inconsistent with this opinion.
Mr. Justice Wolf took no part in the decision of this case.