
    Heegaard et al. v. Dakota Loan & Trust Co.
    1. When a controversy between two parties is ended, so far as the court before which it is pending can end it, the judgment is then final, regardless of mere matter of form. An appeal will lie from such a judgment.
    2. A judgment of the circuit court “that the action be and is hereby dismissed” is final, and an appeal may be taken therefrom.
    3. The allowance of amendments to pleadings is a matter largely within the discretion of the court, yet such discretion should not be so liberally used as to result in injustice or hardship to litigants. Amendments to pleadings are only allowable in furtherance of justice; never for the purpose of defeating it.
    4. In an action by parties doing business under a fictitious name, it is not incumbent upon the plaintiffs to allege in their complaint that a certificate of partnership has been filed, as provided by sections 4066, 4068, Comp. Laws. Objection that no such certificate has been filed must therefore be taken by the answer; otherwise, under .section 4913, Comp. Laws, it is waived.
    5. If a defendant fails to plead that the plaintiff has not filed the certificate as required by sections 4066, 4068, Comp. Laws, at the time or before he pleads to the merits, he will not be permitted to amend his answer, so as to introduce this plea after the trial of the issues.
    (Syllabus by the Court.
    Opinion filed March 2, 1893.)
    Appeal from circuit court, Codington county. Hon. J. O. Andrews, Judge.
    Action by M. A. Heegaard and another, copartners as Heegaard & Co., against tbe Dakota Loan & Trust Company, a corporation, to recover for goods sold and delivered. There was judgment of dismissal, and the plaintiffs appeal.
    Reversed.
    
      The facts are stated in the opinion.
    
      Mellette & Mellette, for appellants.
    The failure of parties to comply with the law in regard to fictitious names must be pleaded in order that the defendant may take advantage of the defect. Phelps v. Goltree, 15 Pac. 451; Sweeney v. Stanford, 8 Pac. 444; Byers v. Baurret, 64 Cal. 73. Matter in abatement must be set up in a separate plea, and if pleaded with any other defense is deemed waived. Pratt v. Sanger, 4 Gray, 88; Railroad v. Navigation, 27 Fed. 277; Whittmore v. Malcomson, 28 Fed. 605. Pleas in abatement must precede all other pleas. Glidden v. Henry, 1 N. E. 369; Hatchkiss v. Thompson, 1 Morris, 156; Hastings v. Bolton, 1 Allen, 529; Morton v. Sweetser, 12 Allen, 137; Spenser v. Lapsley, 20 How. 267. An amendment will not be allowed that, in effect, substitutes a new cause of action. Johnson v. Filington, 39 Wis. 62; Board v. Van Stroton, 45 Wis. 675; McKoy v. McKoy, 11 S. E. 217; Wyatt v. Thompson, 10 W. Va. 645; Tracewell v. Boggs, 14 Id. 254; Steven v. Fleming, 26 Id. 59; Fielding v. Fitzgerald, 22 N. E. 592; Maher v. Bull, 39 111. 531; Higgins vv Curtis, 82 HI. 28; Cavanaugh v. Britt, 13 S. W. 924; Kelly v. Kershaw, 14 Pac. 804. An amendment proposed to an-answer after the evidence was closed is untimely. Suger v. Gevens, 35 Mo. 602.
    
      Van Buskirk & Weeden, for respondent.
    Under the Code practice a party, by leave of the court, may amend the answer by pleading any defense he may have. Sheldon v. Adams, 41 Barb. 54; Bank v. Gifford, 40 Id. 659; Gilchrist v. Gilchrist, 44 How. Pr. 317; Oallin v. Gunter, 11 N. Y. 368; McDuller v. Babcock, 3 Keys, 428; Brown v. Bosworth, 22 N. W. 521; 4 Wait’s Prac. 661.
    A party cannot allege surprise when the evidence is record evidence. Bowman v. De Pugster, 2 Daly, 203. Amendments may be made at any time if not too late for the adverse party to fairly present his case. McCousland v. Ralston, 12 Nev. 195; Schreyer v. Mayor, 39 Sup. Ct. Rep. 277; Howé v. Parson, 12 Gray, 26; Cotner v. Shephard, 8 Neb. 308. The allowance of. an amendment at trial is discretionary with the court and is not reviewable on appeal. Richlmeyer v. Remsen, 38 N. Y. 206; Ford v. Ward, 26 Ark. 360; Héndricks'v. Decker, 35 Barb. 298; Roth v. Schloss, 6 Barb. 298; Meyer v. Fiegal, 34 How. Pr. 434.
    A plea to the merits and a plea in abatement may and should, under the Code, be set up in the same answer. Freeman v. Clark, 17 Wis. 126; Gardner v. Clark, 21 N. Y. 399; Board v. Yan Shanton, 45 Wis. 675; Erb v. Perkins, 32 Ark. 428; Dowley v. Brown, 9 Hun, 461; Sweet v. Tuttle, 14 N. Y. 465.
   Bennett, P. J.

