
    977 P.2d 196
    J.R. SIMPLOT COMPANY, Plaintiff-Appellant, v. WESTERN HERITAGE INSURANCE COMPANY, a foreign corporation, Defendant-Respondent, and Cecil Armstrong, Defendant.
    No. 24104.
    Supreme Court of Idaho, Boise,
    October 1998 Term.
    Feb. 22, 1999.
    Rehearing Denied May 19, 1999.
    
      Cantrill, Skinner, Sullivan & King, for appellant. Robert D. Lewis argued.
    Brady, Lerma, Ctd., Boise, for respondent Western Heritage. Bret A. Walther argued.
   TROUT, Chief Justice.

This appeal presents an issue about attorney fees; specifically, whether the trial court properly awarded Western Heritage (Western) attorney fees under I.C. § 12-120(3). Section 12-120(3) requires a court to award reasonable attorney fees to the prevailing party in any “civil action to recover in ... any commercial transaction.” Additionally, this Court must determine whether I.C. § 41-1839(4) bars the application of § 12-120 in this case.

I.

FACTUAL AND PROCEDURAL HISTORY

J.R. Simplot Co. (Simplot) hired Don Green (Green) to apply fertilizer to fields owned by Tuk and Ty Nedrow (the Ned-rows). Green agreed to indemnify Simplot for all claims arising from Green’s misapplication of chemicals and fertilizers. To that end, Green purchased a $500,000 commercial liability insurance policy from Western. Western sent Simplot a certificate of insurance on that policy. Green misapplied the fertilizer, and the Nedrows sued Simplot for their resulting crop loss. When Simplot requested that Western defend the action, Western claimed that a special endorsement on the policy limited its liability in that action to $25,000, which Western then contributed toward settling the claim. To achieve final settlement with the Nedrows, Simplot contributed $103,000, and subsequently sued Western seeking reimbursement.

Simplot filed its initial complaint on February 6, 1996. Western answered, and both parties moved for summary judgment. Because Simplot was not the named insured under the policy, some doubt arose as to Simplot’s standing to sue. Thus, on July 3, 1996, Simplot entered into an assignment agreement with Green whereby Simplot agreed to release Green from liability on the Nedrows’ claim in exchange for an assignment of certain causes of action Green might have against Western and Cecil Armstrong, Green’s insurance agent. Western stipulated to, and the district court granted, Simplot’s request to amend its complaint, which Simplot filed on July 26, 1996.

Again, all parties filed motions for summary judgment. After a hearing on March 12, 1997, the trial court granted Western’s motion and dismissed Simplot’s claim without prejudice. The court found that because Green was never personally sued or otherwise found liable for the Nedrows claim, Green had no claim to assign Simplot. It was the district court’s opinion that Green’s insurance contract'required, as a predicate to Western’s potential liability, that Green first be sued and that Green tender that suit to Western requesting its defense. Instead Green settled with Simplot without Western’s consent. Consequently, the trial court found that Green did not have a claim to assign to Simplot. Western filed a motion for costs and attorney fees, promptly objected to by Simplot. The trial court awarded Western attorney fees based upon the provisions of I.C. § 12-120(3). In so ruling, the district court relied on Continental Casualty Co. v. Brady, 127 Idaho 830, 907 P.2d 807 (1995) where this Court held that I.C. § 12-120(3) applied in an insurer’s action for declaratory judgment to determine its liability under a policy. Id. Additionally, the district court reasoned that the underlying dispute between Simplot and Western was a web of commercial transactions beginning with the initial indemnification agreement between Simplot and Green. The trial court found this web of transactions sufficient to mandate the award of attorney fees under § 12-120(3). The district court further reasoned that, although I.C. § 41-1839(4) explicitly states that § 12-120 shall not apply to actions between insureds and insurers involving disputes arising under any policy, that provision took affect after Simplot filed its initial complaint and did not apply.

Simplot appeals arguing that the trial court erred in finding a commercial transaction between Simplot and Western sufficient to support an award of attorney fees under § 12-120(3). Moreover, Simplot asserts that the trial court erred in ruling that § 41-1839(4) did not bar the application of § 12-120. Western asks this Court to affirm the trial court’s award of attorney fees and to award attorney fees on appeal under § 12-120(3).

II.

STANDARD OF REVIEW

