
    (December 31, 1892.)
    FIRST NATIONAL BANK OF HAILEY v. BEWS et al.
    [31 Pac. 816.]
    Suit upon Promissory Note — Mortgage to Secure Same — -Mortgagees Given Possession op Property — How Parties to be Brought in to Determine Bights — Agreement as to Payment.— 1. Where the answer admits the making of the note sued on, and alleges by sufficient averments that a mortgage was given to secure said note, and to further secure the same, entered into an agreement to give the holder of the note and the mortgagees possession of a valuable property, with authority to collect the rents, to keep said property insured, and in case of loss by fire to collect the insurance and pay, first, all taxes, premiums on insurance, and then the note and interest thereon; that they took possession thereof and collected the rents; that the property was consumed by fire, and that plaintiffs and mortgagees collected said insurance; that the amount so collected far exceeded all demands, and that said note was fully paid from said funds, the said answer sets up a complete plea of payment and setoff, and proof thereof should be permitted.
    To Determine Bights op Parties, How Brought in. — 2. Where it appears either from the pleadings or proof that a complete determination of the rights of all the parties cannot be made without making other persons parties, it is the duty of the court to order such persons brought in, and should permit the defendant to file a cross-bill for that purpose. Appeal for fourth judicial district, Alturas County. Judgment received.
    (Syllabus by the court.)
    APPEAL from District Court, Alturas County.
    A. F. Montandon, for Appellants.
    Plaintiff, not demurring to new matter in the answer, is deemed to have denied it. (Code, sec. 4217; Williams v. Dennison, 94 Cal. 540, 29 Pae. 946.) A plea in abatement is waived by pleading to the merits. (Railroad Co. v. Harris, 12 Wall. 65; Bell v. Railroad Co., 4 Wall. 598.) A pleading to the merits admits the capacity to sue. (Society v. Pawlet, 4 Pet. 480; Teaton v. Lynn, 5 Pet. 224; Livingston v. Story, 11 Pet. 351; Kane v. Paul, 14 Pet. 33; Pullman v. Upton, 96 H. S. 328.) A plea of nonassumpsit waives a plea to the jurisdiction for lack of proper parties. (Evans v. Gee, 11 Pet. 80; Bailey v. Dozier, 6 How. 23; Sims v. Hundley, 6 How. 1.)
    Angel & Loy, for Eespondent.
    A counterclaim must be a claim existing in favor of a defendant and against a plaintiff between whom a several judgment might be had in the action. (Eev. Stats., sec. 4184; Stearns v. Martin, 4 Cal. 227; Naglee v. Palmer, 7 Cal. 543; Howard v. Shores, 20 Cal. 282; Cook v. Davis, 22 Cal. 158; Corwin v. Ward, 35 Cal. 195, 95 Am. Dee. 93; Hook v. White, 36 Cal. 299; McGuire v. Lamb, 2 Idaho, 377, 17 Pac. 749.) Any person may be made a defendant who claims an interest in the controversy adverse to the plaintiff, or who is a necessary party to a complete determination or settlement of the question involved therein. (Code Civ. Proc., see. 4102.)
   MORGAN, J.

Plaintiff, a corporation, brought suit against the defendants upon a promissory note for $5,000, and allege (1) that plaintiff is a corporation; (2) that defendants were partners; that defendants, on the twenty-ninth day of August, 1887, for value received, made, executed, and delivered to Mc-Cornick & Co., bankers at Hailey, Idaho, their certain promissory note in writing, dated on said last-mentioned day — and insert a copy of the note, which is in the usual form; that thereafter, before the commencement of this suit, said note was duly assigned to the plaintiff, who is now the lawful owner and holder thereof; that said note has not, nor any part thereof, been paid; and pray for judgment for note, interest, and costs of suit. ■

Defendant O. R. Young, by leave of the court, files his amended answer, as follows:

