
112 Cal.App.3d 194 (1980)
169 Cal. Rptr. 160
HUGHES TOOL COMPANY, Plaintiff, Cross-defendant and Appellant,
v.
MAX HINRICHS SEED COMPANY, Defendant, Cross-complainant and Appellant; DONALD M. HINRICHS, Defendant and Appellant.
Docket No. 58197.
Court of Appeals of California, Second District, Division Two.
November 17, 1980.
*198 COUNSEL
Shield & Smith, Timothy L. Walker, Edward J. Seltzer and Steven Peter Small for Plaintiff, Cross-defendant and Appellant.
Holley, Galen & Willard, Irwin, Friel & Myklebust, Wallis W. Friel and Arthur Steven Brown for Defendant, Cross-complainant and Appellant and for Defendant and Appellant.
OPINION
THE COURT.[*]
Complaint on a note. Cross-complaint on product liability and implied warranty.
*199 In January 1971 Hughes Tool Company (Hughes) sold a helicopter and certain agricultural spray equipment to a family partnership doing business in the State of Washington as Max Hinrichs Seed Company (Hinrichs). The partnership made a small down payment and executed a promissory note for the balance of the purchase price. The terms of the note called for payment of $43,000 principal and $9,400 interest on the declining unpaid balance. The note and accompanying chattel mortgage were signed on behalf of the partnership by Don Hinrichs, one of the partners, without indication of his representative capacity.
Hinrichs experienced a number of difficulties with the helicopter and spray equipment, which difficulties were communicated to a Hughes service representative. On July 30, 1971, after 498 hours of flying time, the helicopter caught fire in midair during spraying operations. The pilot managed to land the aircraft and escape injury, but the fire completely destroyed the helicopter and spray equipment. Hughes' service representative, present at the scene, reported to Hughes the next day on the accident and the earlier problems Hinrichs had encountered with the helicopter. Hinrichs stopped making payments on the promissory note after its September 20 prepaid installment, and sent Hughes a detailed written notice of breach of warranty in May 1972.
In November 1972 Hughes sued on the note. The partnership cross-claimed for damages, on theories of product liability, breach of express warranty, breach of implied warranty, and negligence. Although it was stipulated at the outset of trial that the sole parties to the suit were Hughes and the partnership, the court later granted Hughes' motion to withdraw this stipulation and name Don Hinrichs as an individual defendant. The trial court gave Hughes judgment on the note for $68,900 against the partnership and Don Hinrichs individually. That figure represented $37,193 unpaid balance on the note at the date of default, interest from date of default to date of judgment, and attorneys' fees. The court also awarded $63,768 to the partnership on its cross-complaint under theories of product liability and breach of implied warranty of fitness for a particular purpose. That figure represented $39,228 for the value of the helicopter and spray equipment, and $24,540 for damages for loss of business. The court then offset these two judgments under Code of Civil Procedure section 666, leaving a net judgment of $5,132 in favor of Hughes.[1] However, the court did not offset the judgment *200 against individual defendant Don Hinrichs, since his name did not appear separately on the partnership cross-complaint.
Both the partnership and Don Hinrichs appeal, claiming that the court erred in entering judgment against Hinrichs individually, in allowing Hughes interest on the note from date of default, and in awarding Hughes attorneys' fees.
Hughes appeals the judgment against it on the cross-complaint. We affirm the trial court's award of damages on the cross-complaint, but modify other portions of the judgment.

