
152 N.W.2d 588 (1967)
HOME SAVINGS AND LOAN ASSOCIATION, Appellant,
v.
IOWA CITY INN, INC., Appellee.
No. 52601.
Supreme Court of Iowa.
August 31, 1967.
*589 Birdsall, Pickett & McLendon, Waterloo, for appellant.
William L. Meardon, Iowa City, for appellee.
MASON, Justice.
Plaintiff's appeal calls for a determination of the amount of attorney fees taxable for its attorney as a part of the court costs in a real estate mortgage foreclosure. There is no dispute as to the nature of the fee or that the sum due on the note and mortgage was paid after return day, but before judgment. The only dispute concerns the application of section 625.25, Code, 1962.
The note and mortgage provided for payment of attorney fees of plaintiff's attorney. Both gave the holder the option of declaring the entire indebtedness due and collectible by foreclosure or otherwise upon default in payment of any interest or installment of principal. Notice of election was unnecessary.
When defendant became delinquent in the payment of an installment, Home Savings and Loan Association exercised its option and declared the whole amount unpaid due and collectible; commenced foreclosure proceedings against Iowa City Inn, Inc., only defendant a party to this appeal.
I. The issue is whether defendant owes three-fourths of the statutory attorney fees on the net amount due as accelerated or only on the installment delinquent at time of declaring acceleration. The answer depends upon whether defendant was a resident of Johnson County, and if so, whether it had been given a reasonable opportunity to pay the debt before the action was commenced.
If the fees are to be determined on the amount of the past-due installment of $4650 plaintiff is entitled to judgment for $64.86. On the other hand, if the fees are to be figured on the net amount due on the mortgage of $444,163.18 the fee would be $3293.73.
The trial court held that for the purpose of this statute defendant was a resident of Johnson County, had not been given a reasonable opportunity to pay, owed only statutory attorney fees on the past-due installment and awarded plaintiff judgment for $64.86 on this item.
II. On September 23, 1963, defendant executed and delivered to plaintiff a promissory note in the sum of $550,000 secured by a mortgage on the buildings and land where defendant operated the motel. The note was payable in monthly installments in increasing amounts until January 10, 1964, at which time the payments were to be $4650 with a like amount on the tenth day of each succeeding month thereafter until the note was fully paid.
The January 1965 payment was received February 2, the February payment, February 15 and when the March payment did *590 not arrive the notice of acceleration was forwarded to defendant's president March 19. It was received by him March 22.
On March 27 plaintiff filed its petition for foreclosure and served defendant with an original notice. As stated, at this time defendant was delinquent the one installment. The total amount due plaintiff was $444,163.18. After the return day and before judgment defendant sold the property and payment of the sums due under the mortgage was made. The only question remaining being the matter of the statutory attorney fees, provisions for which had been made in a stipulation which provided for a sum to be held in escrow pending determination of the issue.
III. Section 625.22, Code, 1962, provides for attorney fees on suits on written contracts. Section 625.25 limits the fee under certain conditions, one of which is if the claim is paid after return day but before judgment. It provides:
"Opportunity to pay. No such attorney fee shall be taxed if the defendant is a resident of the county and the action is not aided by an attachment, unless it shall be made to appear that such defendant had information of and a reasonable opportunity to pay the debt before action was brought * * *."
The remaining portion of this section has no application to the facts here. That is, it does not apply where there has been an acceleration of the debt due to delinquency in paying an installment. Moore v. Crandall, 146 Iowa 25, 31-32, 124 N.W. 812, 815; Federal Land Bank of Omaha v. Wilmarth, 218 Iowa 339, 347-348, 252 N.W. 507, 511, 94 A.L.R. 1338.
Defendant is a Tennessee corporation authorized to do business in Iowa whose sole purpose was the ownership and operation of Holiday Inn in Johnson County, the subject of the foreclosure action. Its Tennessee charter, issued December 21, 1961, listed a street address in Memphis as defendant's principal place of business. Defendant's three officers constituted its board of directors, all resided in Tennessee and gave the same address listed by the company.
Plaintiff contends the court erred in finding (1) defendant was a resident of Johnson County under section 625.25 and (2) defendant had not been given a reasonable opportunity to pay under this section.
It insists a corporation is a resident of the state of its incorporation, subject to exceptions not applicable here. These exceptions have been confined to foreign corporations which have their officers, office and business in the state or where a statute requires they be considered a resident.
Plaintiff maintains the purpose of Code section 625.25 is to give a resident of the county where suit is brought an opportunity to pay; a resident who can be called upon to make the payment. It asserts that if a resident of an adjoining county had owned the motel he would not be entitled to an opportunity to pay. If the statute were interpreted to mean this opportunity must be given a corporation in order that its local agent may contact an out-of-state officer with authority to act, then corporations, because of a technical residence under the venue statutes, would receive preferential treatment not granted to individuals.
In support of the trial court's ruling defendant contends a foreign corporation may so establish its business within the state in conformity with the local laws as to justify treatment as a resident for certain purposes.
IV. The determination of whether a corporation organized under the laws of another state is a resident of Iowa must be made within the meaning of the respective statute under consideration. The term is dependent upon the context of the statute in which it is used and the purpose and object to be attained. Pittsburgh-Des Moines Steel Co. v. Incorporated Town of Clive, *591 249 Iowa 1346, 1348, 91 N.W.2d 602, 604 and citations.
Where the place of payment is named in the instrument and a definite date is fixed for maturity, the maker ordinarily is afforded a reasonable opportunity to pay before maturity. However, where the indebtedness becomes due on the election of the obligee the manifest design of this statute is that as a condition precedent to the taxation of attorney fees those debtors included in the first sentence thereof must be afforded a reasonable opportunity to discharge their debts. Moore v. Crandall; Federal Land Bank of Omaha v. Wilmarth, both supra. We believe the foregoing correctly expresses the purpose and object sought to be attained by the enactment of section 625.25.
V. "* * * [T]his court, while recognizing the rule that the domicile of a foreign corporation is in the state where it is incorporated, has frequently held that a foreign corporation doing business in the state is a resident within the meaning of the respective statute then under consideration." Pittsburgh-Des Moines Steel Co. v. Incorporated Town of Clive, supra, 249 Iowa at 1349, 91 N.W.2d at 604. Citing Winney v. Sandwich Mfg. Co., 86 Iowa 608, 53 N.W. 421, 18 L.R.A. 524. (Interpreting Code section 2533 now section 614.6 relating to limitations of actions); Ewing v. Hawkeye Oil Co., 187 Iowa 1037, 174 N.W. 942 (Interpreting section 3501 now section 616.17 a venue statute); and State ex rel. Weede v. Iowa Southern Utilities Co., 231 Iowa 784, 2 N.W.2d 372, 4 N.W. 2d 869 (Applying chapter 387, Code, 1939, regulating the issuance of corporate stock by a foreign corporation).
"While it is true that if the term `resident' relates to legal domicile, a foreign corporation is a resident only of the state of its incorporation, but the term is not universally used in this sense. Many decisions, including a number of courts which approve the foregoing rule as technically correct and frequently controlling, support the view that for certain purposes at least a practical residence within the jurisdiction may be considered apart from the legal residence or domicile of the corporation, and that `foreign corporation' and `non-resident corporation' are not necessarily synonymous terms. According to this view, a foreign corporation may so establish its business within the state in conformity with the local laws as to justify treatment as a resident for certain purposes, and whether or not a foreign corporation can be deemed to have acquired a residence in the local jurisdiction, other than that of its incorporation, depends upon the connection in which the question arises." Ex parte State ex rel. Lawson, 241 Ala. 304, 2 So.2d 765, 769, citing 20 C.J.S. Corporations § 1794, 23 Am.Jur., Foreign Corporations, sections 34, 36 and 37.
The rule that a corporation may so establish itself within a state other that of its incorporation as to acquire a residence for practical purposes, at least, is applied in many cases so as to give the foreign corporation the benefit of statutes applicable to residents generally or to relieve it from inclusion within statutes applicable to nonresidents. 23 Am.Jur., Foreign Corporations, supra, section 38.
We agree with defendant's contention and now hold a foreign corporation may so establish its business within the state in conformity with local laws as to justify treatment as a resident for certain purposes.
VI. Do the circumstances here justify treating defendant as a resident of Johnson County for the purpose and object to be attained by section 625.25?
A purpose for defendant's organization as expressed in its certificate was "to construct, lease, repair and maintain hotel and motel buildings, garages and other structures incidental thereto." Holiday Inn in Iowa City was opened July 1963, a year and a half after defendant's charter was issued. During the interval defendant was *592 not doing business anywhere. Exercise of its corporate franchise was limited solely to Johnson County.
An examination of defendant's activities reveals that its most significant contacts were within the state of Iowa. The loan was negotiated in Waterloo, the note signed and loan closed in Iowa City and plaintiff's mortgage signed and acknowledged in Memphis. Defendant maintained two bank accounts in Iowa City where receipts from the business were deposited. Active management in Iowa was under the supervision and authority of a resident manager who paid the current operating expenses such as local taxes, wages and supplies incident to operations. He kept records of these at Iowa City and prepared summaries for Memphis. All of its business except some controlled bookkeeping was carried on within the state. What is referred to as the "controlled or consolidated books" were kept in the Tennessee office.
Although most of the corporate meetings were held in Iowa City because the directors were there most of the time, some were held in Memphis.
As previously noted, the officers and directors were at all times residents of Tennessee and shared the same office in Memphis. Ordinarily the residence of its officers, agents or stockholders does not determine the residence of the corporation. State ex rel. Northwestern Land & Colonization Co. v. District Court of Winnebago County, 191 Iowa 244, 247, 182 N.W. 211, 213.
We hold the foregoing facts support the view defendant has so established its business as to justify treating it as a resident of Johnson County for the purpose of section 625.25. Therefore, it falls within the first sentence of this section and was entitled to have information of and a reasonable opportunity to pay its indebtedness after its acceleration by plaintiff.
Plaintiff's contentions under its first proposition cannot be sustained.
VII. Plaintiff argues in support of its remaining proposition that in view of its letter to defendant's president of February 17, 1964, exhibit "C", defendant knew suit would be instituted if there were further defaults. The letter followed difficulty plaintiff had had with defendant's check for the January 1964 payment. Defendant was advised payments were expected as they became due, not later than the tenth day of the month and failure to meet these terms and conditions would result in foreclosure proceedings being instituted. Plaintiff further contends defendant knew the amount due at any time from the balance shown in the account book which plaintiff sent defendant in Memphis after each payment.
Defendant contends and the trial court held the "opportunity" to be afforded an obligor to pay its debt is one that is provided after the obligee elects to accelerate the indebtedness. We agree.
It should be noted that notice of intention to accelerate the due date was not necessary so far as the acceleration itself is concerned; but in view of section 625.25 relating to attorney fees, such reasonable notice of intention to accelerate was essential before the attorney fees can be collected on the accelerated debt. Federal Land Bank of Omaha v. Wilmarth, supra, 218 Iowa at 348, 252 N.W. at 511.
In Webster's New Twentieth Century Dictionary of the English Language, unabridged, (2d Ed.), at page 1255, "opportunity" is defined, "1. Fit or convenient time or occasion; a combination of circumstances favorable for the purpose; suitable time, combined with other favorable circumstances." The Random House Dictionary of the English Language, unabridged edition, at page 1010 defines the word, "1. An appropriate or favorable time or occasion. 2. The situation or condition favorable for attainment of a goal * * *."
Although the amount of time which may be deemed reasonable cannot be fixed within *593 well-defined and prescribed limits for every given case, an interval of eight days between plaintiff's letter of March 19 and commencement of the foreclosure proceedings was not reasonable under the circumstances here.
VIII. As a resident for the purpose of the statute defendant was entitled to notice and reasonable opportunity to pay the accelerated mortgage debt before action was brought. Plaintiff failed to afford defendant the opportunity provided by statute.
The trial court's judgment is
Affirmed.
All Justices concur except LeGRAND, J., who takes no part.
