191 P.3d 1107

#### Twong Peter NGUYEN, an individual, Plaintiff-Counterdefendant-Respondent, v. Hoa K. BUI and Jocelyn N. Bui, husband and wife, Mongo Grill, Inc., an Idaho corporation, Defendants-Counterclaimants-Appellants.

No. 34647.

Court of Appeals of Idaho.

July 21, 2008.

*189Bill Smith & Associates, P.A., Boise, for appellant. William L. Smith argued.

Runft & Steele Law Offices, PLLC, Boise, for respondent. Jon M. Steele argued.

LANSING, Judge.

Hoa K. Bui and Jocelyn N. Bui (“the Buis”) appeal the district court’s decision after a court trial holding them liable for a debt owed to Twong Peter Nguyen. The Buis and Mongo Grill, Inc. also challenge the district court’s award of attorney fees. We affirm in part and reverse in part.

I.

BACKGROUND

The Buis asked Nguyen to participate in the funding and operation of a restaurant that they were planning called the Mongo Grill. Nguyen contributed $25,000 toward the start-up costs of the restaurant, and these funds were deposited into a Mongo Grill, Inc. bank account. Articles of Incorporation were filed for Mongo Grill, Inc. (hereinafter referred to as “Mongo Grill”) on May 5, 2005, and the restaurant opened in December 2005. Either the corporation or the restaurant business (the record is unclear)1 was owned fifty percent by the Buis, twenty-five percent by Nguyen, and twenty-five percent by a third party. Shortly after the restaurant opened, the relations between the parties soured. On February 6, 2006, they met to try to resolve their differences. Nguyen wanted to withdraw from the business, and a document was created stating the following agreement:

> Mongo Grill owns [sic] Twong Nguyen $25,000 loan. On Feb. 6 paid $12,500. Mongo Grill still own [sic] $12,500 and will pay as soon as possible but no longer than Aug. 1st 2006.

At that meeting, the Buis wrote a check to Nguyen from .their personal account in the amount of $12,500. A week later, after an altercation at the restaurant with Nguyen, the Buis stopped payment on that cheek. On March 30, 2006, two other checks in the amounts of $7,000 and $5,500 were written to Nguyen from the Buis’ personal account. These checks were paid.

In October 2006, Nguyen filed a lawsuit against the Buis in their personal capacity, but not against Mongo Grill, alleging breach of the February 6 written agreement and seeking collection of the $12,500 unpaid balance. The Buis filed a pro se answer, in which they denied virtually all of Nguyen’s allegations, and a counterclaim. Their counterclaim alleged, among other things, that the March 30, 2006 checks totaling $12,500 were given to Nguyen as a loan. In addition to recovery of this loan amount, the counterclaim sought to compel Nguyen to contribute another $25,000 to the business and various declaratory and injunctive relief. Although the Buis initially defended themselves pro se, by the time of trial they had retained counsel. Ten days before trial, the district court granted leave for Nguyen to amend his complaint to add claims for enforcement of á negotiable instrument, to pierce the corporate veil in order to hold the Buis liable if the debt to Nguyen was owed by Mongo Grill, and for indemnity against liability on a guaranty of the restaurant’s lease.

On the day before trial, the Buis withdrew their counterclaim, On the same day, the parties filed a document setting out stipulated facts for the court to consider along with the evidence that would be presented at trial. Significantly, the final “fact” to which the parties stipulated in this document stated, “All Plaintiff has to do is ask for that money [the $12,500 claimed by Nguyen] from Mongo Grill, Inc. and that money will be paid *190in full plus interest from August 1st, 2006 to date.” Despite this statement in the stipulated facts, Nguyen made no demand on Mongo Grill prior to trial and Mongo Grill made no payment. The trial proceeded, and during Hoa Bui’s testimony, the following exchange occurred:

> Q: Why haven’t you paid plaintiff?

> A: Because I don’t — I don’t owe him.

> Q: Who owes him the money?

> A: The restaurant.

> Q: To your knowledge, has plaintiff ever asked for the money from Mongo Grill, Inc.?

> A: No.

At that point, the court declared a recess and met with the parties and counsel in chambers. When the trial proceedings resumed, it was noted on the record that during the meeting in chambers the Buis conceded that the corporation owed the debt of $12,500 plus interest that Nguyen was seeking to collect in the lawsuit. Hoa Bui confirmed on the record that he “could go to his car and get the Mongo Grill checkbook and write a cheek for the principal plus interest.” The court then ordered, upon the parties’ stipulation, an amendment of the pleadings and the entry of a judgment against Mongo Grill. The trial continued, however, on the claims against the Buis.

