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 creаted 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 dеclaratory 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 *190 in 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 сheek 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 cоurt 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.,
*191 B. 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,
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,
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 *192 only 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 reconsiderаtion 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 рrovides 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 attоrney 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 litigаnt is the “prevailing party,” a decision that is committed to the discretion of the trial court.
Gilbert v. City of Caldwell,
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.,
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.,
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,
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.,
[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 pаrty or parties who prevail “in the action.”____
... [W]hile the judge in his sound discretion must consider “the final judgment *194 or 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,
In determining which party prevailed in an action where there arе 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.,
The Buis rely upon
Rameo v. H-K Contractors, Inc.,
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,
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’ counterclаim 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 *195 by 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,
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,
Although Nguyen was the prevailing party as against Mongo Grill, the district court did not act consistently with appliсable 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 prеvailed 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 *196 costs, is affirmed, and Nguyen is awarded costs and attorney fees incurrеd 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.
Notes
. Formalities of the corporate form were apparently generally disregarded by the parties.
. 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 chеcks constituted a loan to Nguyen.
. 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.
. Idaho Code § 12-120(3) provides:
In any civil aсtion 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.
.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).