“AMENDED ANSWER.
“0. R. Young, by leave of court first had and obtained, files his amended answer herein, and says: 1. That, at the time of the execution of the note sued upon in this action, defendants therein also executed a like note for the same amount to the firm of Willman & Walker, then of Hailey, Idaho, and secured the payment of both said notes by then and there executing their mortgage to plaintiff's assignor and said firm of Willman & Walker, jointly, for the amount of both of said notes, on their certain real property then known as the ‘Hailey Merchants' Hotel,' consisting of lots 19 and 20, of block 40, of the town of Hailey, with the improvements thereon, the whole thereof being then worth much over $40,000. 2. That about the first day of June, 1888, the note sued upon in this action was assigned to plaintiff, and thereby it became the owner and holder of the same, and to the extent of said note is also owner in the mortgage aforesaid. 3. That, to further secure said mortgagees and this plaintiff, on or about June 24, 1888, defendants aforesaid entered into an agreement with said mortgagees and this plaintiff to the following effect: That said mortgagors would put said mortgagees and this plaintiff in possession of said property, with power to use or rent the same for the benefit of mortgagors, by using or renting the same to best advantage, and apply the proceeds thereof, first in payment of taxes legally levied and assessed thereon, next in keeping said property insured to an amount of not less than $25,000, and then apply any overplus remaining after payment of taxes and premium on insurance aforesaid, first to the interest accruing on the said notes, and next toward the principal, and thus on, until all of said notes be fully satisfied; and in case of loss by fire before said notes were paid, then to apply so much of the insurance aforesaid as would be necessary to satisfy the same. 4. Thereupon said mortgagees and this plaintiff did agree with said mortgagors, defendants herein, to use or rent said property, collect the rents, pay the taxes, insure and keep the same insured for $25,000, pay the interest and principal thereout, or out of the insurance, in the manner and form as stated in the third paragraph of this answer. 5. Thereupon, and the said mortgagees and this plaintiff having accepted and agreed to do and perform the matters and things as in said paragraph 4 of this answer stated and contained, and in consideration thereof, said mortgagees and this plaintiff were duly put in possession of the property aforesaid, and from said day, and continuously thereafter, said mortgagees and this plaintiff were and remained in possession of the same, used, rented and collected the rents thereof, and applied the same to their own use. 6. That the income aforesaid, collected as aforesaid, for the purpose aforesaid, largely exceeded the possible taxes and insurance premium aforesaid. 7. That on July 2d, and during mortgagees’ and plaintiff’s possession aforesaid, said property was consumed by fire and was a total loss, and the insurance money which mortgagees and this plaintiff did recover under the insurance aforesaid, together with the rents collected, as aforesaid, largely exceeds any possible amount of both principal and interest on both of the notes aforesaid, and the same are fully paid, and a large amount over and above the same is due defendants. 8. Defendant has no positive knowledge that plaintiff did actually receive any insurance after the loss of the said property by fire, or that plaintiff insured the said property at all, but he avers that the said property was consumed by fire through a general conflagration of the town of Hailey, and the same did not originate on said premises at all; that he is informed, and believes said information, that all risks covered by insurance at said time were fully paid, and therefore alleges the fact to be that all risks of insurance against the said premises, which thereon then and there existed, were fully paid. 9. By the agreement aforesaid, and plaintiff’s possession thereunder as aforesaid, plaintiff solemnly agreed to and with defendant to keep the said premises insured against loss by fire during his said possession of the same, for not less than the sum of $25,000, and to pay itself thereout, and the other aforesaid mortgagees, any amount that in the event might then remain due on the notes aforesaid, and to turn the whole thereof to defendants’ account and benefit, holding nothing to itself thereout but the principal and interest due at that time on the note sued upon in this action; and if plaintiff actually neglected to cause to be insured, and keep insured, the said property as aforesaid, for the amount aforesaid, then plaintiff is liable to defendants for such neglect in the sum of $25,000. 10. Defendant never had any accounting or payment whatever by plaintiff or the other said mortgagees, either as regards the uses and benefits derived by them from the possession of the said premises, nor of the rents thereof collected as aforesaid, nor of the insurance aforesaid. Wherefore defendant prays for judgment that plaintiff account to defendant for all rents, issues, and profits it derived from the possession and during the possession of the said premises, for all insurance recovered by it, or, if it neglected to insure, then for damages for such neglect; and, after deducting therefrom the note sued upon in this suit, then for judgment for any balance found due this defendant, and for general relief.
“A. F. MONTANDON, “Attorney for Defendant, O. R. Young.
“[Duly verified.] Filed February 19, 1892.”