PRODUCT LIABILITY
The trial judge concluded that the helicopter and spray equipment were defective in two major respects, which we summarize as follows:
1) The fire started when an inadequate cross-feed return hose on the spray system burst under normal pressure and heat exposure, thereby causing flammable diesel oil (the carrying agent for the spray) to spray onto a hot engine manifold; a stronger hose and a protective shield between the cross-feed return hose and the engine manifold would have prevented the fire from occurring.
2) The electronic wiring mechanism used for dumping the spray load from its tanks failed, thereby preventing the pilot from stopping the spread of the fire to the helicopter's fuel tank. No backup manual dump mechanism had been included as part of the spray equipment.
(1) Under the standard set forth in Barker v. Lull Engineering Co. (1978) 20 Cal.3d 413, at page 435 [143 Cal. Rptr. 225, 573 P.2d 443, 96 A.L.R.3d], a product may be found defective if it fails to function "... as safely as an ordinary consumer would expect when used in an intended or reasonably foreseeable manner, or (2) if the plaintiff proves *201 that the product's design proximately caused his injury and the defendant fails to prove, ... that on balance the benefits of the challenged design outweigh the risk of danger inherent in such design." While Hughes concedes that the Barker test is the proper standard for evaluating the existence of a defect, it argues that Hinrichs did not produce sufficient evidence to warrant such a finding. At trial Hinrichs' expert witnesses testified that the fire had been caused in the manner set out in the court's findings of fact. (2) It is well settled that design defect may be shown by circumstantial evidence in the event the product itself is destroyed. (Vandermark v. Ford Motor Co. (1964) 61 Cal.2d 256, 260 [37 Cal. Rptr. 896, 391 P.2d 168].) (3) Where a trial court's factual findings are challenged on the ground of insufficiency of evidence, an appellate court will limit the scope of its review to the determination whether substantial evidence supports the trial court's finding. (Lundgren v. Lundgren (1966) 245 Cal. App.2d 582, 586 [54 Cal. Rptr. 30]; White v. State Farm Fire & Cas. Co. (1969) 272 Cal. App.2d 693, 695 [77 Cal. Rptr. 615].) At bench, substantial evidence supports the trial court's findings on the proximate cause of the fire, and the trial court's conclusion, under the Barker standard, that the helicopter and spray equipment were defective products.

BREACH OF IMPLIED WARRANTY
(4) The trial court also found that as a result of defects in the helicopter and spray system, Hughes breached the implied warranty of fitness for a particular purpose provided in California Uniform Commercial Code section 2315. Hughes challenges this finding by assigning as error the court's grant of Hinrichs' motion to reopen the cause to show notice of breach after the cause had been submitted for decision. We think the judge's decision was proper. The record shows that the issue of notice was not raised by Hughes until the posttrial hearing on the judge's proposed findings. The decision to allow a party to reopen is within the discretion of the court, and, given the circumstances of this case, it might well have been an abuse of discretion to deny the motion. (See Christina v. Daneri (1937) 22 Cal. App.2d 190 [70 P.2d 983]; Baker v. City of Palo Alto (1961) 190 Cal. App.2d 744 [12 Cal. Rptr. 425]; Title Ins. & Trust Co. v. Affiliated Gas Equipment, Inc. (1961) 191 Cal. App.2d 318 [12 Cal. Rptr. 729].)
(5) Hughes also contends, for the first time on appeal, that the sales agreement contained a valid disclaimer of all implied warranties. While *202 California Uniform Commercial Code section 2316 does allow implied warranties to be contractually excluded, whether a warranty has been excluded is a question of fact which cannot be raised for the first time on appeal. (Southern Pac. Co. v. Unarco Industries, Inc. (1974) 42 Cal. App.3d 142 [116 Cal. Rptr. 847]; Sommer v. Martin (1921) 55 Cal. App. 603, 610 [204 P. 33].)
We affirm the judgment granting relief on the cross-complaint on theories of defective product and breach of implied warranty of fitness for a particular purpose.