Under I.C. § 12-120(3), a court must award the prevailing party in a dispute over a commercial transaction reasonable attorney fees. Section 41-1839(4) bars the application of § 12-120 in disputes between insurers and insureds. The determination of which party prevails on what issues and to what extent is within the discretion of the trial court. Zimmerman v. Volkswagen of America, Inc., 128 Idaho 851, 857, 920 P.2d 67, 73 (1996). Simplot and Western do not dispute the district court’s determination of who prevailed nor the dollar amount awarded. Simplot’s claim centers around whether the district court properly awarded attorney fees under I.C. § 12-120(3) in the first instance and whether § 41-1839(4) prevents the application of § 12-120. Determining the meaning of a statute and its application is a matter of law over which this Court exercises free review. Mitchell v. Bingham Memorial Hospital, 130 Idaho 420, 422, 942 P.2d 544, 546 (1997).

III.

DISCUSSION

A. Attorney Fees Below

Idaho Code § 12-120(3) mandates the award of attorney fees to the prevailing party in a “civil action to recover ... in any commercial transaction.” However, I.C. § 41-1839(4) expressly provides that § 12-120 shall not apply in any action between an insured and the insurer involving a “dispute arising under any policy of insurance.” Western simply claims that because Simplot is not the named insured on the policy in question, § 41-1839 has no application to the present case. Simplot argues that based upon its amended complaint, it was asserting the rights of Green, an insured. Therefore, I.C. § 41-1839(4) applies, barring the operation of I.C. § 12-120. We agree, and, therefore, need not address whether the trial court had a proper basis for finding a commercial transaction and awarding attorney fees under 12-120(3).

Simplot argues that I.C. § 41-1839(4) became effective July 1, 1996. Because Simplot filed its amended complaint on July 26, 1996, Simplot maintains that the statute barred the application of § 12-120. However, the trial court ruled that Simplot’s action relates back to its initial complaint, filed February 6, 1996, and I.C. § 41-1839(4) does not apply. While we agree with the trial court’s determination that the operative date is the original date of filing this action, the parties overlooked the date on which the amendment went into effect. When amending I.C. § 41-1839 by adding subsection four, the Idaho Legislature declared an emergency and expressly stated that the amendment was retroactive applying to all cases pending at the time of its “passage and approval.” 1996 Idaho Sess. Laws 1307, 1308, 1309; see also Union Warehouse and Supply v. Illinois R.B. Jones, Inc., 128 Idaho 660, 669, 917 P.2d 1300, 1309 (1996) (noting the retroactive effect of the 1996 amendment). The amendment was approved March 20, 1996, while this litigation was pending. Consequently, § 41-1839(4) applies if Simplot can be characterized as an insured in its action against Western.

In ruling on the parties’ motions for summary judgment based on the amended complaint, the district court granted Western’s motion because Green had never been found liable for the Nedrows’ loss. The district court reasoned that Western could only become liable on the policy once Green is found liable. Western’s obligation to defend begins only after Green is sued and Green was never personally sued nor found liable. Consequently, Green had no claim against Western which Simplot could assert, so the district court granted Western’s motion for summary judgment.

Nonetheless, Simplot still acquired at least the ability to assert Green’s rights as the insured based on the assignment and, therefore, should be treated as the insured under the provisions of I.C. § 41-1839(4). When an insured assigns rights to recover proceeds under an insurance policy, the assignee, when attempting to recover from the insurer, should be in the same position as the named insured when it comes to awarding attorney fees. Further, an assignment does not fail merely because the rights assigned are not ripe at the time of assignment. Our Court of Appeals has correctly stated that “[A] right to future performance of an obligation may be assigned.... An assignment may properly relate to a conditional right which is adequately identified.” Bonanza Motors, Inc. v. Webb, 104 Idaho 234, 236, 657 P.2d 1102, 1104 (Ct.App.1983).

Consequently, Green effectively assigned to Simplot his rights as an insured to collect the money due under the policy and to sue Western for breach despite whether such claims existed at the time of the assignment. Had Green brought the action against Western himself, I.C. § 41-1839(4) would have barred the application of I.C. § 12-120(3) regardless of whether Green had a valid claim at the time. Based on the assignment, Simplot’s action against Western should lead to the same result. Therefore, the litigation underlying this appeal falls under the ambit of I.C. § 41-1839(4). Western is an insurer and Simplot, through the assignment, is an insured. The dispute arose under Green’s insurance policy. Consequently, the trial court erred in awarding attorney fees to Western under I.C. § 12-120(3).

B. Attorney Fees on Appeal

Western requests this Court to award attorney fees for this appeal pursuant to I.C. § 12-120(3). For the reasons just indicated, such an award would be impermissible, even if Western were determined to be the prevailing party.

IV.

CONCLUSION

For the reasons stated above, the trial court’s grant of Western’s request for attorney fees under I.C. § 12-120(3) is reversed. Costs are awarded to Simplot pursuant to I.A.R. 40.

Justices SILAK, SCHROEDER, WALTERS and Justice Pro Tem JOHNSON; concur.  