
    FIRST FEDERAL SAVINGS AND LOAN ASSOCIATION OF RAPID CITY, South Dakota, a corporation, Plaintiff and Appellee, v. CLARK INVESTMENT COMPANY, a limited partnership; and William E. Clark, Defendants and Appellants, and Nicholas L. Didier; David E. Morrill; James D. Vaughn; Larry M. Owen; William R. Bohannan; Gene Strascheim; and Charles H. Halgrimson, Defendants.
    No. 13616.
    Supreme Court of South Dakota.
    Argued April 26, 1982.
    Decided July 21, 1982.
    
      Donald R. Shultz of Lynn, Jackson, Shultz & Lebrun, Rapid City, for plaintiff and appellee.
    Ronald W. Banks and Ann C. Jones of Banks & Johnson, Rapid City, for defendants and appellants.
    David E. Morrill of Morrill, Hansen, Hubbard & Brown, Rapid City, for defendants.
   FOSHEIM, Justice.

First Federal brought a mortgage foreclosure action against mortgagors Clark Investment Company and William E. Clark and other named defendants based on the due-on-sale clause contained in the long-term redemption mortgage, executed November 8, 1971, First Federal held on the mortgaged property. First Federal also sought enforcement of a separate assignment of rents agreement it had with mortgagors Clark Investment Company and William E. Clark and for attorney fees incurred in the commencement and prosecution of this action. The trial court entered a Partial Judgment and Decree of Foreclosure, ordering the mortgaged property sold and awarding First Federal $6,592.40 in attorney fees. Subsequently the trial court entered a Supplemental Judgment, ordering the assignment of rents agreement enforced and directing that First Federal make proper accounting, as provided by law, to defendants and the court upon conclusion of the foreclosure proceedings. The ordered sale was conducted by the Sheriff of Hughes County. First Federal, the only bidder, purchased the property; there was no deficiency. Clark Investment Company and William E. Clark (appellants) appeal from the Judgments and Order Confirming Sale. We affirm in part, reverse in part, and remand.

The first issue is the enforceability of the due-on-sale clause. In First Federal Savings & Loan Association of Rapid City v. Kelly, 312 N.W.2d 476 (S.D.1981), we held that in the case of a 180-day redemption mortgage, executed pursuant to SDCL ch. 21-49, the lender need not show an impairment of security before its rights under a due-on-sale clause can be enforced. In Kelly, as in this case, appellants argued that a due-on-sale clause is a restraint on alienation. In Kelly, citing Occidental Savings and Loan Association v. Venco Partnership, 206 Neb. 469, 293 N.W.2d 843 (1980), we stated:

Since historically the law has abhored any unreasonable or inequitable restraints on the alienation of property, and the purpose of a due on sale clause is to protect the lender’s security, these courts have generally concluded that absent any such impairment, the lender cannot prevent the borrower from transferring the property involved to a third party. Inherent in this rationale is the premise that due on sale clauses are, at least, an indirect restraint on alienation and thus violative of public policy.

Kelly, supra at 479. In Kelly we said we were precluded from deciding whether a due-on-sale clause constitutes a restraint on alienation due to the explicit language of SDCL 21-49-13(7). Kelly also noted that SDCL ch. 43-5, relating to restraints on alienation of property, contains no reference to due-on-sale clauses.

Appellants attempt to avoid the result in Kelly by arguing that this case concerns a long-term redemption mortgage and therefore Kelly is inapplicable. We do not consider this distinction persuasive in light of SDCL 44-8-27 and 28, enacted by the 1981 Legislature, defining a due-on-sale clause and allowing its enforcement if the real estate mortgage contains such a clause. While appellants concede that a due-on-sale clause is not per se against public policy (we note SDCL 44-8-27 and 28 are conclusive as to that), they do argue that, absent a showing of impairment, enforcement is an unreasonable restraint on alienation. Since we did not expressly address this issue in Kelly, we will do so now.

