
    LARSON CONCRETE COMPANY, INC., a South Dakota Corporation, Plaintiff and Appellant, v. Larry L. STROSCHEIN, Sharon M. Stroschein, the United States of America, acting through the Farmers Home Administration, United States Department of Agriculture; and Brown County, a political subdivision of the State of South Dakota, Defendants and Appellees.
    No. 14187.
    Supreme Court of South Dakota.
    Considered on Briefs Jan. 17, 1984.
    Decided Aug. 15, 1984.
    
      Kennith L. Gosch of Bantz, Gosch, Cremer & Peterson, Aberdeen, for plaintiff and appellant.
    Roy A. Wise of Richardson, Groseclose, Kornmann, Wyly, Wise & Klinkel, Aberdeen, for appellees Stroscheins.
    Ray P. Murley, Asst. U.S. Atty., Sioux Falls, for defendant U.S.A.
    Marilyn J. Marshall, Brown County State’s Atty., Aberdeen, for defendant Brown County.
   MORGAN, Justice.

Larson Concrete (supplier) brought a foreclosure action against the Stroscheins’ (owners) property based on a valid mechanic’s lien that was filed on February 18,1980 and modified on March 10, 1980. A trial was held on November 9, 1982, and in a judgment entered March 1, 1983, the trial court denied supplier a recovery on its mechanic’s lien and ordered supplier to reimburse owners for the amount of attorney fees for defense of this action in the amount of $500.00. Notice of appeal from final judgment, pursuant to SDCL 15-26A-3(1) and (4), was filed April 26, 1983, and subsequently amended on April 27, 1983. We affirm in part, reverse and remand in part.

Supplier sold ready-mixed concrete to Mike Stucky, d/b/a Double Diamond Construction (contractor), on an open account from July 1979 to December 1979. Concrete supplied to contractor was delivered to owners’ farm between October 26, 1979, and November 21, 1979, and was billed to contractor’s open account at $5,222.09. The concrete was poured and left in place on owners’ farm pursuant to a contract between owners and contractor.

On November 26, 1979, owners paid contractor $13,600.75, the amount billed, as total payment for the improvements, including all materials and labor. Owners’ check for $13,600.75 was made payable to contractor only. On December 1, 1979, contractor deposited the check, together with a check from another job, into his checking account and brought that account’s balance to $20,183.23. No other deposits were made to contractor’s account between December 1 and December 17, 1979. On December 17, contractor wrote a check to the supplier for $10,000.00 in partial payment of the balance due on his open account. Payment was made to supplier without instructions regarding its application to the various items comprising the open account. Contractor’s December 17 payment was credited to his open account on December 18 and applied to the oldest items on that account. The supplier’s standard procedure was to apply all payments on open accounts to the oldest items first. A balance of $7,500.60 remained due on contractor's open account after application of the December 17 payment. Further collection efforts failed and on January 30, 1980, the balance due on the open account was $8,376.42. On February 14, 1980, supplier filed mechanic’s liens against all of the improved real property to which concrete had last been delivered on the contractor’s account within the 120-day lien period. The lien at issue here was reserved and re-filed on March 10, 1980, in order to clarify the description of the owners. Owners were notified of supplier’s lien claim and the lien was properly filed with the register of deeds within 120 days of the last delivery to owners’ farm; its validity is not questioned.

The debt at issue here was owed by contractor to supplier. Owners had paid contractor in full. Contractor, in turn, transferred a portion of that payment to supplier in partial payment of the balance due on his open account without designating application of the open account payment to any specific item as per SDCL 20-4-7. Supplier’s application of contractor’s partial payment to the oldest items on the account complied with its rights as a creditor under SDCL 20-4-8 and the schedule for applying payments made on open accounts set out in SDCL 20-4-9. These statutes have been employed to determine the application of contractors’ payments to suppliers.

