
    QUALITY PERFORMANCE LINES, a corporation, Plaintiff and Respondent, v. YOHO AUTOMOTIVE, INC., a corporation, Defendant and Appellant.
    No. 16101.
    Supreme Court of Utah.
    March 28, 1980.
    
      Richard C. Dibblee of Roberts, Black & Dibblee, Salt Lake City, for defendant and appellant.
    Ben G. Bagley, Midvale, for plaintiff and respondent.
   MAUGHAN, Justice:

Defendant appeals the decision of the lower court following a trial without jury. We remand to the trial court for judgment in accordance with this opinion. We reverse in part, and remand with instructions. Costs to defendant. All statutory references are to Utah Code Annotated, 1953.

Quality Performance Lines, the plaintiff in this action (hereinafter referred to as Quality), rebuilds and sells automotive components. One of Quality’s customers between 1966 and early 1975 was the defendant, Yoho Automotive, Inc. (hereinafter referred to as Yoho), a warehouse distributor. Yoho stocked and sold large quantities of brakeshoes, which it obtained from Quality. Yoho paid a 75 cent deposit for each brake shoe it purchased, and regularly turned in used brake shoe cores (the relineable portion of the brake shoe) for credit against its account. The trial court found over the years, Yoho turned in fewer cores than it purchased, building up a core credit of $8,238.01 by the end of February 1975. The parties terminated their relationship in March 1975. In January and February 1975, fearing it would not be allowed to recover the deposits held by Quality, Yoho ran up a bill of $5,018.84 which it intended to pay by returning cores. Credits from core turn-ins reduced the amount to $4,807.42. Quality refused to accept further cores in payment and sued to recover the debt. In answer, Yoho offered to pay the debt in cores and, in counterclaim, alleged Quality had overcharged it for core deposits by $6,590.40.

Following a trial on the merits, the district court dismissed defendant’s counterclaim as not supported by any evidence and found defendant had no cores in its possession when plaintiff demanded payment of the debt and when defendant filed its answer. The court ruled Quality was entitled to judgment against Yoho for $4,807.42 plus interest and costs. Later, the court amended its judgment to allow defendant to return up to 2,450 cores for a credit of $1,837.50 against its debt. This offset represents the number of cores defendant purchased when it incurred its debt and on which it would have been required to pay deposits.

The issue on appeal is simply stated: after the parties terminated their relationship, did defendant have a right to credit for cores in its possession or accessible to it? Defendant claims the court acted arbitrarily and capriciously by allowing it to pay only a portion of its debt with cores, and by not allowing it to recover all its core deposits. Defendant argues the court altered the contract of the parties and their course of dealing over several years.

In assessing defendant’s claims, the first step is to examine the agreement between the parties. Quality and Yoho apparently never made a written contract, but a contract can be implied from their conduct. An implied contract is “one where the mutual intent [of the parties] is manifested by particular acts and attendant circumstances.” In addition to their acts, the testimony of the parties showed they had a running account and had reached agreement about the conduct of certain aspects 'of their relationship. The evidence shows Yoho acted as a distributor of Quality’s products. Although a distributorship agreement is more involved than a typical sales contract, it is subject to Utah’s Uniform Commercial Code. Under the Code the court can imply aspects of an agreement from the parties’ course of performance:

“Where the contract for sale involves repeated occasions for performance by either party with knowledge of the nature of the performance and opportunity for objection to it by the other, any course of performance accepted or acquiesced in without objection shall be relevant to determine the meaning of the agreement.”

Utah Code Annotated, 70A-2-208(l).

In the present case, the course of performance of the parties in two areas is especially significant: the time allowed for core turn-ins and the means of giving credit for cores. Yoho received credit for all cores it turned in to Quality as well as cores its customers turned in. At Trial, Quality claimed that at the end of the year it reduced all core accounts to zero. The course of performance of the parties, however, indicates their agreement was otherwise. Yoho’s core account was credited whenever it turned in cores, without regard to a particular cutoff date. The only restriction was Yoho could not “over return” cores, that is, turn in more cores than it had purchased. The parties also understood that after Yoho bought brakeshoes, a certain amount of time was required for it to recover the used cores from its own customers. Yoho estimated this time period at between six and nine months, and its records in general substantiate that claim.