MEASURE OF HUGHES' DAMAGES UNDER PROMISSORY NOTE
Hinrichs does not challenge the amount found owing on the purchase price at the time of default. (6) It argues, however, that Hughes is not entitled to interest on that balance after the date the helicopter was destroyed. We agree.
California Uniform Commercial Code section 2717 provides that a buyer may, upon notification to the seller, deduct from the amount still owing under the contract the amount of damages flowing from the seller's breach. Applying this rule to the instant cause, Hinrichs would be entitled to deduct its damages from the amount owing on the balance of the purchase price on the date the helicopter was destroyed. In Hansen v. Covell (1933) 218 Cal. 622 [24 P.2d 772, 89 A.L.R. 670], the court held that where a plaintiff building contractor sued for payment due under the contract, and the defendant counterclaimed for defective workmanship, plaintiff was entitled to interest only on the amount by which the original contract price exceeded the amount of damages on the counterclaim. (See also Union Sugar Co. v. Hollister Estate Co. (1935) 3 Cal.2d 740 [47 P.2d 273], and Burgermeister Brewing Corp. v. Bowman (1964) 227 Cal. App.2d 274 [38 Cal. Rptr. 597], cases which follow Hansen in denying plaintiff interest on the original amount owing when defendant has successfully cross-complained for plaintiff's breach.) Simply stated, the rule in Hansen is based on the principle that a party cannot legitimately claim payment of interest when his breach of the contract has resulted in damages to defendant which exceed the amount owed. The rule applies to the present case, in that the amount owed Hughes at the time of breach, $37,193, was less than Hinrichs' damages on that date as a result of the loss of the helicopter, $39,228.
*203 Inasmuch as the helicopter and spray equipment were completely destroyed, Hinrichs was deprived of the usual remedy of using the goods and discounting the price to the extent the goods did not live up to expectations. In these circumstances Hinrichs acted reasonably in refusing to make payments on the note pending a judicial determination of the parties' rights and liabilities. Hughes, having breached its contract by selling a defective product, is not entitled to recover more than the original purchase price merely because substantial time elapsed between date of breach and date of judgment. Accordingly, the proper measure of offset between the parties results in a net judgment in favor of Hinrichs for $26,574.

ATTORNEYS' FEES
Civil Code section 1717 provides in pertinent part: "In any action on a contract, where such contract specifically provides that attorney's fees and costs, which are incurred to enforce the provisions of such contract, shall be awarded to one of the parties, the prevailing party, whether he is the party specified in the contract or not, shall be entitled to reasonable attorney's fees in addition to costs and necessary disbursements....[Par.] As used in this section `prevailing party' means the party in whose favor final judgment is rendered." California follows the general rule that if both parties prevail on affirmative claims, the party with the net judgment in its favor is the prevailing party and entitled to attorneys' fees when, as here, the contract so provides. (Sill Properties, Inc. v. CMAG, Inc. (1963) 219 Cal. App.2d 42 [33 Cal. Rptr. 155].) (7) Although there seem to be no decisions on point, logic and reason dictate that where there is an appeal from an offset judgment, the party which prevails on that appeal should be viewed as the ultimate prevailing party for purposes of section 1717. Here, the complaint and cross-complaint refer to integral parts of the same transaction, which includes an authorization for attorneys' fees. Although Hinrichs' cross-complaint largely sounds in tort, the practical effect of the success of its claim is the defeat of Hughes' effort to collect on the note. Hence an award of attorneys' fees to Hinrichs is based on his defense to the action on the note. Accordingly, we reverse the order awarding attorneys' fees to Hughes, and direct the lower court to award attorneys' fees to Hinrichs.
The agreement between Hughes and Hinrichs called for attorneys' fees of 15 percent of the total amount of principal and interest on the note. Civil Code section 1717 provides for "reasonable" attorneys' fees. *204 The general rule is that net recovery is the basis upon which attorneys' fees are computed. (4 Witkin, Cal. Procedure (2d ed. 1971) Judgment, § 122.) We leave it to the trial court to determine by what formula and in what amount attorneys' fees for Hinrichs should be assessed.