The plaintiffs were copartners doing business under the firm name of Heegaard & Co. It is alleged they sold and delivered to the defendant, at its special instance and -request, merchandise valued at $400, and that there is a balance due them on said sale, which the defendant has refused to pay. The original answer admits that the plaintiffs were copartners and doing business under the name of Heegaard & Co., but deny they are owing them any balance. Upon the trial of the issues' thus made, after the plaintiffs had introduced all of their evidence in support of the complaint, and the defendant had submitted all of its evidence in bar of the action, the defendant introduced a witness whose testimony tended to show that the plaintiffs had failed to file in the office of the clerk of the circuit court of Coding-' ton county a certificate in relation to the partnership of Heegaard & Co., as required by sections 4066,4068, Comp. Laws, stating the names in full of the persons composing such partnership, and their place of residence. This evidence was admitted at the time it was offered, without objection. The defendant then rested its case, and asked the court-to direct a verdict upon all the issues, in favor of the defendant. This motion was overruled. The plaintiffs then moved to strike out all the testimony in relation to the nonfiling of any certificate by the plaintiffs in the office of the clerk of the circuit court (1) because, under the pleadings in the action, the answer of the defendant admits the copartnership of the plaintiffs, and that no pleading involved in the action justifies the introduction of that evidence; (2) because, in order to render the evidence competent, the matter stated in the sections of the Compiled Laws above referred to must be specifically pleaded. This motion of the plaintiffs was overruled. The defendant then asked leave to amend the answer so as to conform to the proof as introduced on this point. This motion was granted. Before this amended answer was filed, the defendant asked the court to direct a verdict in its favor. Before a decision on the motion was rendered by the court, the amended answer was filed. The plaintiffs then moved to have it stricken from the files — First, because it is too late, after evidence has been introduced, to file an amended answer which in its nature is a plea in abatement; second, because the defendant has shown no cause or sufficient excuse for the delay in filing its amended answer or plea in abatement until after the issues had been tried upon the original pleadings. The motion to direct a verdict, and the motion to strike out the testimony in relation to filing the certificate, were overruled. The plaintiffs then interposed a demurrer to the amended answer. This was also overruled. The court then, upon its own motion, dismissed the action upon the alleged facts as shown under the amended answer. From this judgment of dismissal this appeal is taken.

The first question presented on the appeal is whether there is a final judgment in the cause from which an appeal will lie. The entry in the record is as follows: “By the Court: The judgment is that the action be, and is hereby, dismissed.” It is true that this is not as formal as it might be, but by this order of the court the cause was entirely ended, and out of court. It was dismissed against the will or wish of the plaintiffs, and was a finality, as far as they were concerned. To hold that this is not a final judgment would be looking more to form than substance. The abstract states “the action is hereby dismissed,” and we are not to presume that the dismissal was not effectual and final. In this view we are sustained by several eminent-authorities. Judge Elliott, in his valuable work on Appellate Jurisdiction, (page 75,) says: “Form is not a matter of much importance in determining whether a judgment is or is not final. If the controversy Is ended between the parties so far as the court can end it, then the judgment is final, regardless of mere matter of form. This must necessarily be true, since the order terminates the litigation in the court where it is pending. Nothing more can be done, except, perhaps, prepare for an appeal. It is obvious that under this rule an order dismissing a case over the objection of the plaintiff may constitute a final judgment.” In the case of Koons v. Williamson, 90 Ind. 599, where an appeal was taken from an order dismissing a cause of action, the court say: “The appellants contend that there was no such judgment in the case as can be appealed from. We think otherwise. The judgment of the court, as stated in the record, is in these words: 'The cause of action is dismissed, at the cost of the plaintiffs.’ The entry of judgment is not as formal as it might be, but the form of the entry expresses in the fewest words just what the court adjudged and did. The judgment of dismissal, as expressed in the record, is sufficient and valid, and the judgment for costs is in the usual form.” See. also, Bowie v. Kansas City, 51 Mo. 459; Scriven v. Hursh, 39 Mich. 98; Lines v. Brenner, 52 Ind. 195; Stoppenbach v. Zohrlaut, 21 Wis. 385; Rogers v. Russell, 11 Neb. 361, 9 N. W. Rep. 547; Murdock v. Martin, 132 Pa. St. 86, 18 Atl. Rep. 1114; Insurance Co. v. Green, 52 Miss. 332. Our own judgment, aided by the light of the above authorities, leads us to say that this objection of the defendant is not well taken. The judgment, as shown by this record, is sufficient upon which to base an appeal.