Initially, the district court found that Nguyen was entitled to recover solely against Mongo Grill. The district court found that the February 6, 2006 agreement called for the corporation to return the funds that Nguyen had contributed to the business, of which a $12,500 unpaid balance remained, and that this contract did not create any personal liability of the Buis. The court rejected Nguyen’s corporate veil-piercing claim and also held that he was not entitled to enforce the $12,500 cheek on which the Buis had stopped payment. On Nguyen’s motion to reconsider, however, the court reversed itself on this latter point and held that Nguyen was a holder in due course entitled to a judgment against the Buis personally for nonpayment of the dishonored check. *See*Idaho Code §§ 28-3-301 to 28-3-305. The district court maintained its previous ruling on the other claims.

The court ultimately entered judgment jointly against Mongo Grill and the Buis in the amount of $12,500 plus interest. The Buis then filed a motion to reconsider, arguing that they had already paid their personal obligation on the dishonored check when they issued their new checks totaling $12,500 on March 30, 2006. The district court denied this motion. The court awarded Nguyen attorney fees against the Buis and Mongo Grill jointly in the amount of $15,000 pursuant to Idaho Code § 12-120(3).

The Buis and Mongo Grill appeal. The Buis argue that the judgment against them was erroneous because their liability on the dishonored $12,500 check was satisfied by their subsequent checks. Additionally, the Buis and Mongo Grill assert that the district court erred in determining their liability for attorney fees.

II.

ANALYSIS

A. Standard of Review

When a case has been tried to a court, it is the province of the trial judge to weigh the conflicting evidence and testimony and to assess the credibility of witnesses. I.R.C.P. 52(a); *Kootenai Elec. Co-op., Inc. v. Washington Water Power Co.,*127 Idaho 432, 434-35, 901 P.2d 1333, 1335-36 (1995). On appellate review, the trial court’s findings that are supported by substantial and competent evidence will not be set aside, *id.; Margaret H. Wayne Trust v. Lipsky,*123 Idaho 253, 256, 846 P.2d 904, 907 (1993), and those findings will be liberally construed in favor of the judgment entered. *Abbott v. Nampa Sch. Dist. No. 131,*119 Idaho 544, 547, 808 P.2d 1289, 1292 (1991). This Court is not bound by the trial court’s legal conclusions, however, and is free to draw its own legal conclusions from the facts presented. *Kootenai Elec. Co-op., Inc.,*127 Idaho at 435, 901 P.2d at 1336; *Kawai Farms, Inc. v. Longstreet,*121 Idaho 610, 613, 826 P.2d 1322, 1325 (1992).

*191B. The Buis’ Payment Defense Was Untimely

On appeal, the Buis do not challenge the district court’s holding that Nguyen was a holder in due course who was entitled pursuant to I.C. § 28-3-305 to enforce the $12,500 check that they wrote from their personal account. Rather, they argue that this liability was satisfied by their two subsequent cheeks of $7,000 and $5,500. Nguyen counters that the Buis may not rely on this payment defense because it was not timely asserted.

Under Idaho Rule of Civil Procedure 8(c), a party must set forth in his or her pleading any affirmative defenses to the other party’s pleading, including the defense of payment. The failure to do so normally results in a waiver of the defense. *Cole v. State,*135 Idaho 107, 110, 15 P.3d 820, 823 (2000); *Garren v. Butigan,*95 Idaho 355, 357-59, 509 P.2d 340, 342-44 (1973); *Hartwell Corp. v. Smith,*107 Idaho 134, 138, 686 P.2d 79, 83 (Ct.App.1984). The purpose of this rule requiring that affirmative defenses be pleaded is to alert the parties about the issues of fact that will be tried and to afford them an opportunity to present evidence to meet those defenses. *Williams v. Paxton,*98 Idaho 155, 163-64 n. 1, 559 P.2d 1123, 1131-32 n. 1 (1976). Here, the Buis filed no answer whatsoever to Nguyen’s amended complaint, which raised for the first time his claim for enforcement of the $12,500 check. The Buis contend, however, that their defense of payment must be considered because it was tried by consent. They rely upon 1.R.C.P. 15(b) which states that “[w]hen issues not raised by the pleading are tried by express or implied consent of the parties, they shall be treated in all respects as if they had been raised in the pleadings.”

