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 *356on 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 *357N.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.
*358All 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.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.”