This action was originally commenced by the plaintiff to recover certain sums of money alleged to be due to him from the defendant, and evidenced by certain instruments in writing. On filing his complaint, plaintiff caused an attachment to be issued and served upon defendant, who was at the time engaged in the business of general merchandising in the town of Hailey, Alturas county, Idaho. Defendant moved the district judge for the dissolution of the attachment, upon the ground that it was Avrongfully issued, which motion was allowed by the district court; and from this action of the district court an appeal Avas taken to this court, when the action of the lower court Avas affirmed, and the canse remanded for further proceedings. (See 3 Idaho, 737, 35 Pac. 37.) Thereupon the defendant filed his answer to the complaint of the plaintiff in the district court, and at the same time filed a cross-complaint, setting up, by way of counterclaim, the wrongful issuance of the attachment aforesaid, and alleging damages by reason thereof, and asking affirmative relief therefor. Upon the filing of defendant’s answer and counterclaim, plaintiff made application by petition to this court for a writ of prohibition forbidding the district court from receiving or entertaining said, cross-complaint in said action, which petition was denied by this court. (See ante, p. 209, 35 Pac. 692.) Thereupon said canse came on for trial before said district court, with a jury, which trial resulted in a verdict and judgment in favor of defendant, from which judgment this appeal is taken.
Plaintiff filed demurrer to the cross-complaint of defendant, which was overruled by the court. Thereupon plaintiff moved to strike out the cross-complaint of defendant, which motion was refused by the court, and thereupon plaintiff filed his answer to defendant’s cross-complaint. There is no assignment or specification of errors in the record or in the brief of counsel other than appears in the bill of exceptions. The contention of appellant would seem to he that the district court erred in overruling plaintiff’s demurrer to the cross-complaint of defendant, and also in refusing plaintiff’s motion to strike out said complaint. It is also contended by plaintiff that there was no personal service of the cross-complaint upon the plaintiff.
*213Section 4188 of the Revised Statutes of Idaho provides as follows: “Whenever the defendant seeks affirmative relief against any party, relating to or depending upon the contract or transaction upon which the action is brought, or affecting the property to which the action relates, he may, in addition to his answer, file at the same time, or by permission of the court subsequently, a cross-complaint. The cross-complaint must ba served upon the parties affected thereby, and such parties may demur or answer thereto as to the original complaint.” Plaintiff commenced his action by filing complaint, and at the same time issuing attachment. Before answer or demurrer by de» fendant, the latter moved to dissolve the attachment, upon the ground that it was wrongfully issued and served, and this motion was sustained and allowed. Thereafter defendant filed his answer to plaintiffs complaint, and at 'the same time filed his cross-complaint, asking affirmative relief in damages alleged to have been sustained by him by reason of the wrongful issue of said attachment. The answer and cross-complaint were duly served upon the attorney of the plaintiff, who had appeared in the action, and said attorney filed his demurrer to the answer and cross-complaint, and motion to strike out said cross-complaint. The filing of the demurrer was, if any further appearance was necessary, an appearance by the plaintiff so far as the cross-complaint was concerned. (Idaho Rev. Stats., sec. 4892.) It is true plaintiff assumes when he files his “answer to the so-called cross-complaint,” as he terms it, to make a special appearance, but he had already appeared generally by filing his demurrer to and motion to strike out the cross-complaint. The court, having acquired jurisdiction of the parties and the subject matter, will proceed to determine all questions involved. “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.” (Rev. Stats., sec. 4113.) The purpose of the code is not only to simplify proceedings, but to avoid, as far as may be, a multiplicity of suits.
The appellant has cited various authorities in support of his contention that the cross-complaint filed in this action did not state a cause of action proper to be set up in the cross-complaint, and it is upon this question that the whole case depends. This *214question is one which depends largely, if not entirely, upon statute; and, before my decision can be said to be strictly in point, it must appear that it was made under a statute similar to our own. In Conner v. Winton, 7 Ind. 523, cited by appellant, A brought action against B to recover a sum of money deposited by A with B, which B refused to deliver on demand. B alleged, by way of counterclaim, that A had falsely charged him with stealing the money deposited, whereby he had sustained damages, etc. It was held no counterclaim; but the «court, in its opinion in that case, makes'a clear distinction between it and a case like the one at bar.. In Bank v. Morris, 13 Iowa, 136, the court held that the defendant in an attachment suit may, by way of counterclaim or cross-demand, recover in the principal action for damages sustained by reason 1 of the wrongful suing out of the writ. In Reed v. Chubb, 9 Iowa, 178, the court held that “where, however, the affidavit for attachment and the bond are filed, and the writ sued out, at the commencement of the action, if the writ is wrongfully sued out, any damages sustained by the defendant therefrom constitute a 'claim held by him at the commencement of the suit/ in such a sense that the same may be set off against the plaintiff’s demand in the same action. He need not wait until the principal suit is determined, before bringing suit on the attachment bond.” To the same effect is the case of Stadler v. Parmlee, 10 Iowa, 23, also, cited by appellant. The case of Waugenheim v. Graham, 39 Cal. 169, is, we think, directly in point, and in that case the court holds unequivocally, upon a statute almost identical with that of Idaho, that the damages claimed by reason •of the wrongful issuance of. an attachment are proper matter for cross-complaint in the original action. We are un•able to -discover any merit in the exceedingly fine distinctions insisted upon by counsel for appellant between the eases we have quoted and the case at. bar. The cause of action set forth in the oross-.complaint arose out of the transaction which forms the basis -of appellant’s action, and was, under our statutes, entirely proper to be so presented to the court, in that form. The judgment of the district court is affirmed, with costs.
Morgan .and Sullivan, J J., concur.