JUDGMENT AGAINST DON HINRICHS INDIVIDUALLY
The form of judgment granting an offset to the partnership but not to Don Hinrichs, individually, pleased neither the parties nor the judge. The judge objected to the application of Code of Civil Procedure section 666 to this case, but felt it was forced upon him. Hughes objected to the offset, because it contends its liability insurer will pay only for damages incurred as a result of a judgment against Hughes, and not for damages in the form of an offset against Hughes' own claim for recovery.[2] Hughes concedes that the only reason for proceeding against Don Hinrichs as an individual was to attempt to avoid this result, and it disavows any desire to collect the sales price twice. Don Hinrichs objected to the procedure used, on the ground that any liability he may have had derived from the partnership, yet the judgment erroneously imposes a separate and independent liability on him.
Corporations Code section 15015 provides: "All partners are liable (a) Jointly and severally for everything chargeable to the partnership under Sections 15013 and 15014. (b) Jointly for all other debts and obligations *205 of the partnership; but any partner may enter into a separate obligation to perform a partnership contract."
California Uniform Commercial Code section 3403, subdivision (2) provides: "An authorized representative who signs his own name to an instrument (a) is personally obligated if the instrument neither names the person represented nor shows that the representative signed in a representative capacity; ..." Viewed in isolation and given a strictly literal reading, these statutes seem to spell trouble for Don Hinrichs, since the trial court found he did sign the promissory note without indicating his representative capacity. However, the court also found that Don Hinrichs acted on behalf of the partnership in negotiating the purchase of the helicopter. The sale was evidenced by purchase agreements, chattel mortgages, and a promissory note, all of which showed the Hinrichs partnership as purchaser. (8) We are of opinion that Corporations Code section 15015 and California Uniform Commercial Code section 3403 should not be construed to allow Hughes what would be tantamount to a double recovery, simply because Don Hinrichs' name did not appear individually on the cross-complaint filed by the partnership. The judgment as it now stands would permit double recovery by allowing Hughes to proceed individually against Don Hinrichs for the full $68,900 in disregard of its own liability to the partnership. We think the proper approach in this cause is to consider the debt owed to Hughes extinguished by the partnership's judgment for damages on the cross-complaint. It is well settled that once a debt has been extinguished, a creditor cannot effect a second recovery. (Adams v. Southern Pacific Co. (1928) 204 Cal. 63 [266 P. 541, 57 A.L.R. 1066].)
The judgment against Don Hinrichs as an individual defendant is vacated. The judgment is further modified to provide a net recovery by defendant and cross-complainant Max Hinrichs Seed Company against plaintiff and cross-defendant Hughes Tool Company in the amount of $26,574.69 plus interest from date of judgment. The cause is remanded to the trial court to fix and award reasonable attorneys' fees to Max Hinrichs Seed Company. Costs on both appeals will be borne by Hughes Tool Company.
The petition of appellant Hughes Tool Company for a hearing by the Supreme Court was denied February 4, 1981. Bird, C.J., Tobriner, J., and Mosk, J., were of the opinion that the petition should be granted.
NOTES
[*]   Before Roth, P.J., Fleming, J., and Beach, J.
[1]  Code of Civil Procedure section 666 provides: "If a claim asserted in a cross-complaint is established at the trial and the amount so established exceeds the demand established by the party against whom the cross-complaint is asserted, judgment for the party asserting the cross-complaint must be given for the excess; or if it appears that the party asserting the cross-complaint is entitled to any other affirmative relief, judgment must be given accordingly. When the amount found due to either party exceeds the sum for which the court is authorized to enter judgment, such party may remit the excess, and judgment may be rendered for the residue." Although its use would seem to be required only in situations in which the amount of cross-complainant's recovery is greater than plaintiff's recovery, the judge felt that section 666 should nonetheless be applied. As seen in our discussion of the offset, infra, use of the offset statute was proper.
[2]  Hughes is represented in this matter by two firms of attorneys. One firm handled the appeal from the judgment, and another firm filed the brief in response to Hinrichs' appeal. In this latter brief Hughes asks this court to take the insurance status of the parties into consideration and order judgment on the note for Hughes as plaintiff without offset, and judgment against Hughes as cross-defendant without offset. The purpose of this request is to force Hughes' liability insurer to pay the award of damages against Hughes, while allowing Hughes full recovery on the note.

Hughes cites the case of Jess v. Hermann (1980) 26 Cal.3d 131 [161 Cal. Rptr. 87, 604 P.2d 208], in support of such a rearrangement. However, that case held only that in a comparative fault setting a judge may not properly invoke the California setoff statutes without taking into consideration the parties' insurance status, since absent such consideration the state's financial responsibility law (Veh. Code, § 16000 et seq.) would be frustrated.
In the instant case Hughes instituted an action for breach of contract, and Hinrichs cross-complained for breach of warranty and product design defect. This is clearly not the "comparative fault setting" addressed in Jess, and we reject Hughes' argument that we should consider the insurance status of the parties.
If Hughes desires to press its claim against its liability insurer, its proper procedure is to bring an action against the insurer to determine the parties' rights and liabilities under the liability insurance contract. In the meantime, the relationship between Hughes and its insurer is purely collateral to this cause and has no bearing on the rights of the parties to this appeal.