The trial court determined that SDCL 20-4-7, -8, -9 contain the South Dakota rules for application of open account payments and that ordinarily these statutes apply even when third parties, i.e., the owner here, are involved. The trial court concluded, however, that as a matter of law the statutes do not preclude a trial court’s consideration of equitable principles, nor the exercise of its discretion in determining the most just and equitable application of a payment on an open account. We agree. The trial court did not base its holding in this case on the Mechanic’s and Material-men’s Lien statutes, but rather on its interpretation of SDCL 20-4-7, -8, -9, the Performance of Obligations statutes. The attendant circumstances in this case compel the exercise of judicial discretion in order to equitably apply the contractor’s $10,000 payment on his open account with the supplier. This court called for this approach in Hill v. Alliance Bldg. Co., 6 S.D. 160, 60 N.W. 752, 754 (1894), stating that “[o]ur mechanic’s lien law ... should receive a liberal construction, to the end that ... substantial justice be done to all parties who may be affected by its provisions.... ” and later implied that sufficient and compelling facts and circumstances could require consideration of the equities in application of a payment. Union Central Life Ins. Co. v. Co-operative Lumber Co., 51 S.D. 197, 212 N.W. 876 (1927). See Crescent Electric Supply Co. v. Employer’s Mut. Cas. Co., 79 S.D. 18, 107 N.W.2d 252 (1961). In Crescent Electric, this court reaffirmed the position taken in F.M. Slagle & Co. v. Bushnell, 70 S.D. 250, 16 N.W.2d 914, 156 A.L.R. 1070 (1944), and held that a debtor’s intention or desire to apply a performance or payment to a particular debt or obligation may be evidenced by circumstances as well as by words. 107 N.W.2d at 254.

All three parties involved in this case knew that the owners were only responsible for the open account deliveries made to their farm. The trial court found that the supplier became concerned about the balance due on the contractor’s open account when a small partial payment was made on October 19, 1979, one week before the first delivery of materials to the owners’ farm. Upon repeated demands for additional payment, the contractor assured the supplier that jobs in progress at that time would generate funds sufficient to provide for payment of the balance due. The trial court found that:

[Wjhen contractor paid plaintiff (supplier) $10,000.00 on December 17, 1979, plaintiff (supplier) knew, or should have known: that contractor had no other source of income other than the ongoing, or recently completed, construction, which included defendants (owners) job and with which plaintiff (supplier) was familiar; that at that time defendants’ (owners’) job was by far the largest of contractor’s ongoing, or recently completed, jobs and generated the greatest income for contractor; and that the $10,-000.00 payment of December 17, 1979, from contractor to plaintiff (supplier) was from jobs, including defendants’ (owners’), other and newer than those jobs which received credit for the payment.

Thus, the attendant circumstances impel the inference that it must have been manifest to the creditor (supplier) that payment was tendered for materials incorporated into a specific project, the improvement on the owners’ property. Acceptance of the tender in this case therefore requires application of the payment to the open account billing that resulted from deliveries to the owners’ farm. See Crescent Electric, 107 N.W.2d at 254-55. The trial court followed the equitable principle set forth in 53 Am.Jur.2d, Mechanic’s Liens, Section 330, pp. 857-58 and recognized in many states that when suppliers furnish materials to contractors on an open account and deliver materials to more than one project, any payment made by the contractor to the supplier, which the supplier knows originated from a specific project, must be applied to the account billing for that project and not to another. 53 Am.Jur.2d, Mechanic’s Liens, Section 330, pp. 857-58 (1970). We agree with the trial court’s application of this rule and affirm the trial court’s judgment on this issue.

The last issue raised by supplier is whether the trial court erred in allowing owners $500.00 in attorney fees. The supplier argues that under the applicable statutory authority, SDCL 44-9-42, the award of attorney fees can be made only to a prevailing lienholder. SDCL 44-9-42 provides:

The court shall have authority in its discretion to allow such attorney’s fees and receiver’s fees and other expenses as to it may seem warranted and necessary according to the circumstances of each case, and except as otherwise specifically provided in this chapter. (Emphasis added.)

SDCL 44-9-33 specifically requires that any award of attorney fees under Chapter 44-9 comply with SDCL Title 15.

All provisions of Title 15 shall be applicable to foreclosure actions under this chapter, except where a different intention plainly appears from the provisions of this chapter. (Emphasis added.)

Referring then to Title 15 at Chapter 15-17 on costs, we first note SDCL 15-17-7 which provides in pertinent part that

The court may allow attorneys’ fees as costs for or against any party to an action only in the cases where the same is specifically provided by statute... .

We then turn to SDCL 15-17-8, which more specifically provides:

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. (Emphasis added.)

SDCL 15-17-8 applies to materialmen’s lien foreclosures under the provisions of SDCL 44-9-41, which states:

The clerk of the courts shall tax the same costs as are allowed in foreclosures of real estate mortgages.
The lien claimant shall be entitled to tax as costs, in addition to all other costs allowed by law, the sum of five dollars for the preparation of the lien statement and account for filing with the register of deeds.

In Hot Springs, etc. v. Fall River Landowners, 262 N.W.2d 33, 36 (S.D.1978), we said that “[i]n reviewing a case requiring statutory construction we must of course consider all of the statutes and construe them so as to give the maximum effect to all provisions where possible.” This case does not involve construction of an ambiguous statute. After reading the array of statutes set out above, it appears to us that the legislature clearly limited the maximum attorney fee allowable to a successful lienee to the sum of $25.00.

We affirm the trial court on the issue of enforceability and reverse and remand with instructions to tax attorney fees as costs in conformance with this opinion.

DUNN and HENDERSON, JJ., concur.

WOLLMAN, J., concurs in part and dissents in part.

FOSHEIM, C.J., dissents.

WOLLMAN, Justice

(concurring in part, dissenting in part).

Although I agree with much of what Chief Justice Fosheim says in his dissent, I would agree with the majority opinion to the extent that there may be circumstances under which a supplier is charged with the duty of applying a contractor’s payment to the account incurred for the materials supplied to the owner’s premises. For example, if in the instant case contractor had endorsed owners’ payment check over to supplier, I think all would agree that the proceeds of that check would have had to first be applied to the account balance representing the concrete furnished to owners’ premises. Cf. Crescent Electric Supply Co. v. Employers Mut. Cas. Co., 79 S.D. 18, 107 N.W.2d 252 (1961). In that situation, supplier would be in effect acting as a conduit for the direct payment by owner to supplier. In the case before us, however, the source of the funds represented by contractor’s payment to supplier cannot be so clearly identified. As it developed, owners’ payment to supplier represented a portion of the funds that were on deposit in supplier’s bank account at the time the $10,000 check was written to supplier, but I do not agree that the record impels the inference that it must have been manifest to supplier that the $10,000 payment was tendered for the materials incorporated into the project on owners’ farm. Accordingly, I would hold that the trial court erred in ruling that the $10,000 payment must first be applied to the account representing the materials delivered to owners’ farm.

I agree with the majority opinion’s holding on the issue of attorney fees.

FOSHEIM, Chief Justice

(dissenting).

The majority opinion holds the supplier must apply payments from the contractor to materials furnished a particular property for the owner’s benefit. This greatly exposes only open-account suppliers and diminishes their protection under the mechanic’s lien statute. See, SDCL ch. 44-9. Thus, open-account suppliers will be required to either: 1) complete all necessary steps delineated in SDCL ch. 44-9 to perfect their mechanic’s liens and inquire for application the source of each payment received from contractors or 2) utilize the procedures outlined in the direct billing statute. See, SDCL 44-9-10. Enforcement of mechanic’s liens does not hinge on such conditions, nor is this contemplated by the statutory framework of either SDCL ch. 44-9 or ch. 20-4.