Paragraphs 9 and 10 of the answer are in the nature of a cross-bill for an accounting and for damages, are not properly a part of the answer, are not well pleaded, and must be rejected, as the case now stands, as surplusage. The cause of action therein attempted to be set up must be set up in the form of a cross-bill separate and distinct from the answer, and stating a complete cause of action in itself, making the said Willman & Walker codefendants, and praying that they may be brought in, and for an accounting and damages. Defendant pleads, first, that defendants made this note, and another of like amount, to Willman & Walker; that they secured both notes by mortgage to plaintiff’s assignor and the said Willman & Walker, upon what was called the “Merchants’ Hotel Property,” then worth .$40,000; admits assignment of the MeCornick note to plaintiff herein; alleges that, to further secure the aforesaid notes, the defendants entered into an agreement with the mortgagees and this plaintiff, by which defendants were to deliver possession of the said Merchants’ Hotel to the said mortgagees and the said plaintiff, and that they were to receive the said possession, rent said building, and pay said notes out of the rents and profits thereof; that said plaintiff and mortgagees were to keep said property insured, and, in case of destruction by fire, they were to collect insurance, pay faxes, premium on insurance, then principal and interest on notes. The fourth paragraph of the .answer alleges that said mortgagees and plaintiff agreed to take said property on these conditions. Paragraph 5 alleges that mortgagees and plaintiff, having accepted said agreement, were put in possession of the property, continued to remain in possession, used, rented and ■collected the rents thereof, and' applied the same to their own use. Paragraph 6 states that the income aforesaid, collected •as aforesaid, largely exceeded taxes and premium on insurance; (7) that on July 2, 1889, and during mortgagees’ and plaintiff’s possession, said property was consumed by fire and was a total loss, and the insurance money which mortgagees and this plaintiff recovered as aforesaid, together with the rents collected, largely exceeds any possible amount o£ both principal and interest on both of the notes -aforesaid, and the same_ are fully paid, and a large amount over and above the same is due the defendants. The first seven paragraphs of the answer allege a complete counterclaim, which may be properly set off against the claim of plaintiff, and he should have been permitted to prove it. Such amount as the plaintiff had received and converted to its own use out of the rents of the building, and out of insurance money, constitutes a good cause of action against the plaintiff in favor of the defendant, and therefore is proper counterclaim. (Idaho Rev. Stats., sec. 4184.) It arose out of the same transaction; was connected with the subject of the action; it is a cause arising upon a contract, and existed at the commencement of the action, and therefore must be set up, or it is barred. (See Idaho Rev.- Stats., see. 4185; 2 Estee’s Pleading and Practice, 3369.) It is also a cause of action in favor of defendant and against the plaintiff, between whom a several judgment can be had. (Idaho Rev. Stats., sec. 4184.) If the rights of all the parties, or of the parties to this action, could not be determined properly without bringing in other parties, then the court should require.other parties to be brought in, and should have permitted defendant to file his cross-complaint for that purpose. (See Idaho Rev. Stats., secs. 4101, 4102.) See, also, section 4113, which reads: “The court may determine any controversy between parties before it when it can be done without prejudice to the rights of others, or by saving their rights ; but, when a complete determination-of the controversy cannot be had without the presence of other-parties, the court must then order them to be brought in, and thereupon the party, directed by the court, must cause to be-served a copy of the summons,” etc. This may be done at any stage of the action, before decision of the court or a verdict of the jury, when the discovery is made that other persons are-necessary parties. All necessary parties being before the court, there is no difficulty in determining the rights and obligations-of each, and entering judgment accordingly; and this is espe-N cially authorized by the statute (section 4351), which is r “Judgment may be given for or against one or more of several plaintiffs, and for or against one or more of several defendants > and it may, when the justice of the case required it, determine-the ultimate rights of the parties on each side, as between themselves.” Care should be taken, however, that the rights of each should arise 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. Under our practice, as established by the statute, equitable defenses may be set up in suits, at law, and vice versa. (Wa Ching v. Constantine, 1 Idaho, 366.) Walker v. Sedgwick, 8 Cal. 403, 405, where the court say “that the objection that the proceedings may become too-complex by permitting different questions at law and in equity to be settled in one suit, though founded in much plausibility and some truth, is not sufficiently strong as to overcome the plain provisions of the statute and the substantial dictates of justice.” It is the policy of the law, as at present administered, that no man shall be required to advance money in the-first instance, and then sue to recover it back. The plain intention of the statute is that, when the parties are once in court, all conflicting claims shall be finally -settled, and that such claims shall compensate each other, and judgment should be given in his favor who proves his just claim to be the larger. Insolvency may exist in many cases where it cannot be proven at the time, and may often occur in the future, before the party could possibly recover in his cross-action. Parties were often ruined by the practical operation of the old rule, which is invoked by the plaintiff in this case, and which seems to have been founded more in the convenience of courts than upon the true principles of justice. It is like the practice of the justice of the peace, of whom it is said that he never heard any testimony except for the plaintiff, upon the alleged ground that the contrary practice, of hearing the testimony on both •sides, tended to produce doubt and confusion in his own mind. The old rule may have been more simple, but it was all on one ¡side, and practically defeated the very ends contemplated by The law itself. The court erred in refusing to permit defendants to introduce evidence under the plea of payment set up in The first seven paragraphs of the answer. The court also erred 'in refusing to permit defendants to file cross-complaint bringing in Willman & Walker, and setting up their cause of action ■for damages on the agreement alleged to have been made by Willman & Walker and plaintiff with defendants. Judgment -reversed, and new trial ordered. Costs awarded to appellants.

Sullivan, C. J., and Huston, J., concur.  