
442 P.2d 437 (1968)
92 Idaho 301
DAIRY EQUIPMENT CO. OF UTAH, a corporation, Plaintiff-Respondent,
v.
Junior BOEHME and Sara Jane Boehme, husband and wife, Defendants-Appellants.
No. 10135.
Supreme Court of Idaho.
June 24, 1968.
*438 Whittier & McDougall, Pocatello, for appellants.
Racine, Huntley, Herzog, Olson & Zener, Pocatello, for appellee.
McFADDEN, Justice.
This action was instituted by Dairy Equipment Company of Utah, a Utah corporation, engaged in the sale of dairy equipment. Respondent corporation has done some business in Idaho since 1959. Defendants-appellants, husband and wife, operate a dairy farm in southeast Idaho.
Respondent brought this action to foreclose a conditional sales agreement with appellants on certain dairy equipment and to foreclose a chattel mortgage on a number of dairy cows mortgaged to it by appellants.
Respondent and appellants entered into an agreement in February of 1962 whereby appellants were to purchase certain articles of dairy equipment from respondent. Respondent's agents had contacted appellants at their home in Idaho and after some negotiations it was agreed that appellants would purchase the dairy equipment from respondents. Appellants, at the time, however, had certain dairy cows mortgaged to First Security Bank in Idaho to whom they were making monthly payments; they were desirous of having the mortgage to the bank paid so that they could keep all their monthly payments for the equipment and cattle less than $130 per month. Respondent agreed to pay off the prior mortgage to the bank, and then included the dairy cows on the conditional sales contract at appellants' request. At the time of the transaction, there was due to the bank the sum of $2,208.04, secured by a mortgage to the bank. The cattle were not owned by the bank and respondent did not have title to the cattle, but even so, the conditional sales contract reflected them as being a part of the property sold by respondent to appellants. The particular conditional sales contract was signed by appellants with certain blanks in the contract not filled in. The contract was taken back to Utah and was submitted to a Utah bank for the purpose of selling the contract to the bank at which time the blanks were filled in. The bank required that the chattel mortgage also be executed on the dairy cows, and a form was forwarded to appellants for their execution. Appellants executed the chattel mortgage, which was subsequently recorded and a copy submitted to the bank. Upon purchase of the conditional sales contract, which included the sum due on the loan on the dairy cattle and the purchase price of the equipment, the Utah bank paid respondent for the price of the equipment, paid the Idaho bank on its loan, and also paid the premiums for credit life insurance and health and accident insurance. The contract listed these sums, as well as "time price differential," which the bank retained. The balance due under the terms of the contract, after all credits and charges, was $7,336.80. This sum was agreed to be paid by appellants at the rate of $122.28 per month for the contract term of 60 months.
The interest under this contract was figured under what was designated as a "6% discount rate," which was the lowest rate the Utah bank would accept. Appellants had previously attempted to secure financing in Idaho to keep their monthly payments under this mortgage and for purchase of the equipment at less than $125  50 per month, but without success.
Appellants made payments on the contract for a period of time, but subsequently defaulted, and respondent instituted this action. The trial court found in favor of respondent and entered judgment for the balance due under the contract together with attorneys fees. It is from this judgment that this appeal was perfected.
Appellants' assignments of error bring into issue the rulings of the trial court in regard to certain of appellants' pleadings. Respondent filed its complaint in February *439 1966, to which appellants presented their motion to dismiss. This motion was denied by the court the next month. In June 1966, appellants filed their answer which generally denied the allegations of respondent's complaint, and alleged as a counter-claim that the transaction was usurious; the answer prayed for judgment for the penalty under the Idaho usury laws (I.C. § 28-22-107). The case was set for trial before the court on February 2, 1967. On January 19, 1967, respondent moved to amend its answer to appellants' counterclaim, alleging as a defense, the running of the statute of limitations as to appellants' claim of usury. On Friday, January 27, 1967, five week-days before trial, appellants moved to amend their answer to assert as an affirmative defense to respondent's complaint, the lack of capacity of respondent to bring the action because of respondent's failure to comply with the requirements of Ch. 5, Title 30, Foreign Corporations. Respondent's prior motion to allege the defense of the statute of limitations and also appellants' motion to amend their answer were noticed for hearing before the court on February 2, 1967, the morning of the trial. No objections were presented to respondent's motion to amend its answer, but the respondent objected to appellants' motion to amend their answer to allege the defense of lack of respondent's capacity to sue. The court took the objections under advisement, reserving its ruling on appellants' motion to amend. At the close of respondent's case-in-chief, appellants moved to dismiss the action on the grounds set forth in their amended answer  lack of capacity of respondent to maintain the action. Also at the conclusion of all the testimony, motions were made for amendment of appellants' pleadings to conform to the proof established at the trial (I.R.C.P. 15(a)) and to dismiss. The court reserved its ruling on these motions, but ultimately denied all of appellants' motions when it entered its memorandum opinion, and subsequently entered its findings of fact and conclusions of law and the judgment.
Certain evidence was admitted conditionally during the course of the trial, which evidence pertained to the qualifications of the respondent to do business in the State of Idaho. The evidence conditionally admitted established that the respondent had qualified to do business in the State of Idaho, but that its designated agent had removed from the State and it had not appointed a new agent upon whom service could be made as required by I.C. § 30-502. The record disclosed that while Articles of Incorporation had been filed with the Secretary of State, copies of the Articles of Incorporation had not been filed in Ada County or in Minidoka County, the purported residences of the designated agent. Appellants assert that the trial court erred in not dismissing the complaint, under the provisions of I.C. § 30-501 et seq. and particularly I.C. § 30-504, which provides:
"No contract or agreement made in the name of, or for the use or benefit of, such corporation prior to the making of such filings as provided in sections 30-501 and 30-502 can be sued upon or enforced in any court of this state by such corporation."
This court has held that I.C. § 30-504, which gives a defense to an action on the contract, does not invalidate the contract, but merely goes to the capacity of the foreign corporation to maintain an action thereon. Shaw Supply Co. v. Morgan, 48 Idaho 412, 282 P. 492 (1929); Moody v. Morris-Roberts Co., 38 Idaho 414, 226 P. 278 (1923); Marshall-Field & Co. v. Houghton, 35 Idaho 653, 208 P. 851 (1922); Valley Lumber Etc. Co. v. Nickerson, 13 Idaho 682, 93 P. 24 (1907); Valley Lumber Etc. Co. v. Driessel, 13 Idaho 662, 93 P. 765 (1907). I.R.C.P. 9(a) provides as follows:
"When a party desires to raise an issue as to the legal existence of any party or the capacity of any party to sue or be sued * * *, he shall do so by specific negative averment, which shall include such supporting particulars as are peculiarly within the pleader's knowledge."
*440 This rule thus requires that the lack of capacity to sue must be specially pleaded. See Young v. Pattridge, 40 F.R.D. 376 (N.D. Miss. 1966). I.R.C.P. 12(h) provides that all defenses (except those specifically enumerated and not pertinent here) are waived by the failure to raise these defenses by either motion or answer. This rule is in accord with the prior holdings of this court that the failure to demur or allege in an answer the lack of capacity to sue waives such defense. See Jolley v. Idaho Securities, Inc., 90 Idaho 373, 414 P.2d 879 (1966), applying I.R.C.P. 12(b, h). See also Exchange Lumber & Mfg. Co. v. Thomas, 71 Idaho 391, 233 P.2d 406 (1951); Shaw Supply Co. v. Morgan, supra; Gallafent v. Tucker, 48 Idaho 240, 281 P. 375 (1929); Farmers Etc. Bank v. Gallaher Inv. Co., 43 Idaho 496, 253 P. 383 (1927); Marshall-Field & Co. v. Houghton, supra; Anthes v. Anthes, 21 Idaho 305, 121 P. 553 (1912); Valley Lumber Etc. Co. v. Nickerson, supra; Valley Lumber Etc. Co. v. Driessel, supra. 1A Barron & Holtzoff, Federal Practice and Procedure, § 301, at 212, § 370, at 529 (1960).
After appellants answered respondent's complaint, in which answer they did not raise the issue as to respondent's capacity to maintain the action, they could have pleaded the respondent's lack of capacity only by way of an amendment pursuant to I.R.C.P. 15(a), or 15(b). The requirement of I.R.C.P. 15(a), that leave of court must be first obtained in order to amend, when the cause has been placed on the trial calendar, was not complied with; nor did the trial court consider that the issues raised by the proposed amendment of appellants' answer were tried by express or implied consent (I.R.C.P. 15(b)), because any evidence submitted in support thereof was conditionally admitted, subject to subsequent ruling of the court. The court subsequently denied the admission of this evidence. The action of a trial court in granting or denying a motion to amend generally will not be disturbed on appeal, unless it appears that the trial court abused its discretion. See Exchange Lumber & Mfg. Co. v. Thomas, supra, and Farmers Etc. Bank v. Gallaher Inv. Co., supra, for facts very similar to those developed herein.
When one considers that the motion to amend presented by appellant came within five days of the date of trial, and the fact that appellants had previously presented a motion to dismiss wherein this issue could have been raised, and that subsequently upon denial of that motion, appellants answered, wherein the same issue could have been raised, there is no showing that the refusal of the trial court to grant the motion to amend their answer was an abuse of discretion. Also, there was no showing of an abuse of discretion with reference to the motion to dismiss presented by appellants at the close of respondent's case, or to the motion made at the close of the case to amend to conform to the evidence conditionally admitted.
Appellants further contend, however, that because of appellants' allegation in their counter-claim that respondent was a foreign corporation doing business in Idaho which allegation was admitted by respondent's answer to the counter-claim, that the issue as to the capacity of respondent to sue was properly raised. However, I.R.C.P. 9(a) and previous holdings of this court require a conclusion contrary to appellants' contention. See Shaw Supply Co. v. Morgan, supra; Valley Lumber Etc. Co. v. Driessel, supra.
The trial court stated in the conclusions of law:
"That the Contract in question was made in the State of Utah and was to be carried out and performed in the State of Utah and Defendant [sic], therefore, was not doing business in the State of Idaho in this instance."
Appellants assert that the trial court erred in this conclusion. First, whether respondent was doing business in Idaho was not the real issue before the court. The effect of doing business in this state was pertinent *441 only if the issue of respondent's capacity to maintain the action had been properly raised by the pleadings, and as previously pointed out, we find no error in the trial court's refusal to allow amendment of appellants' pleadings in that regard. Secondly, the trial court made findings of fact to the effect that appellants signed the contract in Idaho, but that it was accepted in Utah; that all payments were to be made in Utah; that the equipment at the time of the agreement was in Utah, but was later installed in Idaho. We find no error in the conclusion of law based on findings of fact, insofar as the place of performance of the contract itself is concerned.
Appellants strenuously urge that the Idaho law in regard to usury is applicable here, and not the law of Utah. I.C. § 28-22-105 fixes the maximum rate of interest for a transaction of this nature at 8%. Utah law, however, (Utah Code Sec. 15-1-2a, subd. B(3)), authorizes 12% interest. Appellants contend that this contract is one which should be governed by the laws of Idaho and in support thereof point to the fact that the conditional sales contract also involves the lending of money to them, by reason of the payment to the First Security Bank for the dairy cows.
The trial court, in its conclusions of law, stated:
"That the contract was made in the State of Utah and was to be performed in the State of Utah and that the law of the State of Utah was controlling in this instance."
In support of their position appellants have cited, for the proposition that Idaho law should apply, the following cases: Cornelison v. United States Bldg. Etc. Ass'n, 50 Idaho 1, 292 P. 243 (1930); United States Bldg. & Loan Ass'n v. Lanzarotti, 47 Idaho 287, 274 P. 630 (1929); Fidelity Savings Ass'n v. Shea, 6 Idaho 405, 55 P. 1022 (1899); Vermont Loan Etc. Co. v. Hoffman, 5 Idaho 376, 49 P. 314, 95 Am.St.Rep. 186, 37 L.R.A. 509 (1897).
Respondents, however, in support of their position that the Utah law should apply for the determination of whether or not the contract was usurious, have cited Zimmerman v. Brown, 30 Idaho 640, 166 P. 924 (1917); and Utah State Nat'l Bank v. Stringer, 44 Idaho 599, 258 P. 522 (1927). They also assert that knowledge or intent is an essential element of usury, citing: I.C. § 28-22-107; and Musser v. Murphy, 49 Idaho 141, 286 P. 618 (1930); Easton v. Butterfield Live Stock Co., 48 Idaho 153, 279 P. 716 (1929); and Anderson v. Creamery Etc. Co., 8 Idaho 200, 67 P. 493 (1902).
The authorities cited by the respective parties herein might seem to indicate conflicting lines of authority. It is our conclusion that there is no such conflict of authority. Appellants' authorities, i.e., Cornelison v. United States Bldg. Etc. Ass'n, supra; United States Bldg. & Loan Ass'n v. Lanzarotti, supra; and Fidelity Savings Ass'n v. Shea, supra, all are based on the Vermont Loan Etc. Co. v. Hoffman, supra, opinion. Therein a foreign corporation engaged in the business of lending money in Idaho and attempted to avoid the local law of usury by providing that the law of Vermont should govern its transactions. Therein this court held that the Idaho law governed.
At the time of the Vermont Loan & Trust Company v. Hoffman opinion, Winters v. Swift, 2 Idaho 61, 3 P. 15 (1884), had been decided. In Winters v. Swift, an Idaho borrower through an agent sought out a lender in Utah, where the transaction was completed with the note being payable there. This court held the Utah law applicable and that under the Utah law there was no usury. Winters v. Swift has not been overruled by this court. In Zimmerman v. Brown, supra, one of the cases relied upon by respondent, this court distinguished Vermont Loan & Trust Co. v. Hoffman in the following terms:
"This case is distinguishable from that of Vermont Loan & Trust Co. v. Hoffman, * * * cited by appellant, by the *442 fact that it was held, in the latter case, that the provision in the note specifying the place of payment without the state of Idaho was made to evade our usury laws." 30 Idaho 645, 166 P. 925.
With reference to the note before the court in Zimmerman v. Brown, the court stated:
"The note in question, although made and executed in Idaho, was made payable in the state of Washington, and the fact that it purported to be dated at Wilbur, Wash., shows an intention of the parties that the contract was entered into in view of the laws of that state, and, since there is neither allegation nor proof of bad faith or of an effort to evade the usury laws of this state, the note is not deemed usurious." 30 Idaho 644, 166 P. 925.
See Whitman v. Green, 289 F.2d 566 (9th Cir.1961); Annot. 125 A.L.R. 487.
The distinguishing element between the two lines of authorities cited by the respective parties is the question of "bad faith or of an effort to evade the usury laws of this state." Zimmerman v. Brown, 30 Idaho 644, 166 P. 924, 925. I.C. § 28-22-107 in defining usury states: "The taking, receiving, reserving, or charging a rate of interest greater than is allowed by this chapter, when knowingly done, * * *." See Milo Theater Corp. v. National Theater Supply, 71 Idaho 435, 233 P.2d 425 (1951); Musser v. Murphy, 49 Idaho 141, 286 P. 618 (1930); Easton v. Butterfield Live Stock Co., supra; Anderson v. Creamery Etc. Co., supra. In the instant case the facts fail to reveal any attempt on the part of respondent to evade the Idaho usury laws. The contract was entered into only after appellants had been unable to secure financing in Idaho. There were substantial contacts between the respondent and Utah. Respondent is a Utah corporation; its home office is there; the bank with which it usually did business is there; and its warehouses were there. It is our conclusion that the trial court properly held that Utah law is controlling.
Appellants complain that the trial court did not make a finding that the contract was usurious. The lack of such a finding is immaterial for the reason that the trial court held this contract was governed by the laws of Utah, and that appellants failed to sustain the allegations of their counterclaim. There was neither proof nor allegation that the contract was usurious under the Utah statutes.
The judgment of the trial court is affirmed. Costs to respondent.
SMITH, C.J., and TAYLOR, McQUADE and SPEAR, JJ., concur.
