Silver Creek Seed v. Sunrain Varieties

Annotate this Case
Justia Opinion Summary

The issue this case presented for the Supreme Court's review was a contract dispute between Silver Creek Seed, LLC and Sunrain Varieties, LLC, arising from the development of Bacterial Ring Rot (“BRR”) in two of the potato varieties grown by Silver Creek for Sunrain. After a four-day trial, the jury returned a verdict awarding damages to Silver Creek. Sunrain appealed: (1) the district court’s denial of a motion to reconsider an order granting partial summary judgment to Silver Creek; (2) the exclusion of the back side of the Idaho Crop Improvement Association (“ICIA”) blue tag from evidence; (3) the admission of testimony relating to the source of the BRR; (4) alleged errors in jury instructions; (5) the award of prejudgment interest to Silver Creek and (6) the award of attorney fees and costs to Silver Creek. Finding no reversible error, the Supreme Court affirmed.

Download PDF
IN THE SUPREME COURT OF THE STATE OF IDAHO Docket No. 43078 SILVER CREEK SEED, LLC, an Idaho limited liability company, ) ) ) Plaintiff-Counterdefendant) Respondent, ) ) v. ) ) SUNRAIN VARIETIES, LLC, a Delaware ) limited liability company, ) ) Defendant-Counterclaimant) Appellant. ) _______________________________________ ) Eden/Hazelton, November 2016 Term 2016 Opinion No. 140 Filed: November 30, 2016 Stephen Kenyon, Clerk Appeal from the District Court of the Fifth Judicial District of the State of Idaho, Blaine County. Hon. Robert J. Elgee, District Judge. The judgment of the district court is affirmed. Beard St. Clair Gaffney PA, Idaho Falls, for appellant. John M. Avondet argued. Wright Brothers Law Office, PLLC, Twin Falls, for respondent. Andrew B. Wright argued. _____________________ J. JONES, Chief Justice This is a contract dispute between Silver Creek Seed, LLC (“Silver Creek”) and Sunrain Varieties, LLC (“Sunrain”), arising from the development of Bacterial Ring Rot (“BRR”) in two of the potato varieties grown by Silver Creek for Sunrain. After a four-day trial, the jury returned a verdict awarding damages to Silver Creek. Sunrain timely appealed: (1) the district court’s denial of a motion to reconsider an order granting partial summary judgment to Silver Creek; (2) the exclusion of the back side of the Idaho Crop Improvement Association (“ICIA”) blue tag from evidence; (3) the admission of testimony relating to the source of the BRR; (4) alleged errors in jury instructions; (5) the award of prejudgment interest to Silver Creek and (6) the award of attorney fees and costs to Silver Creek. Both parties seek attorney fees on appeal. 1 I. FACTUAL AND PROCEDURAL BACKGROUND In May 2012, Mark Johnson, on behalf of Silver Creek, entered into a contract with Sunrain to grow seed potatoes of several proprietary varieties for Sunrain. The contract was for the seed year 2012/2013, with the seed to be resold to Sunrain following the growing season. Previous iterations (referred to as “generations”) of one of the varieties, the 84180s, had been grown in Washington State on Ebe Farms in 2010 and in Nevada in 2011. Ebe farms tested positive for BRR in 2011. Some of the Sunrain seed grown by Silver Creek in 2012, including the 84180s, was stored by Silver Creek at Sunrain’s request over the winter of 2011. The remainder of the Sunrain seed was delivered to Silver Creek prior to planting in 2012. Silver Creek cut and planted the Sunrain seed during the 2012 crop season. The resulting harvest was placed in storage by Silver Creek. In December 2012 and March 2013, Sunrain arranged for portions of the harvest to be picked up from Silver Creek and delivered to Sunrain customers. These shipments met Idaho’s certification requirements for seed potatoes. The March 2013 shipment consisted of the 84180 variety, which was sold by Sunrain to a third-party farmer. Thereafter, additional testing was conducted in contemplation of exporting a portion of the potatoes to Canada. These tests revealed the presence of BRR in the remaining 84180 and Rumba varieties. Silver Creek then conducted extensive testing on the other Sunrain potato varieties, all of which tested negative for BRR. The parties met to discuss the test results and possible options. Ultimately, it was decided to sell the infected potatoes as cattle feed. The infected potatoes were collected from Silver Creek and shipped accordingly. Sunrain did not divide proceeds from either the March 2013 shipment or the cattle feed shipment with Silver Creek. Sunrain also failed to pay Silver Creek for the remaining Sunrain varieties grown by Silver Creek that tested negative for BRR. Soon thereafter, communication between the parties broke down and Silver Creek filed suit, alleging that Sunrain had breached the contract and the implied warranties relating to the seed potatoes. Sunrain counterclaimed, alleging that Silver Creek had breached the contract by failing to pay for the seed potatoes received from Sunrain. Prior to trial, the district court granted Silver Creek’s motion for partial summary judgment. In its order, the court held that Sunrain had accepted and was obligated to pay Silver Creek for the 84180s that had been shipped prior to the positive BRR test, and that Sunrain 2 should have accepted and paid Silver Creek for the other varieties that tested negative for BRR. The case then proceeded to trial. Before the case was submitted to the jury, Sunrain moved for directed verdict on Count II of its counterclaim, which concerned payment for a portion of the seed potatoes delivered by Sunrain to Silver Creek. Silver Creek did not dispute the amount owed, so the Court granted the motion and damages associated with the counterclaim were not presented to the jury. These damages were later offset by the jury award to Silver Creek. The jury returned a verdict in favor of Silver Creek awarding $678,828.60 in damages relating to the 84180 potatoes delivered prior to the discovery of BRR and the varieties that tested negative for BRR. The jury also awarded Silver Creek $81,910.50 in damages relating to the Rumba and undelivered 84180 potatoes. Following the verdict, Silver Creek moved for prejudgment interest on the damages awarded to it by the jury. The court granted the motion and judgment was entered in favor of Silver Creek on March 13, 2015. Sunrain timely appealed. III. ISSUES PRESENTED ON APPEAL 1. Whether the district court erred by denying Sunrain’s Motion to Reconsider. 2. Whether the district court erred by excluding evidence of the ICIA’s blue certification tags. 3. Whether the district court erred by admitting testimony related to the presence of BRR on Ebe Farms. 4. Whether the district court erred in instructing the jury, specifically with regard to instructions 7–9, 12, and 19 and failing to instruct the jury on contract modification. 5. Whether the district court erred in awarding Silver Creek prejudgment interest. 6. Whether the district court erred in awarding Silver Creek attorney fees. 7. Whether any party is entitled to attorney fees on appeal. IV. STANDARD OF REVIEW The district court’s decision to grant or deny a motion for reconsideration is reviewed by this Court using the same standard of review used by the lower court in deciding the motion for reconsideration. Fragnella v. Petrovich, 153 Idaho 266, 276, 281 P.3d 103, 113 (2012). In this case, the motion was to reconsider the grant of partial summary judgment to Silver Creek. A district court must grant a motion for summary judgment if “the pleadings, depositions, and admissions on file, together with the affidavits, if any, show that there is no genuine issue as to any material fact and that the moving party is entitled to judgment as a matter of law.” Frazier v. J.R. Simplot Co., 136 Idaho 100, 102, 29 P.3d 936, 938 (2001). In making the determination, all 3 facts are construed in the light most favorable to the non-moving party. Parks v. Safeco Ins. Co. of Illinois, 160 Idaho 556, 561, 376 P.3d 760, 765 (2016). “A district court’s evidentiary rulings will not be disturbed by this Court unless there has been a clear abuse of discretion.” Navo v. Bingham Mem’l Hosp., 160 Idaho 363, 370–71, 373 P.3d 681, 688–89 (2016) (quoting Mattox v. Life Care Ctrs. of America, Inc., 157 Idaho 468, 473, 337 P.3d 627, 632 (2014)). The abuse of discretion standard requires a three-part inquiry: “(1) whether the lower court rightly perceived the issue as one of discretion; (2) whether the court acted within the boundaries of such discretion and consistent with any legal standards applicable to specific choices; and (3) whether the court reached its decision by an exercise of reason.” Id. This Court exercises free review over the propriety of jury instructions. Mackay v. Four Rivers Packing Co., 151 Idaho 388, 391, 257 P.3d 755, 758 (2011). “[T]he standard of review of whether a jury instruction should or should not have been given, is whether there is evidence at trial to support the instruction . . . and whether the instruction is a correct statement of the law.” Clark v. Klein, 137 Idaho 154, 156, 45 P.3d 810, 812 (2002) (internal citations and quotations omitted). An award of prejudgment interest by a trial court is reviewed for abuse of discretion. Dillon v. Montgomery, 138 Idaho 614, 617, 67 P.3d 93, 96 (2003). Similarly, the determination of a prevailing party for purposes of an award of attorney fees is reviewable using an abuse of discretion standard. Jorgensen v. Coppedge, 148 Idaho 536, 538, 224 P.3d 1125, 1127 (2010). V. ANALYSIS A. The district court did not err in denying Sunrain’s Motion to Reconsider. In its order for partial summary judgment, the district court held that the uninfected potatoes conformed to the terms of the contract, that they were not properly rejected by Sunrain, and that the nonconformity of one lot of potatoes (the infected 84180s) did not impair the value of the contract as a whole. Thereafter, the district court denied Sunrain’s motion to reconsider the order. On appeal, Sunrain contends that there was sufficient new evidence presented at the hearing on the motion to create genuine issues of material fact. 1. Conformity Sunrain contends that because it was unlikely the uninfected potatoes would be eligible for recertification for use as seed in the 2013/2014 seed year, Silver Creek did not fulfill the 4 terms of the contract. The contract provided that Sunrain was seeking “certified potato seed” that would “conform to Idaho Crop Improvement Association standards for the generation being delivered to Sunrain.” ICIA standards provide that “[c]ontact lots remain . . . eligible for certification provided that a laboratory test is negative for bacterial ring rot prior to final certification.” The contract provides detailed language pertaining to the seed quality standards agreed to by the parties, but there is no language requiring Silver Creek to provide seed that was recertifiable for future generations of seed potatoes. This Court has held that absent ambiguity, “[t]he rights and liabilities of parties under a contract are limited by the terms of the contract.” Pern v. Stocks, 93 Idaho 866, 868, 477 P.2d 108, 110 (1970). Silver Creek, by its performance of the requisite testing on the uninfected potatoes, rendered them certifiable under ICIA standards. The evidence suggests that certification was not completed because the potatoes were not shipped. Sunrain’s failure to take possession or arrange delivery of the uninfected potatoes, and thus complete their certification, does not render them nonconforming to the terms of the contract. The district court correctly concluded that the uninfected seed conformed to the terms of the contract because the seed had been grown and was eligible for certification pursuant to the terms of the contract. Sunrain claims that language in Idaho Code section 28-2-314, dealing with implied warranty, required the Sunrain seed to be recertifiable as seed to meet the terms of the contract. As mentioned above, extensive testing by Silver Creek on the uninfected seed rendered it certifiable under Idaho law. Thus, it would “pass without objection in the trade” and be “fit for the ordinary purposes for which such goods are used.” I. C. § 28-2-314(2)(a) and (c). Because the uninfected potatoes grown by Silver Creek were certifiable under ICIA standards, they conformed to the terms of the contract, and the district court correctly concluded there was no genuine issue of material fact as to the conformity of the uninfected potatoes to the terms of the contract. 2. Acceptance Sunrain argues that after it was notified of the positive BRR test, it rightfully rejected the remaining uninfected potatoes grown by Silver Creek. The district court found that Sunrain failed to make an unambiguous rejection because, even after the test results, it took shipment of some of the potatoes, continued to look for buyers and made a partial payment. Under the UCC, “[a]cceptance of goods occurs when the buyer . . . (b) fails to make an effective rejection . . . or 5 (c) does any act inconsistent with the seller’s ownership.” I.C. § 28-2-606(1)(b) and (c). To make an effective rejection, the buyer must notify the seller of rejection “within a reasonable time after their delivery or tender.” I.C. § 28-2-602(1). Idaho Code section 28-2-602(2)(c) also provides that “the buyer has no further obligations with regard to goods rightfully rejected.” Sunrain alleges that deposition testimony of two Sunrain executives indicated that after the positive BRR test, the remaining potatoes were rejected by Sunrain. Rejection, according to deposition testimony submitted at the hearing, occurred first in a phone conversation with the owner of Silver Creek and later in successive face to face meetings. The owner of Silver Creek, however, disputed that the remaining potatoes were refused or rejected by Sunrain and stated that words communicating rejection were never used. The two Sunrain executives did assert in their depositions that they rejected the entirety of the seed. One stated that he called Johnson and said “my understanding is that none of that seed can be recertified that was produced on that farm, and so at this moment in time, it is not something that will fit our uses under the contract. It is seed that we will have to reject as certified seed because it cannot be recertified.” The other testified that he “did make it very clear [to Johnson] that we were not going to pay for all the seed under any circumstance. Because we couldn’t resell it. We could not use it for our intended purposes, that we could not recertify it, which it had to be done for us to use.” Both witnesses contended that they rejected all of the seed, including the noninfected seed, because they could not get the seed recertified. However, as set forth above, recertification was not a requirement of the contract and provided no contractual basis for rejecting the seed, particularly not the seed that was free of BRR. Additionally, these purported rejections were made prior to Sunrain performing acts inconsistent with Silver Creek’s ownership of the seed. I.C. § 28-2-606(1)(c). The record shows that after the alleged “rejections,” Sunrain arranged to sell some of the uninfected potatoes and received payment for the sale. Sunrain also continued for some time to seek a buyer for the balance of the potatoes. Further, Sunrain made a payment of $175,000 to Silver Creek, which, as their treasurer indicated in affidavits, was in partial payment of Silver Creek invoices for the uninfected potatoes. These acts are clearly inconsistent with Silver Creek’s ownership of the potatoes and indicate that Sunrain felt a continuing obligation with regard to the potatoes. The Court of Appeals has correctly held that a buyer “must take affirmative action to avoid acceptance.” Figueroa v. Kit–San Co., 123 Idaho 149, 157, 845 P.2d 6 567, 575 (Ct. App. 1992) (citing I.C. § 28-2-602 cmt. 1). Here, although Sunrain’s deposition testimony indicates otherwise, all of the objective action taken by Sunrain indicated its acceptance of the uninfected potatoes. There was no objective action taken by Sunrain to avoid acceptance of the potatoes, only vague subjective statements claiming that rejection had been communicated. Thus, the district court correctly concluded that there was no genuine issue of material fact as to whether Sunrain accepted the uninfected potatoes. 3. Impairment Sunrain also contends that there was a genuine issue of material fact about whether the nonconformity of the March 2013 shipment of infected potatoes substantially impaired the value of the whole contract between the parties. Idaho Code section 28-2-612(3) provides that “[w]henever nonconformity or default with respect to one or more installments substantially impairs the value of the whole contract there is a breach of the whole.” However, it also provides that “the aggrieved party reinstates the contract if he accepts a nonconforming installment without seasonably notifying of cancellation.” I.C. § 28-2-612(3). As discussed above, Sunrain shipped a portion of the uninfected potatoes for cattle feed after they allege that they rejected them. This, as well as the other objective actions incongruent with rejection mentioned above, reinstated the contract between the parties per Section 28-2-612(3). B. The district court did not err when it excluded evidence of the back side of the blue ICIA certification tags. Sunrain asserts that the district court erred when it excluded from evidence the back side of the blue ICIA certification tags, which included language disclaiming warranties on the potatoes and limiting potential damages to the purchase price of the seed. The trial transcript indicates that the district court carefully considered whether to admit the proffered blue tag evidence, even taking a recess to review a case cited by Sunrain’s counsel. Ultimately concluding that the blue tag evidence was inadmissible, the district court held the language on the back side of the blue tag lacked sufficient foundation and was not part of the agreement between the parties. The court’s deliberation on the issue reveals that it correctly perceived the issue as discretionary. Although this Court in Duffin v. Idaho Crop Imp. Ass’n, 126 Idaho 1002, 895 P.2d 1195 (1995), concluded that whether the blue tags are part of a contractual agreement between parties was a factual inquiry for the jury, that case dealt with different parties and a different underlying agreement. 7 Here, the owner of Silver Creek admitted the extensive use of the blue tags in potato farming to indicate certification, but did not consider the language on the back of the blue tags as part of the agreement between the parties. Further, there was no evidence that the parties discussed the blue tags, disclaimers of warranties, or limitation of remedies when the agreement was reached. Although trial testimony indicated that at least one Sunrain executive assumed the language on the blue tag was part of the agreement, it was not expressly discussed between the parties. Most importantly, the written contract contains no references to the blue tags, nor does it incorporate the language on the back side. Instead, it declares that the contract contains “the entire [a]greement between the parties” and “shall not be modified except by an agreement in writing executed by all parties.” It also states that it may only be amended “by written instruction signed by all parties.” The district court’s decision to exclude the blue tag evidence was clearly within applicable legal standards and was reached after careful deliberation. Because the trial court correctly perceived the issue as one of discretion, acted within applicable legal standards and exercised reason in reaching its decision, there was no abuse of discretion. C. The district court did not err when it admitted testimony regarding the presence of BRR on Ebe Farms. Sunrain contends that the district court erred when it allowed the admission of testimony by Jeff Bragg, a former Sunrain employee, regarding the source of the BRR. It takes issue with the following testimony: SILVER CREEK: Are you aware of any instances of ring rot being found in Greg Ebe’s potatoes? MR. BRAGG: Yes. SUNRAIN: I’m going to object to the form. Calls for hearsay. THE COURT: Overruled. MR. BRAGG: I did. SILVER CREEK: Are you aware of any ring rot being found in Greg Ebe’s potatoes? SUNRAIN: Same objection. THE COURT: You can answer that and then we’ll go to the next objection. MR. BRAGG: Yes. SILVER CREEK: Do you know when that ring rot was found in Greg Ebe’s potatoes? SUNRAIN: Same objection. And I guess at this point I’m going to put a standing objection on the record, just to expedite things, that any testimony regarding bacterial ring rot from this witness from Greg Ebe’s is calling for hearsay. 8 SILVER CREEK: Go ahead. THE COURT: Wait, wait, wait. Overruled. You can answer. SILVER CREEK: Go ahead. MR. BRAGG: One of the last places I ever thought would ever have any ring rot, this gentleman called me. So that’s why you remember things like that. Greg Ebe is a very, very good grower and he called me and told me himself that he had had ring rot. But this was not one of the lots and this was after, a year later, that it was found. SILVER CREEK: Greg Ebe himself called you and told you about ring rot on his farm? SUNRAIN: Your Honor, I’ll object. It’s hearsay. THE COURT: It’s an admission SUNRAIN: Greg Ebe is not our – he’s not us, You Honor. He’s conveying what Mr. Ebe told him. THE COURT: Yes, he is. It still – it still comes under the admission exception to the hearsay rule. SUNRAIN: But he – okay. THE COURT: Yes. SILVER CREEK: Go ahead. MR. BRAGG: Yes, because that’s what you do when you’re a good producer. You lay it on the line to your clients. SILVER CREEK: And do you happen to recall when Greg told you that? SUNRAIN: Same objection, Your Honor. THE COURT: Overruled. SUNRAIN: Hearsay. THE COURT: Overruled. Hearsay is “a statement, other than one made by the declarant while testifying at the trial or hearing, offered in evidence to prove the truth of the matter asserted.” I.R.E 801(c). The Idaho Rules of Evidence provide that hearsay is inadmissible unless it fits within a specific enumerated exception. I.R.E. 802. Certain types of statements are excluded from the definition of hearsay. Admission by a party-opponent or “[a] party’s own statement, in either an individual or a representative capacity” is one such exception. I.R.E. 801(d)(2)(A). Silver Creek was seeking to elicit testimony regarding a conversation between Mr. Bragg, then a Sunrain employee, and Mr. Ebe, a grower, related to the presence of BRR on Ebe Farms. Sunrain objected on hearsay grounds and the court overruled the objection several times. Only later in the colloquy did the court state its reason for overruling Sunrain’s objection: that it viewed the contents of the conversation between Mr. Bragg and Mr. Ebe as an admission of a 9 party opponent and therefore outside the definition of hearsay. Sunrain argues that the district court committed reversible error in admitting this testimony. Silver Creek presents three arguments in response: (1) that it was not offering Bragg’s testimony to prove the existence of BRR at Ebe Farms, but to show Sunrain’s notice of the presence of BRR infection in the source of the potatoes that it subsequently furnished to Silver Creek; (2) that Bragg’s statements regarding knowledge of the BRR infection qualify as admissions of a party opponent because he was acting on behalf of Sunrain at the time; and (3) that any error occasioned by admitting Bragg’s testimony related to BRR on Ebe Farms would be harmless because “there was ample evidence—including exhibits offered by Sunrain, testimony from other Sunrain employees, and testimony from expert witnesses—regarding BRR on Ebe Farms that was presented and admitted without objection from Sunrain.” With regard to Silver Creek’s third contention, this Court has held that “[a] judgment may not be disturbed on appeal due to error in an evidentiary ruling unless the error affected the substantial rights of a party.” In Interest of S.W., 127 Idaho 513, 519, 903 P.2d 102, 108 (1995); see also I.R.C.P. 61. There were numerous other instances at trial when evidence relating to the presence of BRR on Ebe Farms was admitted without objection, including trial testimony from other witnesses and exhibits indicating that fact. Some of that evidence was presented by Sunrain. Therefore, any alleged error by the trial court was harmless. Admission of this testimony did not impinge upon a substantial right of Sunrain, especially in light of the other admitted evidence establishing the underlying fact. D. The district court did not err in instructing the jury. Sunrain contends that jury instructions 7–9 and 19 were given in error. Instructions 7, 8 and 19 clarified the scope of the jury’s determinations by explaining the conclusions reached by the court in the partial summary judgment order. Instruction 9 mirrored Idaho Code section 28-2606 in instructing what, under the law, constitutes acceptance. As discussed above, the district court’s summary judgment determination was appropriate in light of the evidence before it. Clearly, there was evidence presented at trial supporting these instructions. Sunrain also contends that the district court erred in giving instruction 12 to the jury. Instruction 12 defines latent defects and discusses the potential applicability of implied warranties to them. Sunrain contends that the only evidence presented at trial to support the implication that the 84180s were infected with BRR prior to their sale to Silver Creek was the 10 testimony of Mr. Bragg, which they argue was admitted in error. Testimony from at least two other witnesses and a document offered into evidence by Sunrain referred to the BRR infection at Ebe Farms and the fact that a previous iteration of the 84180s had been grown at Ebe Farms. This evidence, in addition to expert testimony presented at trial that BRR can remain latent in infected potatoes for years, supports the implication that the 84180s were infected at the time of sale. This was sufficient evidence to support the instruction on latent defects. Additionally, the Ninth Circuit has declared that “[u]nder Idaho law, an implied warranty may be breached by a latent defect that could not have been discovered during an inspection at delivery.” Millenkamp v. Davisco Foods Intern., Inc., 562 F.3d 971, 982 (9th Cir. 2009). Thus, instruction 12 was supported by evidence presented at trial and was a correct statement of the law. Sunrain assigns error to the failure of the district court to instruct the jury on contract modification. Sunrain asserts that the use of the blue tags rendered them part of the agreement between the parties and thus modified the contract. As discussed above, the district court declined to admit the back side of the blue tag. Because this evidence was never before the jury, the district court properly declined to instruct the jury regarding it. Sunrain asserts that communications regarding the sale of the uninfected potatoes as cattle feed constituted a new agreement between the parties that necessarily modified the underlying contract. However, Idaho Code section 28-2-209(2) states that “[a] signed agreement which excludes modification or rescission except by a signed writing cannot be otherwise modified or rescinded.” That is exactly the case here. There is a formal, signed writing between the parties that excludes modification except by execution of another writing signed by both parties. The communications cited by Sunrain were text messages between the owner of Silver Creek and his contact at Sunrain regarding the sale of some of the potatoes as cattle feed. Text messages are not sufficient to modify the contract under either the contract itself or the applicable Idaho law. Thus, the district court correctly declined to instruct the jury on modification. E. The district court did not err in awarding prejudgment interest to Silver Creek. Sunrain asserts that the district court erred in awarding Silver Creek prejudgment interest because the potatoes never met the seed quality standards outlined in the contract and because Silver Creek’s claim was not liquidated or ascertainable at the time of trial. However, as noted above, the district court determined as a matter of law that the uninfected potatoes grown by 11 Silver Creek met the seed quality standards outlined in the contract. A careful reading of the contract supports this determination. “Idaho Code § 28-22-104 . . . has been interpreted to allow prejudgment interest where the amount of liability is liquidated or capable of ascertainment by mathematical process.” Child v. Blaser, 111 Idaho 702, 706, 727 P.2d 893, 897 (Ct. App. 1986). Sunrain asserts that the amount owed to Silver Creek under the contract was unascertainable until after disputed issues were resolved at trial. However, the amount of liability was ascertainable by mathematic formula—and that is exactly how it was calculated. Amounts on the jury form, which corresponded to the contract rates for the uninfected potatoes and the infected potatoes sold prior to positive testing, were added together to determine the amount owed to Silver Creek. The undisputed amount owed to Sunrain was then offset by this total amount, prejudgment interest was added and the result was awarded to Silver Creek in the final judgment. Sunrain also asserts that the district court erred in declining to award Sunrain prejudgment interest on its counterclaim. The amount owed to Sunrain by Silver Creek in Count II of the counterclaim was undisputed, so the district court granted a directed verdict on Count II. Because the owner of Silver Creek had offset the amount owed by Silver Creek to Sunrain by greater amounts owed by Sunrain to Silver Creek, the trial court did not award prejudgment interest to Sunrain. At a hearing on the motion to obtain relief from the judgment, the trial court’s discussion on the prejudgment issue reveals that the judge correctly perceived the issue as discretionary. It also reflects a decision reached in accordance with applicable legal standards and after an exercise of reason. Therefore, the trial court did not abuse its discretion in awarding prejudgment interest to Silver Creek and in declining to award prejudgment interest to Sunrain. F. The district court did not err in awarding attorney fees and costs to Silver Creek. Sunrain asserts that because it was granted directed verdict on the undisputed amount of its counterclaim, there was no prevailing party in the action. It further alleges that Silver Creek is restricted to the fees and costs awardable under Idaho Rule of Civil Procedure 54(d)(1), 54(e)(1) and Idaho Code section 12-120 as pleaded, rather than recovering attorney fees and actual costs under the terms of the contract. Rules promulgated by this Court provide that “costs are allowed as a matter of right to the prevailing party” and that “[i]n determining which party to an action is . . . entitled to costs, the trial court must, in its sound discretion, consider the final judgment or result of the action in 12 relation to the relief sought by the respective parties.” I.R.C.P. 54(d)(1)(A) and (B). The district court held that, despite Sunrain’s strenuous arguments to the contrary, the undisputed amount granted to Sunrain on directed verdict was not a central issue at trial, was not litigated and was not ever disputed by Silver Creek. Silver Creek was then identified by the trial court as the prevailing party because it prevailed not only on the largest claims but also on all the claims it presented to the court. The court’s decision was on sound legal ground. See Lickley v. Max Herbold, Inc., 133 Idaho 209, 984 P.2d 697 (1999) (holding that one party’s success on the greatest issue in the case made them the prevailing party). As such, this was an appropriate exercise of discretion. The district court expressly recognized the issue as one of discretion, applied applicable legal standards and reached its conclusion after an exercise of reason. The district court held that Silver Creek was entitled to an award of attorney fees under both the contract and commercial transaction provisions of Idaho Code section 12-120(3). The district court further concluded that Silver Creek was entitled to recover actual fees and costs under the terms of the contract. The contract provides that, if litigation should occur between the parties, “the prevailing party shall be entitled to recover actual attorney fees and costs incurred in such litigation.” The contract provision clearly supports an award of attorney fees to Silver Creek. G. Attorney fees on appeal. Both Sunrain and Silver Creek seek attorney fees on appeal. Silver Creek has prevailed on appeal and is entitled to recover its attorney fees on appeal pursuant to the contract provision. VI. CONCLUSION The judgment of the district court is affirmed in all respects. We award Silver Creek its costs and attorney fees on appeal. Justices EISMANN, BURDICK, W. JONES and HORTON CONCUR. 13