In support of their contention that the defense of payment was tried by consent, the Buis point to various places in the testimony and stipulated facts that discuss their delivery of two checks to Nguyen in the amounts of $7,000 and $5,500, which were paid. We conclude that this evidence is insufficient to show that the payment defense was tried by consent. The purpose of Rule 15(b) is to allow cases to be decided on the merits, rather than upon technical pleading requirements. *Dunlap v. State,*141 Idaho 50, 57, 106 P.3d 376, 383 (2004). Nevertheless, due process requires that parties have sufficient notice of the issues to be tried and an opportunity to address those issues with evidence and argument. *Liebelt v. Liebelt,*125 Idaho 302, 307, 870 P.2d 9, 14 (Ct.App. 1994). As the Idaho Supreme Court has said, “When issues are not raised by the pleadings, the evidence raising the legal issue must be clear enough so that both parties know of the issue and consent to the issue being tried.” *Ross v. Coleman Co., Inc.,*114 Idaho 817, 827, 761 P.2d 1169, 1179 (1988). Trial of a claim or defense by consent is not established merely because evidence relevant to that issue was introduced; rather, it must appear both parties understood that the evidence was aimed at the unpleaded issue. *Hughes v. Fisher,*142 Idaho 474, 483, 129 P.3d 1223, 1232 (2006); *Liebelt,*125 Idaho at 307, 870 P.2d at 14. Thus, in *M.K. Transport, Inc. v. Grover,*101 Idaho 345, 349-50, 612 P.2d 1192, 1196-97 (1980) it was held that consent to try an issue was not shown where, although some evidence supported the unpleaded theory, that evidence was also relevant to pleaded claims. *See also Mountain Restaurant Corp. v. ParkCenter Mall Assoc.,*122 Idaho 261, 268, 833 P.2d 119, 126 (Ct. App.1992).

When the trial record here is considered as a whole, it is apparent that the evidence of the two honored checks was relevant to other pleaded issues, including Nguyen’s breach of contract claim,, and was never tied to a defense that the Buis had already satisfied Nguyen’s negotiable instrument’s claim.2 In fact, at trial, the Buis’ only articulated defense to this claim was that Nguyen himself had breached the February 6, 2006 agreement by interfering with the restaurant operations and thereby absolved the Buis of any duty to pay. Moreover, insofar as we can tell from the record on appeal, the Buis not *192only failed to plead a payment defense in an answer to the amended complaint, but did not even raise it in response to Nguyen’s post-trial motion for reconsideration, which specifically focused on the negotiable instrument claim. It was not until their own subsequent motion for reconsideration that they explicitly argued that the March 30, 2006 checks had discharged their personal liability. Under these circumstances, the district court properly rejected the Buis’ assertion that the unpleaded payment defense was tried by the consent of the parties. Therefore, we affirm the district court’s conclusion that Nguyen may enforce against the Buis personally the $12,500 check on which they stopped payment.3

C. Attorney Fees Below

The district court awarded attorney fees in the amount of $15,000 against Mongo Grill and the Buis jointly, pursuant to I.C. § 12-120(3), which provides for an award of attorney fees to the prevailing party in various types of civil actions.4 The Buis and Mongo Grill contend that the district court’s analysis was faulty because it lumped all of the claims together and failed to distinguish between the two co-defendants, giving no consideration to their differing positions and roles in the litigation. The Buis note that they successfully defended against three causes of action and lost only on one claim that Nguyen added ten days prior to the trial. They assert that an award of any attorney fees that Nguyen incurred on his unsuccessful claims is inappropriate. Mongo Grill argues that because it stipulated to the entry of judgment immediately after it was added as a party defendant mid-trial, Nguyen’s attorney expended little time or labor to secure judgment against it, and that the district court’s estimation of reasonable trial preparation time and the difficulties that Nguyen had with discovery are inapplicable to it.

In considering a request for attorney fees under section 12-120(3), the trial court must first determine whether any litigant is the “prevailing party,” a decision that is committed to the discretion of the trial court. *Gilbert v. City of Caldwell,*112 Idaho 386, 399, 732 P.2d 355, 368 (Ct.App.1987); *Chadderdon v. King,*104 Idaho 406, 411-12, 659 P.2d 160, 165-66 (Ct.App.1983). The guiding rule for this determination is I.R.C.P. 54(d)(1)(B),5 which states:

> In determining which party to an action is a prevailing party and entitled to costs, the trial court shall in its sound discretion consider the final judgment or result of the action in relation to the relief sought by the respective parties. The trial court in its sound discretion may determine that a party to an action prevailed in part and did not prevail in part, and upon so finding may apportion the costs between and among the parties in a fair and equitable manner after considering all of the issues and claims involved in the action and the resultant judgment or judgments obtained.

Thus, there are three principal factors a trial court must consider when determining which party, if any, prevailed: (1) the final judgment or result obtained in relation to the relief sought; (2) whether there were multiple claims or issues between the parties; and (3) the extent to which each of the parties prevailed on each of the claims or issues. *Daisy Mfg. Co., Inc. v. Paintball Sports, Inc.,*134 Idaho 259, 261-62, 999 P.2d 914, 916-17 (Ct.App.2000); *Chadderdon,*104 Idaho at 411, 659 P.2d at 165. If the court determines that a party has prevailed only in *193part, it may apportion the costs and attorney fees in a fair and equitable manner after considering all of the issues and claims involved in the action and the judgment or judgments obtained. *Id. See Prouse v. Ransom,*117 Idaho 734, 739, 791 P.2d 1313, 1318 (Ct.App.1989).

Because an award of attorney fees is a discretionary decision, on review we examine the trial court’s decision to determine whether it correctly perceived the issue as one of discretion, acted within the boundaries of its discretion and consistently with applicable legal standards, and reached its decision by an exercise of reason. *Sun Valley Shopping Center, Inc., v. Idaho Power Co.,*119 Idaho 87, 94, 803 P.2d 993,1000 (1991); *State v. Hedger,*115 Idaho 598, 600, 768 P.2d 1331, 1333 (1989).

1. The Buis

The Buis assert that the district court should have awarded against them only attorney fees attributable to the negotiable instrument cause of action pleaded ten days prior to trial, which is the only claim that Nguyen prevailed on against the Buis. It was error, they assert, to award attorney fees incurred by Nguyen for preparation and presentation of the claims that the Buis successfully defended against.

This Court rejected a similar argument in *Nalen v. Jenkins,*113 Idaho 79, 741 P.2d 366 (Ct.App.1987). In that ease, the plaintiffs had contracted with the defendant for the construction of a home and advanced a sum of money. They elected not to proceed on the project and asked the defendant to return their money less his out-of-pocket expenses. Litigation ensued when the plaintiffs believed that the defendant did not return a sufficient sum. The plaintiffs’ complaint alleged causes of action for violation of the Consumer Protection Act, fraud, unjust enrichment, and breach of contract. A jury found for the plaintiffs upon their theories of unjust enrichment and violation of the Consumer Protection Act. The trial court determined that attorney fees were statutorily awardable only for the Consumer Protection Act violation, and awarded attorney fees that it calculated were attributable to the attorney’s work on this theory only. We determined that this was an error. We noted that the plaintiffs had advanced four alternative theories of recovery in an attempt to obtain only one type of relief — the return of their pre-payment. We held that the trial judge improperly split the single “claim” upon which the plaintiffs had prevailed into prevailing and nonprevailing “theories.” In a later case, *Burns v. County of Boundary,*120 Idaho 623, 818 P.2d 327 (Ct.App.1990), we contrasted the circumstance where there truly are multiple claims for differing relief that can be parsed in awarding attorney fees, such as distinguishing between a successful claim for injunctive relief and an unsuccessful claim for damages.

Even if Nguyen’s various theories should be characterized as separate claims, apportionment of his attorney fees is not necessarily required. For example, in *Decker v. Homeguard Systems, a Div. of Intermountain Gas Co.,*105 Idaho 158, 666 P.2d 1169 (Ct.App.1983), the defendant argued that it was inappropriate to award attorney fees to the plaintiffs on all of. their twenty-eight causes of action when all but six were dismissed before submission to jury. The district court noted that although the plaintiffs had failed on a number of causes of action, they “basically prevailed” on the principal complaints that they had pursued against the defendant. We determined that the district court acted within its discretion in deciding not to apportion attorney fees among the successful and unsuccessful claims. Similarly, in *Chenery v. Agri-Lines Corp.,*106 Idaho 687, 682 P.2d 640 (Ct.App. 1984), where the plaintiff argued that the district court should have awarded him attorney fees for successfully defending against a counterclaim, we said:

> [T]he mere fact that a party is successful in ... defeating a single claim does not mandate an award of fees to the prevailing party on that claim. The rule does not require that. It mandates an award of fees only to the party or parties who prevail “in the action.”____