The statutory scheme of SDCL ch. 44-9 as it exists provides two distinct remedies to a supplier against an owner; direct billing under SDCL ch. 44-9-10 and enforcement of a perfected mechanic’s lien. SDCL ch. 44-9 et seq. See Keeley Lumber and Coal Co. v. Dunker, 76 S.D. 281, 77 N.W.2d 689 (1956); St. Croix Lumber Co. v. Mitchell, 6 Dak. 215, 50 N.W. 624 (1889) (notice to owner does not affect validity of lien); McLaughlin Elec. Supply v. Am. Empire Ins., 269 N.W.2d 766 (S.D.1978); see generally, Dugan, Mechanics’ Liens for Improvements on Real Property, 25 S.D.L. Rev. 239 (1980). Such remedies are the only means by which suppliers may collect payment from an owner or an owner’s real property, absent privity between supplier and owner. See, SDCL 44-9-49, negative inference. An open-account supplier is not ordinarily in privity with an owner.

Suppliers may also proceed directly against their debtors, usually contractors, in an ordinary civil action. See, McLaughlin, supra at 771. Open-account suppliers may apply payments received from the debtor-contractor according to SDCL 20-4-9.

The majority’s reliance on SDCL ch. 20-4 as controlling is misplaced. SDCL ch. 20-4 applies to performance of obligations between creditors and debtors. This open account was between supplier and contractor. The supplier was the creditor. The contractor, not the owner, was the debtor. The relationship between supplier and owner was remote. A direct debtor-creditor relationship existed between supplier and contractor. SDCL 20-4-9 requires that an open-account creditor apply payments to the oldest obligation first, unless the debt- or indicates otherwise or the creditor elects. The contractor did not indicate his intent that payments be applied to materials furnished for the owner’s benefit. Supplier was fully within his rights as between himself and his debtor when he applied the payment to the oldest obligation first. See SDCL 20-4-9.

The South Dakota cases cited are distinguishable and do not support the majority opinion. In Crescent Electric Supply Co. v. Employers Mut. Cas. Co., 79 S.D. 18, 107 N.W.2d 252 (1961), the subcontractor-debtor clearly indicated his intent directly to the supplier-creditor to apply payments for a third party’s benefit, (both the subcontractor and the open-account supplier executed a written assignment of all monies due for a specific project and dual endorsed checks were issued in payment.)

F.M. Slagle & Co. v. Bushnell, 70 S.D. 250, 16 N.W.2d 914, 156 A.L.R. 1070 (1944), involved a suit directly between both parties to the open account, (the debtor himself clearly indicated his intent that payments should not be applied to the oldest obligation first by paying small amounts equalling individual purchases.) Id. In this case, the debtor made a lump sum payment ($10,000) and made no indication as to how the payment should be applied.

Hill v. Alliance Bldg. Co., 6 S.D. 160, 60 N.W. 752 (1894), is inapposite; the issues in that case involved the validity and waiver of mechanic’s liens and priority among lien-ors. (I would note, also, the court in Hill favored the lien claimant in holding the lien claimant does not waive the right to enforce his lien by accepting or assigning a promissory note for the amount of his claim.) Id. 60 N.W. at 754.

Union Central Life Ins. Co. v. Co-operative Lumber Co., 51 S.D. 197, 212 N.W. 876 (1927) is contrary to the majority’s proposition. Union Central Life, supra, in fact supports the contention that owners have a responsibility to insure that payments made to contractors are paid to suppliers and materialmen if they expect to escape enforcement of valid liens.

The majority opinion does violence to South Dakota precedent. It tends to diminish the recognized purpose of the mechanic's lien statute which has been to favor and protect suppliers and laborers. Lytle v. Morgan, 270 N.W.2d 359 (S.D. 1978); Pinkerton v. LeBeau, 3 S.D. 440, 54 N.W. 97 (1893). SDCL ch. 20-4 is effectively strained to further limit an open-account supplier’s remedies against an owner’s property under ch. 44-9. Concurrently, owners are allowed to call upon hindsight and identify or create “circumstances” which a supplier “should have known” compelled him to apply a contractor’s payment for the owner’s benefit. This virtually removes any responsibility for self-protection from an owner and places the burden squarely on the open-account supplier.

