I. FACTUAL AND PROCEDURAL HISTORY
On August 2, 2002, AmerisourceBergen Corporation1 brought suit against Dialy-sist West, Inc. alleging that Dialysist West breached a sales agreement concerning the sale of the drug Epogen S40. Following its determination that 50% to 100% of the Epogen it purchased from Dialysist West was counterfeit, AmerisourceBergen withheld payments due Dialysist West on non-Epogen drug sales. On May 18, 2003, Dialysist West filed a counterclaim demanding that AmerisourceBergen pay the approximately $2.2 million it owed for the non-Epogen products Dialysist West had shipped to AmerisourceBergen. On May 30, 2003, AmerisourceBergen filed a reply to Dialysist West’s counterclaim conceding that it had not paid for the non-Epogen products and that these products were genuine. On August 25, 2003, Amerisour-ceBergen filed a cross-motion for leave to amend its complaint and its reply to Dialy-sist West’s counterclaim, changing its tack by alleging that Dialysist West also sold it counterfeit, non-Epogen products (namely Procrit). On January 6, 2004, the district court granted Dialysist West’s motion for judgment on the pleadings, denied Ameri-sourceBergen’s motion for leave to amend, and certified the judgment as final under *1135Federal Rule of Civil Procedure 54(b). On March 3, 2004, the district court denied AmerisourceBergen’s motion to stay execution of judgment and AmerisourceBer-gen filed this appeal on March 24, 2004.
II. JURISDICTION & STANDARD OF REVIEW
We have subject matter jurisdiction over the final decision of the district court pursuant to 28 U.S.C. § 1291. We review the district court’s interpretation of Arizona contract law de novo. El-Hakem v. BJY Inc., 415 F.3d 1068, 1072 (9th Cir.2005). The denial of AmerisourceBergen’s motion for leave to amend is reviewed for abuse of discretion. See Bowles v. Reade, 198 F.3d 752, 757 (9th Cir.1999). The district court’s Rule 54(b) certification of the judgment is reviewed de novo to determine if it will lead to “piecemeal appeals” and for “clear unreasonableness” on the issue of equities. See Gregorian v. Izvestia, 871 F.2d 1515, 1519 (9th Cir.1989). The district court’s refusal to stay enforcement of the judgment under Rule 62(h) is reviewed for abuse of discretion. See MacKillop v. Lowe’s Mkt., Inc., 58 F.3d 1441, 1446 (9th Cir.1995).
III. DISCUSSION
A. Setoff of Epogen Claims
AmerisourceBergen claims that the district court erred in finding that it could not set-off the approximately $2.2 million it owes Dialysist West for non-Epogen, pharmaceutical purchases against the estimated $8 million judgment it seeks from Dial-ysist West for selling AmerisourceBergen counterfeit Epogen. AmerisourceBergen bears the burden of establishing that it is entitled to either a legal or equitable setoff of its claims. See Newbery Corp. v. Fireman’s Fund Ins. Co., 95 F.3d 1392, 1399 (9th Cir.1996).
AmerisourceBergen and Dialysist West agree that section 47-2717 of the Arizona Commercial Code applies. The Arizona statute, a codification of section 2-717 of the Uniform Commercial Code, provides:
The buyer on notifying the seller of his intention to do so may deduct all or any part of the damages resulting from any breach of the contract from any part of the price still due under the same contract.
Ariz.Rev.Stat. § 47-2717 (2006). A plain reading of the statute indicates that a party may not set-off a contractual claim against a debt on a separate contract. See ITV Direct, Inc. v. Healthy Solutions, LLC, 379 F.Supp.2d 130, 133 (D.Mass.2005) (“Section 2-717 is not a general set-off provision permitting a buyer of goods to adjust its continuing contract obligations according to the equities perceived by the buyer.”).
AmerisourceBergen concedes that the contracts for sale of Epogen and the other drugs were separate contracts. But because the Vendor Agreement signed by Dialysist West permits AmerisourceBer-gen to return any goods to Dialysist West for “full credit,” AmerisourceBergen believes it was justified in applying the credit it held for the counterfeit Epogen purchases against its outstanding debts. Am-erisourceBergen’s reading of the Vendor Agreement is strained.2 The Vendor Agreement does not indicate that Ameri-sourceBergen can offset one deficient transaction against another transaction. Rather, as the district court pointed out, “[t]he plain language of the provision links the allowable credit to the specific returned goods.” AmerisourceBergen Corp. v. Dialysist West, Inc., No. CIV-02-1472 PHX JWS, slip op. at 13 (D.Ariz. Jan. 6, 2004).
*1136The contract clause is not ambiguous, as AmerisourceBergen argues. The intention of the parties is clear: to create a return policy by which AmerisourceBergen can fully recover for returned goods that do not meet its standards. See Smith v. Melson, Inc., 135 Ariz. 119, 659 P.2d 1264, 1266 (1983) (stating that a contract should be read in light of the intentions of the parties as reflected in the language and circumstances of the contract); see also ECHO, Inc. v. Whitson Corp., 52 F.3d 702, 705 (7th Cir.1995) (holding under Illinois law that in applying UCC section 2-717, purchase orders cannot be setoff against damages buyer sustains as result of breach of related distributorship agreement).
Furthermore, AmerisourceBergen has provided no evidence that it was the pattern or practice of the parties or industry custom to offset deficiencies in one sales contract by giving discounts or “credit” on other sales contracts. See Mohave Valley Irrigation & Drainage Dist. v. Norton, 244 F.3d 1164, 1166 (9th Cir.2001) (“According to the UCC, to determine whether a contract’s terms are ambiguous, courts may only consider evidence of course of dealing, trade usage, or course of performance.”). The district court did not err in holding that AmerisourceBergen had no legal right to set-off its Epogen claims against its other contractual claims.
AmerisourceBergen argues that even if it is not entitled to offset its debt under section 47-2717 of the Arizona Commercial Code, Dialysist West’s insolvency affords it an equitable right of setoff under Arizona common law. But Amerisource-Bergen’s claim to equitable setoff is preempted by 47-2717. Arizona’s Commercial Code provides that “principles of law and equity” apply “unless [displaced] by the particular provisions of this title.” Ariz.Rev.Stat. § 47-1103 (2006); see also John Deere Co. v. First Interstate Bank, 147 Ariz. 256, 709 P.2d 890, 894 (App.1985). Although no Arizona court has ruled on whether section 47-2717 preempts a common law claim for setoff, several federal courts have indicated that the corresponding UCC section preempts equitable set-offs. See ITV Direct, 379 F.Supp.2d at 133; Carlisle Corp. v. Uresco Const. Materials, Inc., 823 F.Supp. 271, 275 (E.D.Pa.1993). As the court convincingly reasoned in Carlisle, because the UCC “specifically provides for set-offs in particular circumstances ... we must conclude that the Code drafters, and the state legislatures that have adopted the Code, meant to displace common law set-off.” Carlisle, 823 F.Supp. at 275. It is apparent that the Arizona legislature intended section 47-2717 to supercede the common law of set-off. The district court did not err in denying AmerisourceBergen’s common law claim for equitable setoff.
B. Denial of Leave to Amend
AmerisourceBergen appeals the district court’s decision to deny it leave to amend its reply pursuant to Fed.R.Civ.P. 15(a).3 Rule 15(a) is very liberal and leave to amend “shall be freely given when justice so requires.” See Bowles v. Reade, 198 F.3d 752, 757 (9th Cir.1999). But a district court need not grant leave to amend where the amendment: (1) prejudices the opposing party; (2) is sought in bad faith; (3) produces an undue delay in litigation; or (4) is futile. Id. at 758; Jackson v. Bank of Hawaii, 902 F.2d 1385, 1387 (9th Cir.1990).
*1137The district court found that Amer-isourceBergen’s motion to amend its reply and allege that non-Epogen drugs (Pro-crit) that it had purchased from Dialysist West were counterfeit was both untimely and prejudicial to Dialysist West. In evaluating undue delay, we ask “whether the moving party knew or should have known the facts and theories raised by the amendment in the original pleading.” Jackson, 902 F.2d at 1388. We have held that an eight month delay between the time of obtaining a relevant fact and seeking a leave to amend is unreasonable. See Texaco, Inc. v. Ponsoldt, 939 F.2d 794, 799 (9th Cir.1991) (citing Jackson, 902 F.2d at 1388).
As the district court pointed out, AmerisourceBergen sought to amend its pleadings nearly fifteen months after it first learned that counterfeit Procrit was in the market and three months after entering a reply where it conceded that the products for which it had not paid, including Procrit, were genuine. It is undisputed that at the time AmerisourceBergen filed its reply in May 2003, it had all the information necessary to raise the affirmative defense it now pursues: Amerisource-Bergen knew about the counterfeit Procrit on the pharmaceuticals market, acknowledged that it had purchased Procrit from Dialysist West during that period, and had previously filed suit because it believed that it had purchased counterfeit drugs from Dialysist West. Presumably, at the time it filed its reply, AmerisourceBergen made a reasoned decision not to assert the defense that the shipments of Procrit it received from Dialysist West contained bogus product.
Allowing AmerisourceBergen to “advance different legal theories and require proof of different facts” at this stage in the litigation would have prejudiced Dialysist West by forcing it to undertake burdensome discovery and would have unnecessarily delayed final judgment on the counterclaim. Jackson, 902 F.2d at 1387; see also Chodos v. West Publ’g Co., 292 F.3d 992, 1003 (9th Cir.2002) (upholding district court’s denial of leave to amend fraud claim where plaintiff had facts prior to first amendment and amendment was both prejudicial and dilatory). The district court did not abuse its discretion in denying AmerisourceBergen’s motion for leave to amend.
C. Certification of Final Judgment
AmerisourceBergen also appeals the district court’s certification of final judgment on Dialysist West’s counterclaim under Federal Rule of Civil Procedure 54(b). Rule 54(b) provides that final entry of judgment should be made on individual claims in multiple claim suits “upon an express determination that there is no just reason for delay.” Fed.R.Civ.P. 54(b). Review of a district court’s certification of a final judgment involves a two-step process. See Curtiss-Wright Corp. v. Gen. Elec. Co., 446 U.S. 1, 12, 100 S.Ct. 1460, 64 L.Ed.2d 1 (1980). In the first step, we review the district court’s entry of judgment de novo and evaluate “such factors as the interrelationship of the claims so as to prevent piecemeal appeals.” See Gregorian v. Izvestia, 871 F.2d 1515, 1519 (9th Cir.1989). The second step of review requires an assessment of the equities. We apply the “substantial deference” standard, reversing the district court only if we find the district court’s conclusions clearly unreasonable. Id.
The district court found that there was no risk of duplicative effort by the courts because any subsequent judgments in this case would not vacate its judgment on Dialysist West’s counterclaim. See Curtiss-Wright, 446 U.S. at 8, 100 S.Ct. 1460 (holding that proper factors for 54(b) review include “whether the claims for re*1138view were separable from the others ... and whether the nature of the claims already determined was such that no appellate court would have to decide the same issues more than once”). We agree. Because Dialysist West’s counterclaim to recover for non-Epogen sales was not legally or factually related to AmerisourceBergen’s Epogen claim, no court need revisit this judgment. See Morrison-Knudsen Co., Inc. v. Archer, 655 F.2d 962, 965 (9th Cir.1981).
AmerisourceBergen contends that, as a matter of equity, the district court’s certification of its judgment on Dialysist West’s counterclaim should not be upheld because Dialysist West is insolvent. We recognize that insolvency is a factor that should weigh against the final entry of judgment on Dialysist West’s counterclaim. See Reiter v. Cooper, 507 U.S. 258, 270, 113 S.Ct. 1213, 122 L.Ed.2d 604 (1993) (acknowledging that “even a ‘threat of insolvency’ of the party seeking separate judgment is a factor weighing against it”). But as the Supreme Court held in Reiter: “[W]e cannot say that insolvency is an absolute bar [to certification].” Id.; see also Shintom Am. Inc. v. Car Tels. Inc., 45 F.3d 1107, 1110 (7th Cir.1995) (affirming district court’s entry of final judgment under 54(b) despite the “precarious financial condition and potential insolvency of the plaintiff’).
In weighing the equities of Rule 54(b) certification, the district court concluded that certification was warranted because this result: (1) aligned with the set-off principles of the UCC; (2) helped avoid unreasonable delay; and because (3) AmerisourceBergen owed Dialysist West approximately $2.2 million. See AmerisourceBergen Corp., No. CIV-02-1472 PHX JWS, slip op. at 14-15. These factors are a sufficient basis for certifying final judgment in favor of Dialysist West. See Schieffelin & Co. v. Valley Liquors, Inc., 823 F.2d 1064, 1065-1067 (7th Cir.1987) (permitting certification where defendant filed counterclaims and plaintiff asserted defenses that were “at least plausible”); C.R. Bard, Inc. v. Med. Elecs. Corp., 529 F.Supp. 1382, 1388 (D.Mass.1982) (stating that court “saw no reason why plaintiff should be denied” use of substantial funds “while awaiting disposition of ... counterclaims”). Moreover, the district court’s decision to favor Dialysist West’s creditors as a matter of equity is not erroneous where AmerisourceBergen has not shown that the debt it seeks to set-off is related to Dialysist West’s counterclaim. See Newbery Corp., 95 F.3d at 1399 (“[S]etoffs run contrary to fundamental bankruptcy policies such as the equal treatment of creditors and the preservation of a reorganizing debtor’s assets.”).
“The task of weighing and balancing the contending” equities of a case is “peculiarly one for the trial judge.” Curtiss-Wright, 446 U.S. at 12, 100 S.Ct. 1460. It is not the appellate court’s role to “reweigh the equities.” Id. at 10, 100 S.Ct. 1460. The district court’s conclusions for certifying the judgment were not “clearly unreasonable.” We decline to vacate the certification of judgment.
D. Denial of Stay of Enforcement
Federal Rule of Civil Procedure 62(h) provides that when a court has entered final judgment, it may upon its discretion, “stay enforcement of that judgment until the entering of a subsequent judgment or judgments.” Fed.R.Civ.P. 62(h). AmerisourceBergen argues that the district court erred in rejecting its 62(h) motion by conflating Rule 54(b) and Rule 62(h). While it is true that the district court has discretion to grant a stay when it has already certified final judgment,4 we disagree with AmerisourceBer-*1139geris contention that “special circumstances” warrant a stay in this case.
AmerisourceBergen cannot show that failure to provide the stay will cause it to suffer greater harm than Dialysist West will face should it be denied this judgment pending resolution of AmerisourceBer-gen’s outstanding claims. See Soo Line R.R. Co. v. Escanaba & Lake Superior R.R. Co., 840 F.2d 546, 552 (7th Cir.1988) (“Courts regularly require the payment of undisputed debts while the parties litigate their genuine disputes.”). Moreover, allowing AmerisourceBergen to obtain a stay of the judgment would effectively sanction its self-help tactics. If it does ultimately succeed on its Epogen claim, AmerisourceBergen will have avoided paying funds it owes Dialysist West and would unjustifiably leap-frog other creditors. See Pereira v. Cogan, 275 B.R. 472, 475 (S.D.N.Y.2002) (“In fashioning a stay of enforcement, a court looks to general equitable principles.”). The district court did not abuse its discretion in denying Ameri-sourceBergen’s Rule 62(h) motion.5
E. Attorney’s Fees & Costs of Appeal
Dialysist West seeks attorney’s fees and the costs of appeal under Arizona Revised Statute section 12-341.01(A). The statute permits an award of attorney’s fees to the “successful party” in “any contested action arising out of a contract.” Ariz.Rev.Stat. § 12-341.01(A) (2006). An award of attorney’s fees under Arizona law is permissive, rather than mandatory. See Wagenseller v. Scottsdale Mem’l. Hosp., 147 Ariz. 370, 710 P.2d 1025, 1049 (1985). The Arizona Supreme Court has held that there are six grounds that must be considered in awarding attorney’s fees to a successful litigant including:
(1) whether the unsuccessful party’s claim or defense was meritorious; (2) whether the litigation could have been avoided or settled and the successful party’s efforts were completely superfluous in achieving the result; (3) whether assessing fees against the unsuccessful party would cause an extreme hardship; (4) whether the successful party prevailed with respect to all of the relief sought; (5) whether the legal question presented was novel and whether such claim or defense have previously been adjudicated in this jurisdiction; and (6) whether the award would discourage other parties with tenable claims or defenses from litigating or defending legitimate contract issues for fear of incurring liability for substantial amounts of attorney’s fees.
*1140Id. at 1049. Neither party directly addresses the Wagenseller factors in its briefing, but there is sufficient evidence in the record to conclude that these factors weigh against granting Dialysist West attorney’s fees and costs. First, no evidence has been presented indicating that this case could have been successfully avoided or settled. Second, the issues in this appeal raise novel questions of contract law. Finally, we do not wish to discourage parties like AmerisourceBergen from litigating opaque issues of contract law for fear of being saddled with opposing counsel’s fees and costs.
AFFIRMED.
. AmerisourceBergen Corp. succeeded Bergen Brunswig Corporation as the plaintiff-appellant in this case.
. The relevant contract clause reads: "BBC may, at its sole option, return all or any part of any product received from Vendor and receive full credit for all returned items.”
. We need not decide whether the district court also erred in denying AmerisourceBergen leave to amend its complaint. See 10 Moore’s Federal Practice, § 54.28[3][b], at 54-109 (3d ed. 2005) ("On appeal of a judgment properly entered under Rule 54(b), the court of appeals may review any matter implicated by the judgment, but should not reach beyond the bounds of the judgment.... ”).
. See Curtiss-Wright, 446 U.S. at 13, 100 S.Ct. 1460. ("Under this Rule [62(h)], we assume *1139it would be within the power of the district court to protect all parties by having the losing party deposit the amount of the judgment with the court.... In this way, valid considerations of economic duress and solvency ... can be provided without preventing Rule 54(b) consideration.”); see also Hartford Accident & Indem. Co. v. Boise Cascade Corp., 489 F.Supp. 855, 860 (N.D.Ill.1980) (granting 62(h) motion to stay after certifying judgment against party).
. Judge Tashima would stay enforcement of the judgment and "protect[] AmerisourceBer-gen's claims against Dialysist West's insolvency.” (Dissent, 3065). Section 553 of the Bankruptcy Code governs the equitable right of setoff in bankruptcy law. 11 U.S.C. § 553 (2006). Section 553, however, does not create a right of setoff: "Rather, the section merely recognizes and preserves setoff rights that exist under other applicable law .... Thus, the threshold determination in every case involving section 553 is the source of the alleged setoff right.” 5 Myron M. Sheinfeld et al., Collier on Bankruptcy ¶ 553.01[2] (Lawrence P. King, ed., 15th ed. rev.2005). Ameri-sourceBergen has no right to legal or equitable setoff under Arizona law for the judgment against it on the counterclaim; it therefore does not have a right to setoff under bankruptcy law. See In re HAL, Inc., 196 B.R. 159, 161 (B.A.P. 9th Cir.1996).