On November 29, 1915, respondent filed an amended complaint in this action, theretofore commenced against appellant T. B. Reed & Co., a corporation, and T. B. Reed and Grace E. Reed, alleging in substance the corporate character of appellant, that T. B. and Grace E. Reed are husband and wife, that on the 23d of May, 1913, respondent and appellant entered into an agreement that the First National Bank of Lewiston should hold a deed from respondent to appellant to certain property, and that appellant should pay to the bank for respondent’s credit $350, with interest at seven per cent from January 1st, 1913, also the principal and interest of three promissory notes inclosed with the deed, each for the sum of $808.35, dated January 12, 1912, bearing interest at eight per cent per annum, payable semi-annually, due respectively in one, two and three years, with the stipulation that the interest had been paid to January 12, 1913, that $150 had been paid on the principal and that Reed & Co. were to make all payments in instalments of not less than $50 per month, on or before the 15th day of each and every month until the whole should be paid; with the further stipulation that until default in such payments, or the abrogation of the agreement, no action should be instituted by Brown on the notes and that the agreement extended the time of payment thereon. Upon completion of the payments the bank was to deliver the notes and deed to appellant. That prior to the making of and entering into the agreement appellant was indebted to Brown for amounts advanced to appellant at its request; that the sums so advanced were included in the notes; that at that time Brown executed a warranty deed to lot 14, block 2, of the town of Pierce, Clearwater county, in favor of appellant and placed it in the envelope referred to in the *532agreement in the bank; that appellant executed and placed in said envelope the three promissory notes in an amount sufficient to cover the indebtedness due Brown and the purchase price of the lot, and that these notes were held by the bank. That pursuant to the agreement appellant had made the payments until about the month of March, 1915, when it failed and refused to make any further payments on the notes. About that time appellant sold and disposed of its entire mercantile business in bulk to Erb Bros, and received as purchase price $385 cash and certain real property in the city of Lewiston. That under the terms and conditions of the agreement there was a balance due to respondent of $1,566.70; appellant was declared in default; the deed was tendered to appellant; and it was asked that the notes and agreement be foreclosed as an equitable mortgage and respondent have a deficiency judgment. The complaint contained a second cause of action having no bearing upon the points here decided.
An answer to this amended complaint was filed by appellant, the allegations of which are not material here. At the same time appellant filed a cross-complaint against Brown alleging its corporate character, the execution and delivery of the notes above described on the 12th day of January, 1912, that “the full and entire consideration for each of said notes was capital stock of the said corporation, purchased by the said corporation from the said plaintiff at a time, to wit, January 12th, 1912, and theretofore, when the said corporation was insolvent and unable to pay its indebtedness in due course of business, contrary to section 2732 of the codes of 1909 of Idaho; that the corporation, then and there, had no power or authority to purchase the said capital stock of the said corporation from the said plaintiff and no power or authority to execute and deliver the said notes to the plaintiff. ’ ’ That the corporation attempted to execute notes for this stock in the total amount of $2,425.05 and to release Brown from an indebtedness to the corporation of $74.95, making the total purchase price of the stock $2,500; that appellant had paid $1,168.95 on these alleged void notes, that at the time of the *533pretended purchase of said stock Brown was a director of the appellant corporation, that the notes mentioned in respondent’s amended complaint are the same notes described in the cross-complaint, and among other things demanded judgment for $1,168.95 alleged to have been wrongfully paid upon the notes and for an accounting. Grace E. Reed filed a separate answer to the amended complaint, the allegations of which are not material here.
On the 27th of March, 1916, Brown’s demurrer to the cross-complaint on the ground that it did not state facts sufficient to constitute a cause of action was overruled, and on the same day Brown was given thirty days within which to file another amended complaint; on the 18th day of April, 1916, the clerk entered the default of Brown for failure to answer the cross-complaint. On the 15th day of May, 1916, Brown filed a second amended complaint setting up substantially the same matters contained in his amended complaint coupled with additional allegations. On Sept. 7, 1916, appellant, and T. B. Reed and Grace E. Reed filed an answer to the second amended complaint consisting of specific denials; the fourth paragraph thereof alleged affirmatively “that the only consideration for the notes and the said agreement .... was and is the purchase price of capital stock of the said T. B. Reed & Co., a corporation, which the said corporation attempted to purchase from the said plaintiff, who was then and there the owner of the said capital'stock,” and prayed that the plaintiff’s action be dismissed “and for the relief severally and separately to which each answering defendant is entitled.”
On the 9th of October, 1916, Brown filed a motion to dismiss the action at his own cost. The motion was granted and judgment dismissing the action was filed the same day. This appeal is from the judgment.
The assignments are that the court erred in dismissing the entire action over appellant’s objection and in refusing to enter judgment on the default on the cross-complaint.
So far as the second amended complaint and the answer thereto are concerned the judgment of dismissal was proper. The Revised Codes provide:
*534“Sec. 4354. An action may be dismissed, or a judgment of nonsuit entered, in the following cases: 1. By the plaintiff himself, at any time before trial, upon the payment of costs; Provided, a counterclaim has not been made or affirmative relief sought by the cross-complaint or answer of defendant.....”
No allegations. are contained in the answer to the second amended complaint which would entitle appellant to any affirmative relief. The denials certainly would not, and the affirmative allegation that the only consideration for the notes was the attempted purchase by the corporation of its own stock, standing alone, could accomplish no further relief than to defeat respondent’s right to recover upon the notes. This is not affirmative relief in any legal sense of the term.
With respect to the cross-complaint, however, the case presents a very different situation. This pleading responds to the requirements of a cross-complaint as defined by our statute. It seeks affirmative relief against the party bringing the action, and it relates to or depends upon the contract or transaction upon which the original action was brought. (Rev. Codes, sec. 4188; Hunter v. Porter, 10 Ida. 72, 77 Pac. 434; Western Loan etc. Co. v. Smith, 12 Ida. 94, 85 Pac. 1084.) It is well settled that a cross-complaint stands as an independent action, must be met or answered the same as an original complaint, and a dismissal by the plaintiff of his action does not carry with it a dismissal of the action based upon the cross-complaint, but defendant is entitled to have the issues raised therein determined upon the merits. (Hunter v. Porter, supra; Western Loan etc. Co. v. Smith, supra; Mott v. Mott, 82 Cal. 413, 22 Pac. 1140; Warner v. Darrow, 91 Cal. 309, 27 Pac. 737; Washington Natl. Building Loan & Inv. Assn. v. Saunders, 24 Wash. 321, 64 Pac. 546.)
We come now to a consideration of the allegations of the cross-complaint. The amended complaint against which the cross-complaint was interposed sets up a cause of action founded upon an alleged transaction out of which grew the giving of the notes therein described. The cross-complaint also sets up an alleged transaction out of which grew the *535giving of the same notes. It is not for us to determine at this stage of the proceeding which, if either, set of facts is correct. Whatever the real agreement or contract between the parties may have been, for the purpose of determining the validity of the cross-complaint as such, we are bound to assume that the deal which culminated in the giving of the notes is the “transaction upon which the action is brought.” The cross-complaint expressly relates to and depends upon that transaction, whatever it may have been in fact, and for the purpose of determining the standing of the cross-complaint under the order of dismissal the facts therein alleged must be taken to be true, — that is, that the notes were given by plaintiff to Brown for the purchase of his stock in the appellant corporation at a time when the latter was insolvent and that appellant had paid $1,168.95 on the notes.
While there is a conflict in the authorities as to the capacity of a corporation to purchase its own stock, the rule appears to be universal that such a purchase is void if made while the corporation is insolvent. (Coleman v. Tepel, 230 Fed. 63, 144 C. C. A. 361.) The leading cases touching this doctrine are collected in notes to Hall v. Henderson, 61 L. R. A. 621; McGregor v. Fitzpatrick, 25 L. R. A., N. S., 50; Tiger v. Rogers Cotton Cleaner & Gin Co., 30 L. R. A., N. S., 694; Schulte v. Boulevard Gardens Land Co., 44 L. R. A., N. S., 156; Lefker v. Harner, L. R. A. 1916F, 281.
From what has been said it follows that the judgment of dismissal as to the cross-complaint was erroneous and the action thereon must be reinstated. Under the circumstances, however, we think it should be left to the discretion of the trial court to determine whether or not the default should be set aside and respondent Brown be permitted to answer the cross-complaint upon a proper showing. Reversed and remanded. Costs are awarded to appellant.
Morgan and Rice, JJ., concur.