
    (November 4, 1909.)
    J. T. HARRISON, MARGARET A. HARRISON and W. H. HARRISON, Appellants, v. RUSSELL AND COMPANY, a Corporation, Respondent.
    [105 Pac. 48.]
    Burden or Proof — Bight to Open and Close — Admissibility or Evidence — Amending Complaint.
    1. In an action brought to cancel promissory notes, in whieh the plaintiff alleges that sueh notes have been paid by a return of the property for which they were given, in accordance with the contract of sale, and to recover partial payments made thereon, the affirmative is with the plaintiff, and the plaintiff should have the right to open and close the evidence and argument, and it is error for the court, over the objection of the plaintiff, to deny the plaintiff such right.
    2. Bev. Codes, sec. 4928, provides a remedy by whieh one person can require another to come into court for the purpose of having determined an adverse claim whieh the latter may claim to hold against the former for money or property, upon an alleged obligation; and in such action the plaintiff must prove the allegations of his complaint and has the right to open and close the case, as the action is not one to require the defendant to bring suit upon his pretended claim or obligation, but is purely a statutory action in which the adverse claim may be adjudicated and determined,
    3. Where the issue in a case is the contract of purchase of machinery and a warranty given therewith, it is error to exclude evidence tending to show sueh contract and the character of the wort done by the machinery sold, and the efforts on the part of the seller to make the machinery work in accordance with a warranty, and the acts of the parties with reference to a return and exchange of such machinery, and the final cancellation and rescission of the contract of sale.
    4. In allowing amendments to pleadings, the court is clothed with great discretionary power, but where it appears that the amendment offered is made for the purpose of conforming to the proof and does not present any new cause of action or issue, and the opposing party has not been misled or deprived of introducing any evidence which he might desire to offer in consequence of the amendment, it is error for the court to disallow sueh amendment.
    (Syllabus by the court.)
    
      APPEAL from the District Court of the Second Judicial District, for Latah County. Hon. Edgar C. Steele, Judge.
    An action for surrender and cancellation of certain promissory notes. Judgment for defendants. Plaintiff appeals.
    
      Reversed.
    
    S. S. Denning, for Appellants.
    Plea of payment is an affirmative defense and must be pleaded and established by the defendant. (2 Green, on Ev., see. 516; 18 Am. & Eng. Eney. of Law, 253,1st ed., and note 1.)
    Plaintiffs ought to have been permitted to show all the facts surrounding the making of the contract. {Ldlienthal dr Go. v. Anderson, 1 Ida. 673; Fisher v. Board, 4 Ida. 381, 39 Pac. 552; Rice v. Bank, 5 Ida. 39, 47 Pae. 856; Idaho Mercantile Go. v. Kalcmquin, 8 Ida. 101 (on page 106), 66 Pae. 933; Morrison v. Regan, 8 Ida. 291, 67 Pae. 955; Huber v. 8t. Joseph’s Hospital, 11 Ida. 631, 83 Pac. 768.) The court erred in taking from the jury all the evidence given by the plaintiff, Harrison, in regard to the terms of the contract, the time in which the notice of the defect of the machine was given, the acts, conversations and admissions of the defendant’s agents after the giving of the notice, all that was said and done in regard to the exchange of the machines and the taking back and sale of the same, as the same was stare de-cisis under the rule laid down in Harrison v. Russell Go., 12 Ida. 624, 87 Pae. 784. {Lindsay v. People, 1 Ida. 438; Palmer v. Utah etc. Ry. Go., 2 Ida. 382, 16 Pac. 553; Hall v. Black-man, 9 Ida. 555, 75 Pac. 608; Steve v. Bonners Ferry Lumber Go., 13 Ida. 384, 92 Pae. 363.)
    Where there is a conflict between the pleading and the proof, if it did not mislead the defendant to its prejudice plaintiff is entitled to amend. {Hawkins v. Pocatello Water Go., 3 Ida. 766, 35 Pac. 711; Aulbach v. Ddhler, 4 Ida. 654, 43 Pae. 322; Stuart v. Noble Bitch Go., 9 Ida. 765, 76 Pae. 255; Lewis v. Utah Construction Go., 10 Ida. 214, 77 Pae. 336; Kroetch v. Empire Mill Go., 9 Ida. 277, 74 Pae. 868; Kindall v. Lincoln Hdw. Go., 10 Ida. 13, 76 Pae. 992; Murphy v. Russell Go., 8 Ida. 133, 67 Pac. 421; Dunbar v. Grif-
      
      fiths, 14 Ida. 120, 93 Pae. 654; Western Loan & Savings Go. v. Kendrick State Bank, 13 Ida. 331, 336, 90 Pae. 112.)
    Forney & Moore, for Bespondent.
    The question involved in this case is purely one of fact. The action was brought under see. 4928, Bev. Stat. 1887, as construed in the case of Ada County v. Bullen Bridge Go., 5 Ida. 188, 95 Am. St. 180, 47 Pae. 818. No question of warranty was involved. The defendants brought the action on the promissory note as required by the statute, and the matter to be determined and the entire controversy was, did plaintiffs deliver the machine to Bussell & Go. and was the said machine accepted by the said Bussell & Co.; this embraced the whole contention.
   STEWABT, J.