In addition to the parties’ understanding about the time allowed for core turn-ins, they apparently agreed on the manner in which Yoho was to be compensated for cores. Yoho received credit for turn-ins, never cash. This is shown by the testimony of the parties as well as by defendant's conduct. When it appeared the parties’ relationship would soon end, defendant ran up its bill in hopes that it could offset the debt with cores and thus recoup at least part of its core deposits. Judging by its actions, defendant did not expect to obtain cash for the core deposits it had built up. In addition, defendant did not demand cash in return for cores either at the date of termination or in its answer and counterclaim.

Given the parties’ course of performance in the above two areas, we cannot agree with the trial court’s position that defendant was entitled to offset its debt only with cores in its possession at the time plaintiff demanded payment in late February or early March 1975. Although the court ultimately allowed defendant to turn in $1,837.40 worth of cores, this represents only the amount of the core deposits owing on the debt. In other words, instead of making defendant pay the deposit, the court allowed it to turn in an equivalent number of cores. The court was justified in its action but did not go far enough. We feel the court also should have considered the parties’ course of performance and allowed defendant a reasonable time after termination to recover cores from its late 1974 purchases. Our position is supported by the Code, which provides, “[o]n ‘termination’ all obligations which are still executo-ry on both sides are discharged but any right based on prior breach or performance survives.” 70A-2-106(3). Thus, under the Code defendant’s right to a reasonable time to gather cores for turn-in is not destroyed by termination of the parties’ relationship.

We conclude, after termination, defendant was entitled to a reasonable timé in which to recover cores from its late 1974 purchases. We do not disturb the trial court’s amended holding allowing defendant to turn in 2,450 cores from purchases in 1975. We place an important qualification on our holding, however. Although defendant is entitled to turn in enough usable cores to cover his $4,807.40 debt, defendant is not entitled to turn in cores for cash. Throughout the course of their dealings the parties operated on the basis that credit rather than cash would be allowed for core turn-ins. It would be unjust for the court to restructure their understanding at this point. In summary, defendant should be allowed a reasonable time to turn in to plaintiff, up to 6,410 usable cores. This figure includes the 2,450 cores the trial court allowed defendant to turn in. Any number short of 6,410 not turned in, at the close of the reasonable time period, shall be paid for in cash.

Remanded to the trial court for judgment in accordance with this opinion.

CROCKETT, C. J., and WILKINS and STEWART, JJ., concur.

HALL, J., concurs in the result. 
      
      . Gleason v. Salt Lake City, 94 Utah 1, 74 P.2d 1225, 1227 (1937). See also Morgan v. Board of State Lands, 549 P.2d 695, 697 (1976).
     
      
      . “Although most distributorship agreements, like franchise agreements, are more than sales contracts, the courts have not hesitated to apply the Uniform Commercial Code to cases involving such agreements.” Corenswet, Inc. v. Amana Refrigeration, Inc., 594 F.2d 129 (5th Cir. 1979).
     
      
      . The code defines an agreement as “the bargain of the parties in fact or as found in their language or by implication from other circumstances including course of dealing or usage of trade or course of performance as provided in this act.” Utah Code Ann. 70A-1-201.
     
      
      .A letter from the manager of Quality to Yoho dated April 13, 1967, which sets out some of the conditions of the parties’ agreement, contains the following statement: “I don’t want to buy our finished brake shoes back without penalty, but we will pay cash, your credit balance, if it is caused by core returns that legitimately clear.” Although Quality says it will “pay cash,” the statement appears to mean that Yoho’s account would be credited. The subsequent dealings of the parties and their testimony at trial give no indication that Yoho ever received cash for core turn-ins.
     