The assignment of errors presents but one other question for determination, viz.: “Should a trial court allow a defendant to amend his answer during the trial of a cause, to make it conform to the evidence offered, when such amended answer entirely changes the issues as raised in the original pleadings? and, if such an amendment is allowed, is it an abuse of discretion on the part of the court, entitling the defendant to a reversal?” Under our Code of Civil Procedure the most ample provisions exist for the correction of errors and mistakes in pleadings. One of the general provisions is: “The court may, before and after judgment, in furtherance of justice, and on such terms as may be proper, amend any pleading, process, or proceeding by adding or striking out the name of the party, or by correcting a mistake in the name of a party, or a mistake in any other respect, or by inserting other allegations material to the case; or when the amendment does not change substantially the claim or defense by conforming the pleading or proceeding to the facts proved.” Comp. Laws, § 4938. This provision is fonnd to be substantially the same in the Codes of New York, California, Ohio, Colorado, Kansas, Oregon, Nebraska, Minnesota, and Wisconsin. It is also further provided that the court must in every stage of an action disregard any error or defect in a pleading or proceeding which does not affect the substantial rights of the adverse party. Comp. Laws, § 4941. The discretion of the court in relation to amendments or in disregarding any error or defect in the pleading will not be reviewed unless the amendment allowed changes substantially the claim or defense, or when the error or defect in the pleading affects a substantial right. When it is apparent upon the face of the record that the parties have had a fair trial, that neither party has been prejudiced by reason of the amendment to a pleading or by reason of a defect or error, and that substantial justice has been done, a judgment should not be reversed; but, on the contrary, when the amendment changes the entire issues so that plaintiff has either been wronged or deprived of a substantial right, it is beyond the discretion of the court to allow the amendment to be made, unless the adverse party is- given time to meet the new allegation, and given such terms as will in part compensate him for the negligence or delay -of the other party. While the allowance of amendments to pleadings is a matter largely within the discretion of the court, yet .such discretion should not be- so liberally used as to result in injustice or hardship to litigants. Amendments to pleadings are only allowable in furtherance of justice; never for the purpose of defeating it. In the case at bar the amended answer set up .new matter, which, in its effect, if true, would work a dismissal ,of the cause of action. This was allowed after the issues as formerly pleaded had been tried, and, so far as the record discloses, it contained matter which was known to the defendant at the time the original answer was filed, and, if the defendant desired to take advantage of it, it should have been pleaded at first; if not, the plaintiffs could with good reason consider it as waived, unless the fact was unknown to the defendant, — which does not so appear in this record. The statute of California in relation to the filing of a certificate setting forth the names of persons composing fictitious firms is identical with our own, with the exception that it does not contain a proviso like onrs. The manner in which advantage shall be taken of the failure of a partnership to comply with its requirements is well settled by the supreme court of that state. In the case of Phillips v. Goldtree, (Cal.) 13 Pac. Rep. 314, the court say: “This objection must be taken by demurrer, if the ground for it appears in the complaint, or by answer if it does not] otherwise it is waived.” In the same case, Judge Thornton, specially concurring.'says:' “The failure to file the certificate required by section 2466 of the Civil Code was not set up by the answer. Such a defense must be specially pleaded when, as in this case, there is no averment in the complaint in relation to the filing of the certificate.” In the case of Sweeney v. Stanford, (Cal.) 8 Pac. Rep. 444, the court say: “Failure of partners to comply with this law in regard to fictitious names must be pleaded in order that the defendant may take advantage of the defect. If the complaint does not contain allegations showing that this law has been complied with in this respect, the defect, to avail the defendant, must be set up by him as a defense to the action. In either case the action abates only, and is not a bar to another action properly brought.” Without further citation of authorities, we can say the only penalty attached by the Code for a failure to comply with this statute is a legal incapacity to maintain an action upon “any contract or transaction” had in the partnership named. There is no disability to make contracts or to have transactions. The objection is to the legal capacity to sue. The proviso attached to our statute removes-this incapacity as soon as the firm at any time has complied with its terms, and this compliance relates back to cover any contract or transaction entered into prior or subsequent to the compliance. In the case at bar the wrong and injustice in allowing the answer to be amended in this particular is apparent upon the face of the record. Had the fact of noncompliance with the statute been pleaded in the original answer, as the supreme court of California says it must, and that fact had been dominantly brought to the attention of the plaintiffs, the cause could have been abated, the requirements of the statute have, been fulfilled .by the plaintiffs, and a new suit instituted. The expense of proceeding fúrther in the canse, or preparing for trial, or procuring witnesses, or time spent in the trial, could have been saved. But the defendent withheld these facts, tacitly giving the plaintiffs the assurance that they were waived, pleaded in bar upon the merits, and, after the evidence had been submitted on both sides upon the merits, this new matter was interpolated into the case, and defendant asked the court to allow its answer to be amended to conform to this proof, which was done. It is a well-settled principle of practice, both at common law and under the Code, that amendments will not be allowed that, in effect, substitute new causes of action. Another principle equally well established is that amendments are only allowed in furtherance of justice; never to defeat it. In the case of Cooke v. Spears, 2 Cal. 409, the court, in considering the question of an amendment in relation to pleading the statute of limitation, say: “When the plea of the' statute of limitation is claimed as a mere legal right, it must be pleaded in the first instance, and has no days of grace thereafter.” In discussing this question the court, in its opinion says: “The object of the statute in reference to amendments is unquestionably in furtherance of justice. So far as that goes, courts ought to be disposed to treat such applications favorably. In most instances it is a matter of course that they should be granted; but courts hare not been inclined to look kindly upon statutes of limitation, except when they are used as instruments of justice, and not strategy. * * * The record does not disclose that any attempt was made by the defendant by affidavits or otherwise, to show that it was necessary to permit the amendment in order to obtain justice. It is claimed solely as a legal advantage, to which at one time he would have been entitled, but it is a wise conservatism that it should have but its day in pleading, and no days of grace of right beyond the extent of justice. If it existed in this case it was not shown.” The pleading of'*the statute of limitation after a plea in bar was not allowed. The above reasons and principles apply with great force to the case at bar. There is no showing made by the defendant in this case of any diligence or that the facts set up in the amended answer were not known to the defendant at the time the original answer was filed. There is no explanation why it was delayed, or why these new facts were, not incorporated into the original answer. The supreme court of Illinois, in the case of Fielding v. Fitzgerald, 130 Ill. 437, 22 N. E. Rep. 592, upon the question of allowing amendments, says: “It would, to say the least, he but trifling with courts to allow a party, as here, after proceeding to the trial of the issue presented by his answer, and, being defeated thereon, upon his own request, unsupported by any evidence of mistake in his former answer, to take the admissions, and present a new issue. * * * Such a practice would lead to oppression, and it is clearly beyond any discretion vested in the court.” The order of the court in dismissing the action in the case under consideration was based upon the facts set up in the amended answer. The answer was allowed to be filed after the plea in bar had befen tried, and related to entirely new matter, which was not meritorious, and without any reason given why it had not been pleaded before. The facts are very similar to the case above cited, and its results were oppressive. The action of the court, both in allowing the amended answer to be filed and in the dismissal of the case, was error, and went beyond the reasonable discretion of the court, and worked an injustice for which the judgment should be reversed, and the case remanded for a new trial; and it is so ordered.

All the judges concur.  