> ... [W]hile the judge in his sound discretion must consider “the final judgment *194or result of the action in relation to the relief sought by the respective parties ... and the extent to which each party prevailed upon each of such issue or claims,” [I.R.C.P. 54(d)(1)(B),] he is not compelled to make a discrete award of fees on each claim.

*Id.*at 693, 682 P.2d at 646. The propriety of this approach was confirmed by the Idaho Supreme Court in *Eighteen Mile Ranch, LLC v. Nord Excavating & Paving, Inc.,*141 Idaho 716, 719, 117 P.3d 130, 133 (2005), where the Court said:

> In determining which party prevailed in an action where there are claims and counterclaims between opposing parties, the court determines who prevailed “in the action.” That is, the prevailing party question is examined and determined from an overall view, not a claim-by-claim analysis.

*See also Lickley v. Max Herbold, Inc.,*133 Idaho 209, 214, 984 P.2d 697, 702 (1999) (Although plaintiff was awarded less than half of the damages he had initially requested, he was the prevailing party because he had prevailed on the greatest issue in the case.); *Burns,*120 Idaho 623, 818 P.2d 327 (Plaintiff who sought recovery of $1,000,000 was not the prevailing party on the claim when he recovered only $45.); *Ruge v. Posey,*114 Idaho 890, 892, 761 P.2d 1242, 1244 (Ct.App.1988) (Trial court did not abuse its discretion in holding there was no prevailing party when both parties had prevailed on various claims.); *Gilbert,*112 Idaho at 399, 732 P.2d at 368 (Although plaintiffs received only five percent of what they originally sought, trial court did not abuse its discretion in determining that they were prevailing party.); *Chadderdon,*104 Idaho at 411, 659 P.2d at 165 (Although both parties had prevailed in the claims against each other, defendant was prevailing party for purpose of award of attorney fees because it had prevailed on the “main issue of the case which consumed the majority of the trial”). These cases indicate that a trial court possesses considerable discretion in determining which party, if either, should be deemed to have prevailed and whether attorney fees should be apportioned when neither was successful in all of its claims or defenses. The analysis requires weighing the several claims and the extent to which failure on one or more of them should affect the attorney fee award.

The Buis rely upon *Rameo v. H-K Contractors, Inc.,*118 Idaho 108, 794 P.2d 1381 (1990), where the Idaho Supreme Court addressed how court costs are to be addressed when the plaintiff prevails on the complaint and the defendant prevails on a counterclaim. The district court awarded costs, but not attorney fees, to the plaintiff. Defendant HK appealed, challenging, among other things, the district court’s award of costs only to Rameo. The Supreme Court said:

> As to the issue of costs, we agree with H-K’s argument that the determination of which party has prevailed is not a matter of a mechanical measurement of the size of each party’s respective recovery. Instead, the trial court should analyze each claim separately. Where both parties have successfully asserted claims, the claims should be severed and costs analyzed separately for each. I.R.C.P. 54(d)(1)(B). Thus, H-K was entitled to an award of costs as a matter of right for the costs surrounding its gravel counterclaim, while Rameo was entitled to costs surrounding the claim for recovery under the reorganization contract.

*Id.*at 113, 794 P.2d at 1386. The district court’s award of costs and fees in the present ease is not inconsistent with the *Rameo*opinion, for in *Rameo,*each party prevailed on its respective claim. Here, the Buis prevailed on neither Nguyen’s complaint nor on the counterclaim that was withdrawn the day before trial.

In the present case, Nguyen sought one recovery, the $12,500 that was the unpaid balance of the amount promised him under the February 6, 2006 agreement. He also sought a declaration of a right of indemnity from liability on the restaurant lease, but that claim was a matter which occupied little time at trial. During the period for discovery, the Buis’ counterclaim was still pending and presumably required the attention of Nguyen’s attorney. The Buis have not shown that either the pretrial proceedings nor the trial time was significantly increased *195by Nguyen’s pursuit of the unsuccessful claims. In these circumstances, the district court did not abuse its discretion in determining that Nguyen was the prevailing party and entitled to recover attorney fees against the Buis without apportionment of the fees among Nguyen’s successful and unsuccessful legal theories.

2. Mongo Grill, Inc.

Mongo Grill’s challenge to the award of attorney fees against it presents quite a different question. Mongo Grill argues that the district court committed error when it “lumped” the corporation with the Buis in the analysis of liability for attorney fees because Nguyen expended virtually no time and labor in securing judgment against Mon-go Grill.