In support of their position appellants refer to numerous cases cited in Kelly, and particularly to Dawn Investment Co., Inc. v. Superior Court, Etc., 30 Cal.3d 695, 180 Cal.Rptr. 332, 639 P.2d 974 (1982). Dawn continues the line of recent California cases holding that the enforcement of a due-on-sale clause is an unreasonable restraint on alienation absent a showing of impairment of security or risk of default. California has based its holding of unreasonable restraint on its interpretation of Civil Code § 711, which provides: “Conditions restraining alienation, when repugnant to the interest created, are void.” This statute was adopted by the Dakota Territory Legislature, and subsequently by South Dakota, verbatim from the California code. See Territory of Dakota Revised Civil Code 1883, § 200. South Dakota’s current codification of § 711 is SDCL 43-3-5. Appellant urges this court to interpret SDCL 43-3-5 as California has interpreted its § 711, and to hold the due-on-sale clause unenforceable absent a showing of security impairment or risk of default. Although many of our statutes have been lifted in whole or in part from California codes, and this court has often looked to the California courts for guidance in interpreting those statutes, we decline to follow California in this instance. We conclude that a due-on-sale clause is not a direct or indirect restraint on alienation. In Occidental Savings & Loan Assn., supra, 293 N.W.2d at 848, the Nebraska Court said that “[t]he restraint, if any, in this case does not attach itself to the title and the conveyance thereof but rather to the mortgage and the assumption thereof. The lender never promised the seller that another could assume the mortgage; as a matter of fact, it told the seller the contrary.” We follow the rationale of that decision.

Appellants next argue that the trial court should not have enforced the assignment of rents agreement. This agreement was executed by appellants simultaneously with the promissory note and mortgage as additional security for the note. Appellee counters that it is collecting rents as assign-ee on the assignment of rents agreement, and not as a foreclosure sale purchaser. Hulseman v. Dirks Land Co., 63 S.D. 404, 259 N.W. 679 (1935), is cited by appellee as authority for its. position. In Hulseman, however, enforcement of the rent assignment, contained in the foreclosed mortgage, rested on a statute since repealed. RC 1919 § 1558, repealed by SL 1966, ch. 150 § 10-102. That statute provided, in part: “A mortgage does not entitle the mortgagee to the possession of the property, unless authorized by the express terms of the mortgage; but after the execution of the mortgage, the mortgagor may agree to such change of possession without a new consideration.” We find the facts in the case of Knudson v. Powers, 56 S.D. 613, 230 N.W. 282 (1930), to be more comparable to the facts in this case. As in this case, Knudson involved a separate assignment agreement, executed in consideration for the preexisting mortgage debt. Enforcement of the assignment in Knudson, however, was also based on the since repealed § 1558. No statute is noted which expressly allows or precludes a separate rent assignment in connection with a non-homestead real estate mortgage. We must, however, accommodate SDCL 21-47-13. That statute states that when foreclosure is sought by action, “in no case under this chapter shall the possession of the premises so sold be delivered to the purchaser or person entitled thereto, until after the expiration of the period of redemption.” The cases annotated under this statute hold that rents and profits are the fruits of possession. SDCL 21-47-13 does not, however, expressly prohibit a mortgagor from contracting away his right to rents and profits. The assignment of rents agreement under consideration here provides in part that upon default in the note payment or upon default in the terms of the mortgage, appellee has “the right to take and keep possession of the premises and to collect all rents, issues, and profits thereof, either by its officers or by any other person duly authorized by it as agent for that purpose until all of the said indebtedness owing to the Association [appellee] shall have been fully paid and satisfied, together with its expenses of every kind relating thereto.” When then is the indebtedness owing to appellee fully paid? The answer is found in SDCL 21-47-17, enacted in 1939, after the Hulseman and Knudson cases were decided. SDCL 21-47-17 states: “Except as provided by § 21-47-16, the foreclosure by action of a mortgage upon real estate shall operate as a complete ex-tinguishment, satisfaction and payment of the debt secured by such mortgage.” Therefore, by the terms of the assignment and SDCL 21-47-17, appellee could enforce its rights under the assignment until, but not after, its mortgage was foreclosed. That result preserves the right of a mortgagor and mortgagee to agree to an assignment of rents, yet harmonizes with SDCL 21-47-13 which insures the mortgagor possession during the redemption period. Consequently, the trial court’s judgment enforcing the assignment after foreclosure is reversed.

Appellant next contends the trial court erred in allowing appellee attorney fees of $6,592.40. The statute governing attorney fees upon foreclosure by action is SDCL 15-17-8 and limits the award to $25.00 unless issue has been joined. Here, issue was joined so the trial court was justified in awarding appellee reasonable attorney fees. The problem here is that the trial court included in the award $3,943.02 appel-lee incurred defending a declaratory judgment action. Our cases are clear that when awarding attorney fees, the trial court may consider only services performed in its court. Scott v. Hetland, 51 S.D. 552, 215 N.W. 778 (1927); Fruth v. Bolt, 39 S.D. 371, 164 N.W. 270 (1917). Therefore, the inclusion of $3,943.02 in the award is reversed. We have reviewed the cases annotated under SDCL 15-17-8 to determine if $2,649.38 (the fee remaining when the declaratory judgment fee is subtracted) is reasonable. Those cases hold that a reasonable fee must be measured by the amount of the debt secured by the mortgage. Gronseth v. Brubakken, 58 S.D. 415, 236 N.W. 372 (1931); Colton Sav. Bank v. Olson, 55 S.D. 288, 226 N.W. 265 (1929); Scott, supra; Bankers Life Co. of Des Moines v. Horsfall, 48 S.D. 629, 205 N.W. 714 (1925); Fruth, supra. If the award in each of those cases is viewed as a percentage of the debt, it is apparent that higher awards are given for a small debt (15% of a debt of $662 in Fruth as opposed to 1.8% of a debt of approximately $22,000 in Scott). In this case, the amount of the mortgage debt adjudged due was $506,304.04 and an award of $2,649.38 is not unreasonable.

