
516 P.2d 1275 (1973)
Richard E. WEBSTER, Respondent and Cross-Appellant,
v.
GENERAL MOTORS ACCEPTANCE CORPORATION and Goodwin Brothers Gmc Trucks, Inc., Appellants and Cross-Respondents.
Supreme Court of Oregon.
Argued and Submitted October 15, 1973.
Decided December 13, 1973.
*1276 J. Philip Parks, Salem, argued the cause for appellants and cross-respondents. With him on the briefs were Miller, Beck & Parks, Salem.
Dennis W. Bean, Silverton, argued the cause and filed a brief for respondent and cross-appellant.
Before O'CONNELL, C.J., and DENECKE, HOLMAN, TONGUE, HOWELL, and BRYSON, JJ.
HOWELL, Justice.
Plaintiff filed this action to recover a surplus from a foreclosure sale of a used truck which he had purchased from defendant Goodwin Bros., Inc. The trial court, sitting without a jury, entered a judgment for plaintiff for $6,636.84. Defendants appeal, and plaintiff cross-appeals from the refusal of the trial court to award attorney fees.
Plaintiff filed the action pursuant to the terms of ORS 79.5040(2) which states, in pertinent part:
"(2) If the security interest secures an indebtedness, the secured party must account to the debtor for any surplus, and, unless otherwise agreed, the debtor is liable for any deficiency. * * *"
The facts are generally undisputed.
In November, 1970, plaintiff purchased a used 1970 truck from defendant for $23,500. Plaintiff paid $4,500 in cash, and an installment contract was executed requiring plaintiff to make monthly payments. The contract was assigned by Goodwin Bros. to defendant General Motors Acceptance Corporation. Plaintiff defaulted and foreclosure proceedings were initiated. In April, 1971, the truck was resold by Goodwin Bros. for $29,056. The purchaser paid $21,494.40 in cash and was allowed $7,561.60 on a trade-in vehicle which was sold by Goodwin Bros. three months later for $1,400.
The dispute arises over how the surplus after the foreclosure should be computed. Plaintiff contended, and the trial court found, that the surplus should be based on the trade-in allowance of $7,561 which Goodwin Bros. allowed the purchaser when the truck was resold after the foreclosure proceedings.[1] Defendants contend *1277 that the surplus should not be computed on the amount allowed for the trade-in but on the fair market value of the trade-in vehicle.[2] The defendants concede that a surplus of $475.84 existed in favor of plaintiff, and defendants offered that amount to plaintiff by an offer of compromise filed in the trial court.
We conclude that the surplus in favor of plaintiff should be computed by using the actual market value of the trade-in vehicle, which in this case amounted to $1,400.
To determine whether a surplus existed by using the trade-in allowance instead of the actual market value of the trade-in vehicle would be unrealistic and potentially unfair to both the debtor and the seller. In the instant case, plaintiff paid $23,500 for the truck he purchased from defendants. Five months later, after plaintiff defaulted, the same truck was sold by Goodwin Bros. for $29,056, which included the trade-in allowance of $7,561. It is impractical to assume that the truck increased approximately $6,000 in value during the five-month period. The record does not show how Goodwin Bros. and the purchaser arrived at the value of $7,561 for the trade-in vehicle, except that that amount was insisted upon by the purchaser although he had paid only $2,065 for it a month previously. After the sale the trade-in vehicle was carried on Goodwin Bros.' books at a value of $1,250 and finally sold to a dealer in Salem for $1,400. To use the amount of the trade-in would be completely unfair to Goodwin Bros., because the transaction did not result in a surplus in that amount.
A determination of surplus or deficiency on the basis of a trade-in allowance instead of market value could be equally unfair to the debtor whose vehicle was repossessed and sold. If upon the sale a trade-in vehicle was accepted and the amount allowed on the trade-in was below market value, it could result in a deficiency for which the debtor would be liable under the statute.
The surplus should have been computed using the sum of $1,400 as the market value of the trade-in vehicle, and a judgment in favor of plaintiff for $475.84 should have been entered.
The only remaining issue is whether plaintiff is entitled to attorney fees. The trial court, in awarding plaintiff a judgment of $6,636.84, refused plaintiff's request for attorney fees.
Plaintiff contends that he is entitled to attorney fees under ORS 20.096(1), which states:
"In any action or suit on a contract, where such contract specifically provides that attorney fees and costs incurred to enforce the provisions of the contract shall be awarded to one of the parties, the prevailing party, whether he is the party specified in the contract or not, at trial or on appeal, shall be entitled to reasonable attorney fees in addition to costs and necessary disbursements."
The conditional sales contract between plaintiff and Goodwin Bros. provides for attorney fees in favor of the seller. It states:
"4. Time is of the essence of this contract. In the event that any instalment shall not have been paid within ten (10) days after the date on which it becomes due and payable hereunder, the seller may collect, and the buyer hereby agrees to pay, a charge in an amount *1278 equal to five per cent (5%) of each such unpaid instalment, or five dollars, whichever is less. The buyer agrees to pay reasonable collection costs, and in the event this contract is placed in the hands of an attorney, not a salaried employe of the holder of the contract, for collection, to pay a reasonable amount as attorney's fees, plus court costs.
"* * * * *
"6. * * * In the event of repossession of said property the seller shall have such rights and remedies as are provided and permitted by law, including the right to retain from the proceeds of disposition of said property attorney's fees in the amount provided in paragraph #4 above, and other legal expenses incurred for the purpose of retaking and disposing of said property."
As the contract provides that "the seller shall have such rights and remedies as are provided and permitted by law," when the repossession and sale resulted in a deficiency the seller would be entitled to recover that deficiency from the plaintiff under ORS 79.5040(2). Under the contract the seller would also be entitled to recover such attorney fees as were necessarily expended to effect the "disposition of the property." Thus, if the seller could recover attorney fees incurred to completely dispose of the repossessed chattel and collect any deficiency, then the buyer, under ORS 20.096(1), similarly can recover attorney fees if he prevails in an action to recover any surplus which might result from the foreclosure sale.
The right to a deficiency, if any, while it may be characterized as a statutory right, was incorporated into the contract by express provision, and because attorney fees would have been provided to the seller if a deficiency resulted after foreclosure, they also should be allowed to a buyer if a surplus results and he is forced to incur attorney fees to collect that surplus.
The defendants cite Chaney v. Fields Chevrolet Co., 264 Or. 21, 503 P.2d 1239 (1972), for the proposition that any right to a surplus is statutory, and because ORS 79.5040(2) does not provide for attorney fees they may not be awarded the plaintiff. That case involved an action to recover the surplus after a repossession sale and the issue presented was the applicable statute of limitations under the Uniform Commercial Code. We held that the statute of limitations period contained in Article 2 of the Uniform Commercial Code did not apply and, because Article 9 of the Code had no specific limitation period, the general statute of limitations, ORS 12.080, applied. We did not decide whether the right to any surplus was contractual or statutory because for purposes of the statute of limitations the same six-year period existed.
In this case we hold that for purposes of the application of ORS 20.096(1) one of the rights created in the seller under this contract is that upon default he may collect any deficiency which might result if the disposition of the property does not create enough proceeds to satisfy the debt and attorney fees. Similarly, the buyer (the plaintiff) has the right to collect any surplus which might result from the sale and may collect attorney fees if he is the prevailing party under ORS 20.096(1).
While the defendants made an offer to compromise the plaintiff's claim on the day of trial in an amount which we have determined to be correct, this offer was not accepted by the plaintiff. Because the plaintiff failed to accept the offer of compromise and because he did not receive an award in excess of the offer, he should recover attorney fees only for those services rendered up to the time of the offer.
Reversed and remanded to determine the amount of reasonable attorney fees for plaintiff, and to enter a judgment for plaintiff in the amount of $475.84 plus such attorney fees.
NOTES
[1]  Plaintiff computes the surplus as follows:



Contract price of $21,494.40 on
 sale of repossessed truck, plus
 trade-in allowance of $7,561.60      $29,056.00
Less amount owed by plaintiff to
 Goodwin Bros. at time of resale      -22,419.16
                                      ___________
  Surplus owed to plaintiff            $ 6,636.84

[2]  Defendants have computed the surplus as follows:



Contract price on sale of repossessed
 truck including trade-in
 allowance                            $29,056.00
Less trade-in allowance                -7,561.00
                                      __________
                                       21,495.00
Plus amount actually received on
 subsequent sale of trade-in           +1,400.00
                                     ___________
                                       22,895.00
Less amount owed by plaintiff
 to Goodwin Bros. at time of
 resale                               -22,419.16
                                     ___________
  Surplus owed to plaintiff           $   475.84