We agree that Mongo Grill cannot be held accountable for attorney fees that were not incurred in litigation against it. A somewhat analogous situation was presented in *Platt v. Brown,*120 Idaho 41, 813 P.2d 380 (Ct.App. 1991), where we discussed attorney fees awarded against co-defendants. In that case, a quiet title action, defendant Brown’s name was in the chain of title relating to a deed forged by a third party. On the day of trial, Brown stipulated that title could be quieted in the name of the plaintiff, and she was dismissed from the balance of the action. The trial proceeded against the third party and judgment was rendered for the plaintiff. The trial court then assessed attorney fees and costs against “the defendants,” making Brown equally accountable for them. We determined that because Brown had never claimed any property right adverse to the plaintiffs, and the claim against her was dismissed on her stipulation, she could not be held liable for attorney fees. Although not squarely on point, this case establishes that distinctions between co-parties may be necessary when attorney fees are awarded.

In this case, Nguyen’s attorney expended virtually no time or effort to secure judgment against Mongo Grill. The corporation was not even a party until mid-trial, when it stipulated to being added as a party defendant and contemporaneously stipulated to entry of judgment against it. Even before the trial began, according to the stipulated facts, Mongo Grill was willing to pay the full amount of Nguyen’s monetary claim if he would only make a demand upon the corporation. While we do not condone Mongo Grill’s refusal to pay a debt it acknowledged to be owed merely because no demand had been made, the fact remains that none of the attorney fees incurred by Nguyen either before or after Mongo Grill was added as a defendant can be attributed to the corporation. Before that point, Mongo Grill was not a party, and because it immediately stipulated to judgment against it, the trial proceedings that continued after it became a party necessarily must be attributed to only Nguyen’s claims against the Buis. The Idaho Supreme Court has said that “it would be an unusual case where attorney fees would be assessed against a defendant who conceded liability.” *Braley v. Pangburn,*118 Idaho 575, 583, 798 P.2d 34, 42 (1990).

Although Nguyen was the prevailing party as against Mongo Grill, the district court did not act consistently with applicable legal standards when setting the amount of attorney fees. Indeed, under these circumstances, where Mongo Grill was never named in a complaint but nevertheless stipulated to entry of judgment against it immediately upon being asked to do so, no attorney fees should have been awarded against it.

D. Attorney Fees on Appeal

All of the parties request attorney fees on appeal pursuant to I.C. § 12-120(3), which mandates an award of attorney fees to the prevailing party in an action arising from a commercial transaction. Nguyen has prevailed against the Buis on the various issues that they raised on appeal, and he therefore is entitled to recover attorney fees for the appeal from the Buis. However, on the only issue that Mongo Grill pursued in this appeal — the award of attorney fees below— Mongo Grill has prevailed against Nguyen, and is therefore entitled to attorney fees incurred to address this issue.

III.

CONCLUSION

The judgment entered by the district court against the Buis, including attorney fees and *196costs, is affirmed, and Nguyen is awarded costs and attorney fees incurred in responding to the Buis’ appeal. The district court’s award of attorney fees and costs against Mongo Grill is reversed, and costs and attorney fees incurred for its appeal are awarded to Mongo Grill.

Chief Judge GUTIERREZ and Judge PERRY concur.

1

. Formalities of the corporate form were apparently generally disregarded by the parties.

2

. The Buis' post-trial assertion that the March 30, 2006 checks constituted payment of their liability on the February 6 check is also inconsistent with the allegation in their abandoned counterclaim that the March 30 checks constituted a loan to Nguyen.

3

. On appeal, Nguyen argues that, if we were to hold that the payment defense was adequately raised, we should address whether the district court erred in rejecting Nguyen’s corporate veil-piecing claim. The Buis counter that we cannot reach the issue because Nguyen did not cross-appeal. Because we have determined that the payment defense was not properly pleaded or tried by consent, we do not address either of these arguments.

4

. Idaho Code § 12-120(3) provides:

> In any civil action to recover on an open account, account stated, note, bill, negotiable instrument, guaranty, or contract relating to the purchase or sale of goods, wares, merchandise, or services and in any commercial transaction unless otherwise provided by law, the prevailing party shall be allowed a reasonable attorney's fee to be set by the court, to be taxed and collected as costs.

5

.Although this rule references only awards of costs, it is made applicable to awards of attorney fees by I.R.C.P. 54(e)(1).