Appellants’ final argument is that the sale of the mortgaged property must be vacated because the trial court’s order confirming the sale does not comply with SDCL 15-19-21 and 22. The facts pertinent to this issue are as follows. The Sheriff of Hughes County filed his return of sale in which interest on the debt was calculated at twelve percent. Appellants filed objections to this return within the ten-day period required by SDCL 15-19-21. Appellants objected to twelve percent interest, stating that the judgment rate was nine percent. The trial court sustained this objection. Thereafter, the Sheriff filed an amended return of sale in which interest was calculated at nine percent. The trial court then confirmed the sale without waiting ten days for objections to be filed. Within the ten-day period, but after the trial court’s confirmation of sale, appellants filed objections to the amended return of sale. On appeal from the order confirming sale, appellants argue that because the trial court did not wait ten days before confirming the sale should be vacated. Appellants also contend that since the original sheriff’s return and the amended return differ as to the sale price, because of the interest differential, “it is unclear for what amount and in what manner the Sheriff conducted the sale.” We do not agree with appellants and thus affirm the trial court’s order confirming sale. The amended return of sale simply reflects the trial court’s previous direction to correct the interest rate. Under these circumstances, the trial court’s failure to wait a second ten-day period for appellants’ objections was not error. Appellants’ second argument might have merit if it were not for the fact that the notice of sale did not state a rate of interest but referred to the Judgment of Foreclosure which stated the interest at nine percent. We can assume appellee knew the interest rate stated in the judgment was nine percent. Appellants do not argue that at the time of sale the Sheriff backed off potential bidders, by announcing twelve percent interest, who might have bid if the interest rate had been announced at nine percent. Since appellee was the only bidder, appellants have not been prejudiced.

That part of the trial court’s judgment enforcing the due-on-sale clause and its order confirming sale are affirmed, the judgment enforcing the assignment of rents is reversed, and that part of the judgment awarding attorney fees is remanded for entry of an award in the amount of $2,649.38.

WOLLMAN, C. J., and DUNN and HENDERSON, JJ., concur.

MORGAN, J., concurs specially.

MORGAN, Justice

(concurring specially).

I concur specially because I believe that there is substance in Chief Justice Krivo-sha’s excellent opinion in Occidental Savings & Loan Assn. v. Venco, 206 Neb. 469, 293 N.W.2d 843 (1980), which should be emphasized.

In an indepth study of the argument that due-on-sale clauses are void as restraints on alienation, the opinion examines the California line of authority on which appellant relies and to which the majority opinion refers, dwelling at length on the Wellen-kamp decision. As the Chief Justice noted:

A more interesting aspect of the Wellen-kamp decision is the basis upon which the court reached its conclusion. Relatively few legal principles are relied upon as authority. The decision is based primarily on considerations of social need and the assumed effect of a “due-on-sale” clause in the market place. The rights and needs of the seller, as seen by the court, are detailed and balanced against the rights and needs of the lender, as seen by the court. The court concludes that the rights and needs of the seller outweigh those of the lender, notwithstanding the fact that the parties have freely entered into a contract to the contrary.

Occidental Savings & Loan Assn., 293 N.W.2d at 847. The opinion then goes on to hold, as pointed out in the majority opinion here, that “[t]he restraint, if any, in this case does not attach itself to the title and the conveyance thereof but rather to the mortgage and the assumption thereof. The lender never promised the seller that another could assume the mortgage; as a matter of fact, it told the seller the contrary.” Id., 293 N.W.2d at 848.

The key point in the Occidental opinion follows, to-wit “[a] ‘due-on-sale’ clause is a form of an acceleration clause and, as such, should be subject to the same rules as other acceleration clauses, including the protection of equitable defenses.” Id., 293 N.W.2d at 849. As in Nebraska, this court has said: “[b]y the great weight of authority the courts hold that a court of equity has the power to relieve a mortgagor from the effect of the acceleration clause when the default was the result of some inequitable conduct of the mortgagee. . . . Also many courts have relieved the mortgagor against a default which is unintentional, technical and without prejudice.... ” Larson v. Western Underwriters, 77 S.D. 157, 161-62, 87 N.W.2d 883, 886 (1958) (citations omitted).