— This ease was before this court upon a former appeal from a judgment in favor of respondent, and is reported in the 12th Idaho, commencing at page 624. Upon the reversal the cause came on for trial upon the same pleadings and issues upon which it was first tried, and upon such retrial the plaintiffs demanded the opening and close in the presentation of the evidence and the argument. This was denied and an exception taken to the ruling of the court, and this ruling is assigned as error. It appears from the record that during the discussion between counsel and court as to who had the right to open and close, the court among other things remarked: “That matter was before the supreme court; nothing said about the procedure being wrong; they say that was the very proceeding that was had."

A reference to the former opinion in this case discloses the fact that this question was not presented to this court or discussed or passed upon. An examination of the transcript upon that appeal discloses the fact that “it is agreed that the defendant take the affirmative of the case.” The right, therefore, of the defendant to open and close, under the issues, was not presented to this court or passed upon. In the complaint, after alleging the issue of the notes and that thenotes have been fully paid and satisfied, the plaintiffs further allege: ‘ ‘ That the purpose for which the said three notes were given was to have been in part payment for a certain threshing-machine, and that the defendant herein warranted that the said machine would do good and satisfactory work in threshing, and if it did not do so, that the plaintiffs herein might return the machine and that the defendants would return the said notes heretofore set forth, together with all payments which the plaintiffs had made thereunder on the said notes, and that by reason of the said agreement the plaintiffs herein on, to wit, the 4th day of December, 1900, did pay the sum of fifty ($50.00) dollars, and on the 7th day of May, 1901, did pay the sum of two hundred ($200.00) dollars; that on, to wit, the- day of-, 190 — , the plaintiffs herein returned to the defendant corporation herein the said machine and the defendant received the same in accordance with the terms of the contract.”

The defendant in its answer denies that said notes have been paid, and denies that it warranted the machine, or that it was agreed that if it did not do good work that the plaintiffs might return the machine and that the defendant would return the notes and the payments made on said notes; or that the defendant by reason of the agreement paid the plaintiffs the sums named in the complaint, and then pleads the contract of warranty, which it is claimed was given to the plaintiffs. These allegations, it seems to us, impose upon plaintiffs the burden of proof to the effect that the notes were paid and discharged in the manner alleged in the complaint, and puts in issue the contract alleged in the complaint with reference to the return of the money paid upon said notes. In this state of the pleadings, it was clearly the right of the plaintiff to have the opening and the closing. The burden was upon the plaintiff, under this issue, to prove the allegations of the complaint. Sec. 4383, Rev. Codes, provides:

“When the jury has been sworn, the trial must proceed in the following order unless the judge for special reasons otherwise directs: 1. The plaintiff, after stating the issue and his case, must produce the evidence on his part. 2. The defendant may then open his defense and offer his evidence in support thereof.”

Then follows the provision with reference to rebutting evidence and the argument of counsel. Under this statute it is the right of the plaintiff in all cases to have the opening and the close, unless there be some peculiar fact or reason why this right should be denied the plaintiff; and upon such reason the judge directs such procedure.

There does not appear under the issues of this case any reason why the plaintiffs should be denied this statutory right. The complaint contained affirmative allegations which were denied by the answer, and which it was incumbent upon the plaintiffs to prove in order to recover.

There seems to have been some doubt in the mind of the court, as well as counsel, as to the nature and character of this action. The court seems to have been of the opinion that the action was one brought for the purpose of compelling the defendant to bring suit upon promissory notes which it was alleged the defendant held against the plaintiffs as makers. An examination of the pleadings, however, discloses the fact that the action is brought for the purpose of requiring the defendant to come into court and have determined the question as to whether or not notes held by the defendant against the plaintiffs had been discharged and paid as alleged in the plaintiffs’ complaint.

The action, in our opinion, is a statutory action brought under and authorized by the provisions of sec. 4928, Rev. Codes, as follows: “An action may be brought by one person against another, for the purpose of determining an adverse claim, which the latter makes against the former, for money or.property upon an alleged obligation.” It will be observed from the provisions of this section that it is intended to provide a remedy by which one person can require another to come into court for the purpose of having determined an adverse claim which the latter may claim to hold against the former, for money or property upon an alleged obligation. It is not an action to require the defendant to bring suit upon his pretended claim or obligation, but is purely a statutory action in which the validity of the adverse claim of the defendánt for money or property upon an alleged obligation may be adjudicated and determined. In sueb action, to entitle tbe plaintiff to recover be must prove tbe allegations of bis complaint, and in tbis ease that tbe notes have been paid or that tbe consideration has failed, and by reason thereof tbe notes have become void and are not valid claims against tbe maker. Tbis statute applies to an action brought to cancel a promissory note, where it is alleged that the same has been paid or that tbe consideration therefor has failed. (Lewis v. Tobias, 10 Cal. 578; Taylor v. Ford, 92 Cal. 419, 28 Pac. 441.) Tbe purpose of tbis statute is to provide a speedy and adequate remedy for tbe purpose of having adverse or asserted claims against one adjudicated and determined. Tbe action is one at law and not an equitable action, and tbe burden of proof and tbe right to open and close remains with tbe plaintiff as in other ordinary actions at law. (County of Ada v. Bullen Bridge Co., 5 Ida. 188, 95 Am. St. 180, 47 Pac. 818; King v. Hall & Huggins, 5 Cal. 83; Taylor v. Ford, 92 Cal. 419, 28 Pac. 441; Hoff man v. Kirby, 136 Cal. 26, 68 Pac. 321.) Tbe court was clearly in error in taking away from tbe plaintiffs tbe right to open and close their case.

Objection was also made and an exception taken to tbe striking out of certain evidence offered by tbe plaintiffs, and tbe refusal of tbe court to admit certain other evidence tendered by tbe plaintiffs. A sufficient answer to these questions is to call attention to what this court said with reference to tbe evidence in tbis ease in tbe former opinion as follows:

“In tbe view we take of tbe case, plaintiffs should be allowed to submit to tbe jury any competent evidence they may have tending to establish tbe fact that notice was waived and also tbe fact, if it exists, that it was impossible for them to use or test tbe machinery for any given length of time after they received it at tbe defendant’s warehouse, and if the plaintiffs furnish prima facie evidence tending to establish these facts, then they would be entitled to show tbe further transactions between them and tbe defendant’s agents, and their promises and agreement with reference to tbe repairs and work upon the machinery in order to make it run, and the exchange of machinery and the like in connection therewith. Counsel for defendant objected to evidence, of the acts and statements of the agents on the grounds that plaintiffs had not proven the authority of the agents to bind the company. Whatever the original authority of the agent may have been, it would seem clear that his acts were ratified and confirmed by the company subsequently furnishing the purchasers another machine through the agency and medium of this salesman. They appear to have taken the first machine back and delivered a second machine under the original contract, and this ease arises over the delivery- of the third or Buck machine, plaintiffs claiming that it was furnished in place of the second and to make good the origina] contract. It is-also argued by respondent that plaintiffs are estopped on the grounds that they continued to make payments on the notes given for the purchase price of the machinery. When all the evidence in the case is heard, this objection may or may not be well taken. If payments were made from time to time under the belief and with the promise and agreement that the machinery would be put in running order and made to do the work for which it was purchased, and such agreement was in fact never complied with, and no further waiver is shown by the purchasers, it would not amount to an estoppel against them; otherwise it might do so. Evidence of their dealings will determine the question.”

In addition to what is here said, the court should have permitted the plaintiffs to show, and the jury should have been allowed to consider, all evidence with reference to the contract alleged to have been made between the plaintiffs and the defendant, the manner in which each of the machines operated, the exchange for other machines, their manner of operation, and the final surrender of the last machine; the payments made, and the conversation and correspondence between the parties and those acting for or on behalf of the respondent. Whether the evidence thus offered proves the contention maintained by the plaintiff was a matter entirely for the jury, but these were matters put in issue by the pleadings, and this evidence should have been received and considered by the jury for whatever weight they might conclude it deserved.

A further discussion of the questions involved in this case seems unnecessary, as this court in the former opinion dealt very fully with the facts of the case. Had the trial of this case proceeded in the manner prescribed by statute, many of the objections made to the relevance of the testimony would have been avoided.

The record discloses that while the witness, A. H. Averill, was upon the witness-stand, counsel for plaintiffs asked leave to amend their complaint by inserting therein the following allegation: “And that the said machine didn’t do good work, nor was it fit for the purpose for which it was sold.” The court overruled the application to amend, stating: “I think after they have rested I could not allow the amendment. I don’t believe I can allow the amendment.” And then the witness proceeds to testify in the case.

It will thus be seen that the plaintiff had not rested, that ¿he offer to amend was while the evidence was being presented and while a witness was upon the witness-stand testifying. The amendment, did not present any new issue. The record discloses that no objection was made by counsel for respondent to this proposed amendment. The disallowance of such proposed amendment seems to have been entirely based upon the court’s statement that the plaintiffs had rested, but the record does not disclose the facts to be as thus stated.

While it is true, in allowing amendments to pleadings, the court is clothed with very great discretionary power, yet where it appears that the amendment offered is made for the sole purpose of conforming to the proof and does not present any new cause of action or issue, and the opposing party has not been misled or deprived of introducing any evidence which he might desire to offer in consequence of the amendment, we think the amendment should be allowed. (Sec. 4229, Rev. Codes; Palmer v. Utah etc. Ry. Co., 2 Ida. 382, 16 Pac. 553; Murphy v. Russell, 8 Ida. 133, 67 Pac. 421; Parke v. Boulware, 9 Ida. 225, 73 Pac. 19; Kroetch v. Empire Mill Co., 9 Ida. 277, 74 Pac. 868; Kindall v. Lincoln Hardware & I. Co., 10 Ida. 13, 76 Pac. 992; Small v. Har rington, 10 Ida. 499, 79 Pac. 461; Rankin v. Caldwell, 15 Ida. 625, 99 Pac. 108; Havlick v. Davidson, 15 Ida. 787, 100 Pac. 91; Finnegan v. Ulmer (Nev.), 104 Pac. 17.)

The judgment is reversed and a new trial ordered. Costs awarded to appellants.

Sullivan, C. J., and Ailshie, J., concur.  