The owner in this case did nothing to protect himself. The supplier fully perfected his rights and should be protected. See, Union Central Life, 212 N.W. at 878; Wickes Comp. v. Frye, 202 Neb. 23, 273 N.W.2d 663 (1979); Dolder v. Griffin, 323 N.W.2d 773 (Minn.1982). It is not enough to say we are deciding this case based on SDCL ch. 20-4, when the effect of the decision is to substantially modify open-account supplier’s rights under SDCL ch. 44-9. If this is to be done, it should be done by the Legislature. 
      
       SDCL 20-4-9 provides:
      If neither party makes application pursuant to § 20-4-7 or § 20-4-8 within a reasonable time after performance, the performance must be applied to the extinction of obligations in the following order; and if there be more than one obligation of a particular class, to the extinction of all in that class, ratably:
      (1)Of interest due at the time of the performance;
      (2) Of principal due at that time;
      (3) Of the obligation earliest in date of maturity;
      (4) Of an obligation not secured by a lien or collateral undertaking;
      (5) Of an obligation secured by a lien or collateral undertaking.
     
      
       This is the statutory enactment of the so-called "American Rule.” As we noted in Boland v. Rapid City, 315 N.W.2d 496, 503 (S.D.1982), at footnote 4: "This court has always subscribed to the American Rule.”
     
      
      . SDCL 44-9-1 states: "Whoever shall ... furnish ... materials ... shall have a first lien ...”
     
      
      . SDCL 44-9-49 states:
      “[n]o failure to comply with any of the provisions of this chapter (mechanic's and materi-almen's liens) shall affect the right of any person to recover, in an ordinary civil action, from the party with whom he has contracted. (emphasis added).
      
        McLaughlin, supra at 770, citing, Keeley Lumber, supra; See also, Sherman v. Meyer, 312 N.W.2d 373 (S.D.1981) Ringgenberg v. Wilmsmeyer, 253 N.W.2d 197, 203 (S.D.1977) (Zas-trow, L, dissenting).
     
      
      . Union Central Life stated:
      The facts and circumstances shown do not raise any equities in favor of plaintiff (mortgagee) [owner here].... It had notice of the existence of said mortgages [lien] before it made the loan [payment], and it is charged with notice that the building material was being delivered on the premises and the barn was being constructed before it parted with its money to Treeby [owner]. If it was its intention or desire to have existing liens and encumbrances paid with the money advanced by it, it was its duty to see that the money was applied to that purpose. Not having done this, it is in the position of a mere volunteer who advanced its money to Treeby [owner] and left it optional with him as to the use that would be made of it by him. (emphasis added).
      51 S.D. at 201, 212 N.W. at 878.
     
      
      . Supplier points out no less than seven precautions the owner could have taken to avoid liability in this case:
      1.Under SDCL 44-9-14, the owner by serving a written request within 15 days after completion of the contract may require any person who may have a lien under the provisions of SDCL ch. 44-9 to furnish him an itemized and verified account of his lien claim, the amount thereof and his name and address. Thus the owner could then see to the payment of the supplier before releasing funds to the contractor.
      2. The owner can place the supplier's name on the check when he gives it to the contractor in payment of the contract. This procedure was used in Crescent Electric Supply Co. v. Employers Mut. Cas. Co., 79 S.D. 18, 107 N.W.2d 252 (1961).
      3. Before making payment to the contractor, the owner can require that the contractor provide him with a lien waiver from each of his suppliers showing that the supplier had been paid or has agreed to waive his lien rights.
      4. The owner in'his contract with the contractor can require the contractor to provide proof of payment of all suppliers before any payment is due by the owner to the contractor. Albright v. Smith, 2 S.D. 577, 51 N.W. 590, 593 (1892).
      5. In contracting with the contractor, the owner can require the contractor to provide a performance bond or other security assuring the owner that the supplier will be paid and no mechanic's liens will be filed. Albright v. Smith, Id. at 593.
      6. In his initial contract, the owner can require that no payment be made to the contractor until more than 120 days after completion of the contract in order to assure himself that no mechanic’s liens will be filed. Albright v. Smith, Id. 51 N.W. at 593.
      7. Pursuant to SDCL 20-4-7, the owner as third party creditor of the contractor can direct the contractor to make payment on the supplier’s account and can notify the supplier of such direction.
     