Absent appellant’s pursuit and proof of any of the above equitable defenses, I, too, join in affirming the trial court’s decision. 
      
      . SDCL 21-49-13(7) reads: In particular, but without limitation, any mortgage subject to the provisions of this chapter, may contain provisions relating to:
      (7) If the mortgaged premises are sold without the prior consent of the mortgagee, that the entire balance owing may at the option of the mortgagee be declared immediately due and payable upon sixty days notice to the mortgagor, and the mortgage foreclosed as provided in this chapter.
     
      
      . SDCL 44-8-27 reads: For the purpose of this section and § 44-8-28, a due-on-sale clause is a provision of a real estate mortgage which requires that the note secured by the mortgage be paid at the time the property is transferred and no assumption of the original note is permitted.
      SDCL 44-8-28 reads: No lender may enforce a due-on-sale clause unless the real estate mortgage includes such clause.
     
      
      . La Sala v. American Sav. and Loan Assn., 5 Cal.3d 864, 97 Cal.Rptr. 849, 489 P.2d 1113 (1971); Tucker v. Lassen Sav. & Loan Assn., 12 Cal.3d 629, 116 Cal.Rptr. 633, 526 P.2d 1169 (1974); Wellenkamp v. Bank of America, 21 Cal.3d 943, 148 Cal.Rptr. 379, 582 P.2d 970 (1978).
     
      
      . While the source annotated under SDCL 43-3-5 does not refer to the California Civil Code, as do other sections in SDCL ch. 43-3, nevertheless California Civil Code § 711 is specifically cited as the source of § 200 in the 1883 Revised Code.
     
      
      . We recognize Fidelity Federal Savings and Loan Association v. de la Cuesta, - U.S. , 102 S.Ct. 3014, 73 L.Ed.2d 664, handed down by the United States Supreme Court on June 28, 1982. That decision holds that the Federal Home Loan Bank Board’s 1976 regulation, allowing federal savings and loan associations to include and enforce due-on-sale clauses in their loan instruments, preempted California’s contrary due-on-sale law and that the Board’s action was within the scope of its delegated authority. Since this decision is in harmony with de la Cuesta, further discussion is unnecessary.
     
      
      . Judy v. Ruden, 59 S.D. 527, 241 N.W. 614 (1932); Harms v. Miller, 57 S.D. 85, 230 N.W. 766 (1930); Knudson v. Powers, supra; Pratt v. Minahan, 56 S.D. 611, 230 N.W. 281 (1930); Kettering v. Barber, 37 S.D. 602, 159 N.W. 133 (1916); Rudolph v. Herman, 4 S.D. 283, 56 N.W. 901 (1893).
     
      
      . SDCL 15-17-8 reads: In all actions commenced and prosecuted to judgment in the circuit court for the foreclosure of any chattel or real estate mortgage the plaintiff in such action shall be allowed an attorney fee as follows: on the first one hundred dollars or under of such judgment, ten dollars, and three per cent on each dollar of judgment in excess of one hundred dollars and not exceeding five hundred dollars. Such attorney fee in no case shall exceed the sum of twenty-five dollars unless the court shall by order allow an additional sum when issue has been joined in such action. If the plaintiff shall fail to recover in such action, the defendant in such action shall be allowed an attorney fee not exceeding twenty-five dollars.
     
      
      . The declaratory judgment action was initiated by appellants against appellee in Pennington County but was dismissed by Judge Davis on December 22, 1980, and part of the case file transferred to Hughes County. The record is not clear, but it appears the declaratory judgment action was dismissed because this foreclosure action was pending in Hughes County.
     
      
      . SDCL 15-19-21 reads: At any time within ten days after such return has been filed, any party interested may file exceptions to such sale, and serve same upon purchaser, and they shall thereupon be determined by the court either upon motion to confirm such sale, or to set it aside. SDCL 15-19-22 reads: If no exceptions be filed as aforesaid upon the certificate of the clerk to that effect, the report may be presented to the court for confirmation ex parte, and if the court shall, after having carefully examined the proceedings of the officer, be satisfied that the sale has, in all respects, been made in conformity to the provisions of this code, the court must make an order confirming the sale, which shall recite that the court is satisfied of the legality of such sale and shall direct that the officer make to the purchaser a deed of such real property, or interest therein, at the expiration of the period of redemption, unless the same be redeemed as herein provided.
     