836 P.2d 558

#### Cecil HILT, Plaintiff-Respondent, v. Larry Wayne DRAPER and Mrs. Larry Wayne Draper, husband and wife; Wayne Dewey Draper and Mrs. Wayne Dewey Draper, husband and wife; Defendants-Appellants, and Jeff Hartman and Mrs. Jeff Hartman, husband and wife, Defendants.

No. 19181.

Court of Appeals of Idaho.

Aug. 19, 1992.

Rehearing Denied Aug. 19, 1992.

Petition for Review Denied Sept. 28, 1992.

*613Hepworth, Nungester & Lezamiz, Twin Falls, for defendants-appellants. Jeffrey J. Hepworth, argued.

May & May, Twin Falls, for plaintiff-respondent. Mark D. Stubbs, argued.

SUBSTITUTE OPINION

The Court’s prior opinion dated June 17, 1992, is hereby withdrawn.

SWANSTROM, Judge.

This case involves the dealings of three parties during the summer of 1988: Larry Draper, a farmer who sold hay; Jeff Hartman, a hauler who bought hay and resold it or acted as an agent in hay sales transactions; and Cecil Hilt, a dairyman who purchased hay. Hilt sued Draper and Hartman claiming breach of contract for failure to deliver hay. Default judgment was entered against Hartman and he is not a party to this appeal.

A magistrate conducted a trial of this case, without a jury. The evidence consisted solely of affidavits, deposition testimony and exhibits. Hilt obtained a judgment against Draper for $12,318 with interest, as well as costs and attorney fees. Draper appealed to the district court, which af*614firmed the magistrate’s judgment, but modified the attorney fees awarded. Draper appealed again. We reverse the judgment and district court’s appellate decision and remand for entry of a judgment for the Drapers.

The issues in this appeal are as follows. Did the trial err in finding that Draper and Hilt had a contract for the sale of hay created through Hartman as an agent for both parties, and that Draper breached that contract? Alternatively, if there was no contract between Draper and Hilt, did Draper and Hartman contract for the benefit of Hilt, and is that third-party beneficiary contract enforceable by Hilt? Did Draper ratify the agreement made between Hartman and Hilt by accepting and cashing a check from Hilt? Did the district court erroneously modify the magistrate’s award of attorney fees to Hilt? The parties seek attorney fees on appeal pursuant to I.C. § 12-120.

FACTS

Following trial, the magistrate made extensive findings of fact in his memorandum decision. We readily accept and summarize below those findings which were not challenged in the initial appeal to the district court. In addition, we summarize the evidence bearing on disputed facts which are critical to our opinion, recognizing, however, that the evidence must be construed most favorably toward the respondent.

In May, 1988, Hartman contacted Larry Draper and offered to buy his entire 1988 alfalfa hay crop for $60 per ton. Draper accepted this offer. Although Draper did not ask Hartman where the hay would be used, Hartman told Draper that in addition to using hay at his parents’ dairy, he supplied hay to five or six other dairies. Draper and Hartman testified that their agreement included the condition that the hay must be paid for before it could be taken from Draper’s farm. The hay and farm were not owned by Larry Draper, but by his parents, Wayne and Marjorie Draper; however, he managed the farm for his parents. Accordingly, we will use the name “Draper” to mean Larry Draper, individually, but also representative of his wife and his parents.

After Hartman contracted to buy Draper’s hay, he went to the Hilt dairy, where he had delivered hay the previous year, to see if Hilt needed some “good” hay. Hartman told Hilt that the hay was from Draper Farms and that the price would be $60 a ton. Hartman did not state that he was there on behalf of Draper; although that was what Hilt thought because Hartman said, “[t]hey [the Drapers] have good hay for sale.” Later, Hilt decided to buy some because he was familiar with the quality of Draper Farms hay, although he had never purchased any previously. On July 5, Hilt ordered 400 tons of hay at $60 per ton from Hartman. Hilt and Hartman also agreed that Hilt would pay Hartman $10 per ton for hauling. According to Hilt’s deposition testimony, Hartman did not tell Hilt that Hartman had to pay Draper for the hay before he could pick it up. Hilt testified that Hartman had asked for a “deposit” or “earnest money” for Draper.

On July 5, Hilt wrote a $3,000 check payable to Draper with the inscription “deposit 400 ton hay.” Hilt gave the check to Hartman and told him to give it to Draper and say, “It’s a deal.” However, Hartman testified that when he gave Draper the check, he did not tell Draper how much hay Hilt needed. Rather, “I told him I had two or three people I was hauling the hay to. I said, ‘This is one of the fellows.' ” Draper endorsed and cashed the check.

During June and July, Hartman gave Draper several checks totaling more than $30,000 in payment of hay. Hartman had obtained the checks from various dairy operators who wanted hay, including his own parents. During this same time, Hartman hauled more than thirty loads of hay from the Draper farm, having each load weighed at an independent weighing station.

On July 20, Draper and Hartman met to “square things up.” Draper used the load weight tickets provided by Hartman and his own records of payments received to determine how he and Hartman stood on that date.

*615Hartman continued to haul more hay after July 20. On July 28, he again sent two men with his truck to the Draper farm. The men gave Draper a $2,738 check from a dairyman who had previously paid for and received Draper hay. It is undisputed that Hartman had failed to always pay Draper in advance for hay he hauled from Draper’s farm. This last check brought Draper almost even with Hartman but, consistent with his agreement with Hartman, Draper refused to allow the men working for Hartman to take delivery of any more hay unless he was paid in advance. By this time Draper had heard that Hartman owed thousands of dollars to other farmers for hay he had hauled away but did not pay for.

Hartman personally met with Draper about July 29. He told Draper that Draper had “a commitment to Cecil Hilt.” Hartman testified that Draper knew that he owed Hilt hay, based on the statement Hartman had made to Draper, “You have a deposit on the hay from Cecil Hilt.” However, Draper testified that he did not believe he had an obligation to Hilt.

When Hartman informed Hilt of his inability to deliver hay, Hilt telephoned Draper and angrily inquired about the 400 tons of hay he had ordered from Hartman. Draper responded that the hay was gone, because he had contracted with another dairyman. Draper took the position that he had made no deal with Hilt; that Hartman had received all of the hay he had paid for, and that Hilt must look to Hartman for any hay which Hartman failed to deliver. Hilt never received any of Draper’s alfalfa hay.1 Rather, Hilt purchased hay from Joe & Martin Trucking at higher prices. Hilt filed suit against Draper for the extra cost above $60 per ton he had paid Joe & Martin Trucking for 400 tons of hay.

The magistrate found that Hartman and Draper knew that the hay was also for other parties and not to be used exclusively by Hartman at his parents’ dairy. The magistrate ruled that Hartman acted as “a go-between, a middleman and/or a factor.” The magistrate also found that the contract had arisen because Hartman had been an agent of Hilt and Draper at various times during the transactions. The magistrate stated that “Draper treated Hartman as a factor or trucking broker and not as the buyer of his crop.” As support for this conclusion, the magistrate cited Draper’s knowledge that the hay was hauled to others, his acceptance of checks from others, and his review of the weight slips with Hartman to verify delivery to the people from whom he had received checks.

The magistrate concluded that Draper was liable to Hilt for breach of contract on an agency theory. The magistrate found that Hartman was Draper’s agent or alternatively, that Hartman had apparent authority to bind Draper, which Hilt had reasonably relied upon. The third basis for the magistrate’s decision was that Hilt was a known and intended beneficiary of the contract between Hartman and Draper and was entitled to enforce that contract. The magistrate ruled that Draper had breached the contract by failing to deliver, or to allow Hartman to deliver, the hay to Hilt.

On appeal, the district court affirmed the judgment entered by the magistrate, but modified the magistrate’s award of attorney fees. The district court agreed with the magistrate that Draper was liable to Hilt, but did so based upon the theory of ratification. The court stated, “[i]t is highly doubtful that Draper ever authorized Hartman in advance to obligate him to deliver hay to Hilt.” The court also stated that “[t]he act of endorsing [the] check and cashing it effectively ratified the actions of Hartman____” The court further determined that the act of cashing the check had clothed Hartman with apparent authority to contract with Hilt on his behalf. The court held that the magistrate had properly awarded attorney fees to Hilt with the exception of the portion of the fees attributable to Draper’s motion to compel, pursued during pretrial discovery proceedings. The *616district court ordered the magistrate to subtract the fees charged for that hearing from the fee awarded.

STANDARDS OF REVIEW

We review the trial record independently from, but with due regard for, the district court’s appellate decision because the issues before us are the same as those considered by the district court. *Hentges v. Hentges,*115 Idaho 192, 765 P.2d 1094 (Ct.App.1988). Considering the letter and spirit of I.R.C.P. 52(a), we must uphold the magistrate’s findings of fact unless they are clearly erroneous, even where, as in this case, the evidence is entirely in written form. *Deer Creek v. Clarendon Hot Springs Ranch,*107 Idaho 286, 688 P.2d 1191 (Ct.App.1984). An appellate court is free to draw its own impressions from entirely written evidence; however, it may not substitute its impressions for the trial court’s findings of fact unless those findings are clearly erroneous. *Avondale on Hayden, Inc. v. Hall,*104 Idaho 321, 658 P.2d 992 (Ct.App.1983). If the findings of fact are supported by substantial competent, although conflicting evidence, they are not clearly erroneous under I.R.C.P. 52(a). *Knowlton v. Mudd,*116 Idaho 262, 775 P.2d 154 (Ct.App.1989). Questions of law are afforded free review. *O’Loughlin v. Circle A Const.,*112 Idaho 1048, 739 P.2d 347 (1987). Where, as here, the district court affirms on a theory different from the theory relied upon by the magistrate, we may also need to review the district court decision. We now review the magistrate’s findings of fact and conclusions of law.

AGENCY

Draper contends that Hartman was not his agent, and thus no contract existed between Draper and Hilt. Draper also contends that two separate contracts existed, one between himself and Hartman and the other between Hilt and Hartman. Draper maintains that he delivered to Hartman all of the hay Hartman had paid for, and thus, he did not breach his contract with Hartman. Draper contends that Hilt’s only recourse lies against Hartman who failed to deliver Hilt’s hay.

Hilt contends that Hartman was not a separate buyer, but an agent or “go-between” acting for the parties, and that a contract resulted between Draper and Hilt for the sale of a specific quantity of hay. Hilt maintains that Draper’s refusal to give more hay to Hartman for delivery to Hilt violated this contract.

In *Gissel v. State,*the Idaho Supreme Court described the nature of an agency relationship and how it arises:

> Agency is a fiduciary relationship in which the principal confers authority upon the agent to act for the principal. Restatement (Second) of Agency § 1 & 7 (1957). Agency can be established in three ways. First, real authority — an expression by the principal, either written or oral, granting authority to the agent to act. Second, implied authority — the principal acts in such a manner which leads the agent to believe that he has authority to act for the principal. Third, apparent authority — acts by the principal involving third parties who are conversant with the business practices of the principal, whereby a reasonable person would be [led] to believe that the agent has authority to act for the principal. [Citations omitted.]

111 Idaho 725, 728-29, 727 P.2d 1153, 1156-57 (1986). Whether an agency relationship existed is a question of fact. *Adkison Corp. v. American Bldg. Co.,*107 Idaho 406, 690 P.2d 341 (1984).

The dispositive agency issue is whether Hartman was the agent of Draper and could bind Draper as a principal in dealings with third parties. The record contains no evidence that Draper informed Hartman, orally or in writing, that he had authority to act on Draper’s behalf. Consequently, we hold, as did the magistrate, that Draper did not confer any real authority on Hartman.

Although the magistrate did not delineate the type of agency he had relied upon in his initial theory, it seems that it was the second type of agency described, *617that is, implied agency. Implied agency arises from voluntary action by the principal which leads the agent to believe that he does have authority to act on behalf of the principal. *Gissel v. State, supra.*In support of his conclusion that Hartman was the agent of Draper and Hilt, the magistrate cited several facts. Among them were that: Draper had been told that the hay would be taken to other dairies besides that owned by Hartman’s parents; Draper had accepted checks written by people other than Hartman; and Hartman had not received an increased price or commission except for the hauling fee which was paid separately to him by the persons to whom Hartman delivered the day. The magistrate also stated in his memorandum opinion that Draper had checked the weight slips to verify the quantity of the loads and that the hay was going to the people who had paid him.

These facts do not establish an implied agency relationship wherein *Draper*acted in such a manner as to lead Hartman to believe that he had authority to act on Draper’s behalf and to legally bind him. Among the facts relied upon by the magistrate for the agency relationship, only two can be characterized as acts by Draper himself. They are Draper’s acceptance of checks given to him by Hartman and which were written by the various dairymen, and Draper’s review of the weight slips to verify that the loads taken by Hartman were delivered to the people who had paid him.

It cannot be said that these actions by Draper led Hartman to believe that he had authority to bind Draper with respect to Hilt. In the first instance, the actions occurred *after*Hartman had contracted with Hilt, the act which allegedly created a contractual relationship between Hilt and Draper. In addition, the acts are clearly not enough to lead Hartman to believe that he had authority to bind Draper, even if they had occurred prior to the creation of the contract between Hilt and Hartman. Hartman could not have had a reasonable belief that Draper had given him authority to act on Draper’s behalf in light of the contract entered into between the two of them in May.

Furthermore, Draper testified that he had checked the weight slips furnished to him by Hartman on July 20; however, the record lacks evidence that his purpose in checking the weight slips was to make sure the hay had been delivered to the people who had written checks payable to him. Draper did testify that he *assumed*the hay had gone to the people whose names Hartman had written on the weight slips. Draper’s assumption regarding the destination of the hay does not justify a finding that his review of the slips was for the specific purpose of determining where the hay had gone. The express purpose of the meeting between Draper and Hartman on July 20 was to “square up” and determine specifically how much hay had been taken as compared to how much money Draper had received. Hartman testified that Wayne Draper had followed him on at least one of his hay deliveries; but, Hartman also testified that he did not think it mattered to the Drapers where the hay was going. The magistrate’s factual finding that Draper reviewed the weight slips for the purpose of “[verifying] that loads paid for were delivered to the ones who’d PAID HIM [sic],” and the inference to be drawn from that finding that Draper recognized an obligation to those people, are not supported by substantial competent evidence and are clearly erroneous.

Whether a contract is ambiguous and, if not, what the contract means, are questions of law over which we exercise free review. *Prouse v. Ransom,*117 Idaho 734, 791 P.2d 1313 (Ct.App.1989). Although the contract in *Prouse*was written, we see no reason why we should not apply this rule to the interpretation of the oral Hartman-Draper contract where the parties’ deposition testimony shows that they agreed to the same contract terms. Hartman and Draper testified that their contract in May consisted of an agreement where Hartman would *“buy*” *all*of Draper’s hay for a price of $60 per ton, provided that the hay was paid for before Hartman removed it from Draper’s farm. The record does not reveal, and Hilt does not contend, that the agreement was any dif*618ferent. We cannot modify express terms of a contract upon which competent parties have agreed, unless there has been a showing of fraud or overreaching. *Lupis v. Peoples Mortgage Co.,*107 Idaho 489, 690 P.2d 944 (Ct.App.1984). There is no evidence of fraud or overreaching in the record, and the magistrate made no such finding.

Draper was bound to sell his hay crop to Hartman at the stated price, on the condition precedent that the hay was paid for by Hartman prior to taking delivery. The term “buy” means “[t]o acquire the ownership of property by giving an accepted price or consideration therefor; or by agreeing to do so ... to purchase.” Black’s Law Dictionary 200 (6th ed. 1990). It is inconsistent to characterize a “buyer” of property as the seller’s agent for purposes of selling that same property. We hold that the Hartman-Draper contract was not ambiguous and further that it bound Hartman to buy Draper’s entire hay crop, thereby acquiring ownership of it.

The alternative theory on which the magistrate relied was breach of contract created through apparent authority. It is clear from the record that Hilt did believe that Hartman was the agent of Draper and that he was selling the hay for Draper, not himself. To establish apparent authority, however, there must be more than the subjective belief of the third party. *Gissel v. State, supra.*In order for Hartman to have had apparent authority to act for and bind Draper, Draper would had to have voluntarily placed Hartman in such a position that a person of ordinary prudence and familiar with business practices in Hilt’s position would have been justified in believing that Hartman had Draper’s authority to act on his behalf. *Bailey v. Ness,*109 Idaho 495, 708 P.2d 900 (1985). Hilt testified that Hartman had told him that the hay was to come from Draper Farms and that Hartman had also stated, “[t]hey have good hay for sale.” When asked why the check was made payable to Draper Farms, Hilt responded that he had asked Hartman what “the man’s name was” and did so because he was under the impression that Draper, and not Hartman, owned the hay. The facts indicate that Hartman led Hilt to believe that he was acting on behalf of Draper as his agent. The fact that Hartman had said that “they,” meaning the Drapers, had hay for sale, and Hartman’s failure to demand that payment be made to him likely led Hilt to believe that Hartman was acting for Draper.

The purported principal must do something to lead the third party to believe that the ostensible agent has authority, as, “apparent authority cannot be created by the acts and statements of the agent alone.” *Id.*Hilt contends that Draper’s acceptance of the $3,000 deposit was an act that led him to believe that Hartman was Draper’s agent. Hilt also argues that allowing Hartman to deliver a load of oat hay to Hilt on a separate contract, and allowing Hartman to deliver loads of hay to other farmers, were acts by Draper that led Hilt to reasonably believe Hartman was Draper’s agent. These deliveries, which are not disputed by Draper, do not, by themselves, establish any act by the principal from which a third party could reasonably infer that an agency relationship existed because they are consistent with Draper’s contract with Hartman.

Although the Idaho cases have not specifically enunciated that the action by the principal giving rise to apparent authority must be prior to or contemporaneous with the formation of the contract between the third party and agent, we think that such a sequence of events is essential to the doctrine of apparent authority. *See Beckenstein v. Potter & Carrier, Inc.,*191 Conn. 120, 464 A.2d 6 (1983); *Kern v. J.L. Barksdale Furniture Corp.,*224 Va. 682, 299 S.E.2d 365 (1983) (apparent authority must be created before the alleged agency transaction occurred). This construction is logically sound because apparent authority involves an element of reliance on the part of the third party. One should not be able to enter into a contract claiming reliance on a certain act which did not occur until after the contract had been entered into. Such a construction of the apparent authority doc*619trine makes logical sense, and is consistent with the related theory of ratification.

The agreement between Hartman and Hilt arose when Hilt agreed to buy 400 tons of hay for $60 per ton with a $10 per ton hauling fee. That agreement occurred on July 5, the date Hilt wrote the deposit check. At that time, Draper had done nothing to lead Hilt to believe that Hartman had authority to bind Draper. The deposit check was not delivered to Draper until after it had been written and given to Hartman. We refuse to consider Draper’s receipt of the check as an act that could afford Hilt the justifiable reliance necessary to establish the apparent authority of Hartman. Moreover, as we discuss below under ratification, Draper had an independent right to receive the check delivered by Hartman. We hold that the magistrate’s finding of apparent authority was clearly erroneous.

Hilt contends that if Hartman were a buyer of Draper’s hay, Draper would have received some additional mark-up aside from the hauling fee; however, Hilt does not point to any evidence supporting this contention. Joe Luzar, a part owner and employee of Joe & Martin Trucking, sold hay to Hilt in August and in an affidavit stated:

> [i]t is the practice of Joe & Martin Trucking, Inc., as well as most other hay brokers, to purchase the hay directly from the farmers. We then re-sell the hay to the various buyers.

> 9. When we re-sell the hay, the price will be determined by using the cost to us of the hay, plus a freight charge. The freight charge depends on the distance the hay must be hauled and its weight.

Luzar also stated that his company charged Hilt a hauling fee of $10 per ton in addition to the market price. It appears from Luzar’s testimony, which is uncontroverted, that Hilt’s assertion that someone *buying*hay who then resells it will receive a higher price aside from the typical hauling fee, is untrue. Because Hilt did not offer evidence on business practices and only relies upon his own assumption that Hartman was acting as a “middleman,” he cannot rely upon business practices to establish apparent authority.

THIRD-PARTY BENEFICIARY

The magistrate determined that Hartman and Draper had contracted for the benefit of Hilt, and that Hilt, as a known and intended beneficiary, was entitled to enforce that contract. We disagree. In May, 1988, when the Hartman-Draper contract was entered into, Draper knew, or at least had reason to know, that the hay would be taken to the Hartman dairy and to other dairies. At that time, Draper did not know which dairies. Later, however, he could assume that some of the hay would go to dairies belonging to the people whose checks were given to him by Hartman.

In *Baldwin v. Leach,*115 Idaho 713, 715, 769 P.2d 590, 592 (Ct.App.1989), we noted that:

> Under Idaho law, if a party can demonstrate that a contract was made expressly for his benefit, he may enforce that contract, at any time prior to rescission, as a third party beneficiary. *See*I.C. § 29-102. The test for determining a party’s status as a third party beneficiary, capable of properly invoking the protection of I.C. § 29-102, is whether the transaction reflects an intent to benefit the party. *Stewart v. Arrington Construction Co.,*92 Idaho 526, 532, 446 P.2d 895, 901 (1968). The party must show that the contract was made for his direct benefit and that he is not merely an incidental beneficiary. *Adkison Corp. v. American Bldg., Co.,*107 Idaho 406, 409, 690 P.2d 341, 344 (1984).

Clearly, Hilt did not meet these requirements. There is no evidence in the record showing that Hartman and Draper intended to benefit Hilt when they entered into their agreement in May, 1988. While Hartman had hauled a “couple” of loads of hay to Hilt’s dairy the year before, that hay came from another source, and there is no evidence that Hartman even approached Hilt about buying hay from the Draper farm until July, 1988. At most, Hilt was only an “incidental beneficiary” within *620Hartman’s contemplation when the May agreement was made. *See Stewart v. Arrington Construction Company, supra.*

Even if we were to uphold the finding of the magistrate that a third-party beneficiary contract existed between Hartman and Draper for the benefit of Hilt, we would not rule that such contract was breached by Draper. This is because the Hartman-Draper contract, as opposed to the Hartman-Hilt contract, contained an express, albeit oral, condition precedent requiring payment prior to delivery. “A condition precedent is an event not certain to occur, but which must occur, before performance under a contract becomes due.” *World Wide Lease, Inc. v. Woodworth,*111 Idaho 880, 728 P.2d 769 (Ct.App.1986) (citations omitted).

In response to a question during his deposition as to why he had cut Hartman off on July 28, Draper responded that in late July, Hartman owed him “$2700, almost $2800 of hay he removed from the farm and had not been paid. And this happened several times through the two month period.” Draper also testified that on July 28 Hartman had delivered a check from De-Kruyf Dairies for $2,737.80 which had made him “approximately even” with Hartman. Hartman did not testify that as of July 28 he had overpaid Draper in relation to hay received, nor does Hilt argue that Draper received more money than he was entitled to in relation to the total amount of hay taken by Hartman. Consequently, there is no evidence in the record to support a finding that the Hartman-Draper contract was breached.

RATIFICATION

In this appeal, the parties have also argued the issue of ratification, which the magistrate did not address, but which formed the basis for the district court’s appellate decision. The district court held that Draper had ratified the actions of Hartman by endorsing and cashing the deposit check written by Hilt.

Although we disagree with the district court’s decision, we recognize that the district court was free to use a different theory to affirm the judgment because it thought the result correct. *Dept. of Health and Welfare v. Engelbert,*114 Idaho 89, 753 P.2d 825 (1988) (an appellate court may affirm a lower court’s decision on the correct theory where the decision was based on an erroneous theory). We consider the issue of ratification because it is discussed in the district court’s memorandum opinion. *See Centers v. Yehezkely,*109 Idaho 216, 706 P.2d 105 (Ct.App.1985) (appellants may not raise issues before second appellate court not presented to intermediate court).

For several reasons, Draper argues that his actions did not amount to a ratification of Hartman’s contract with Hilt. Draper contends that Hilt’s ratification theory fails for the same reasons that the ratification theory was not sustained by this Court in *Twin Falls Livestock Commission Company v. Mid-Century Insurance Company,*117 Idaho 170, 786 P.2d 567 (Ct.App.1989).

Twin Falls Livestock Commission Company (TFLC) sued a Colorado feedlot operator, among others, contending that the feedlot operator owed TFLC $32,000 for cattle purchased by the operator’s agent. The “agent” had at times purchased cattle in Idaho for the feedlot operator, but only on the specific request of the operator, and never previously from TFLC. The former agent owed $32,000 to the operator because he failed to account for money received in a prior transaction, and he attempted to pay this debt with the cattle he obtained from TFLC by representing that he was purchasing them “for” the feedlot operator.

Based upon those circumstances, we concluded that the feedlot operator had not ratified the “agent’s” actions, for three discrete reasons: (1) the purported agent was not the operator’s agent in fact at the time he purchased the cattle from TFLC; (2) when the feedlot operator accepted the cattle in payment of the former agent’s debt, it did not have knowledge of all the material facts connected with their purchase from TFLC; and (3) the feedlot operator had an independent right to payment of a debt which was satisfied by delivery of the cat-*621tie. *Twin Falls Livestock Commission Company,*117 Idaho at 183, 786 P.2d at 574.

Draper’s arguments have merit, and we decline to uphold the magistrate’s entry of judgment based upon the ratification theory applied by the district court. First, we have already discussed the rationale that the magistrate’s finding of an agency relationship, real or apparent, is not supported by substantial evidence and therefore is clearly erroneous. In addition, unlike the facts in *Twin Falls Livestock Commission Company,*the record contains no evidence, nor does Hilt contend, that Hartman was ever the agent of Draper prior to the transactions at issue.

Second, Draper was not aware of all of the material facts surrounding the contract between Hartman and Hilt. Hartman was not then an agent of Draper. It cannot be presumed that Draper had notice of all information exchanged between Hartman and Hilt when Hilt gave his “deposit” check to Hartman. In fact, Hartman testified that he did not tell Draper, “It’s a deal,” as Hilt had requested that he do when delivering Hilt’s check to Draper. Hartman did not say anything to Draper suggesting that Hilt intended, by giving a check for Draper with the notation “Deposit 400 Ton Hay,” to create a contract between Draper and Hilt, requiring Draper to sell and Hilt to buy 400 tons of alfalfa hay at $60 per ton.

It is true that the price was the same in the Hartman-Hilt contract as it was in the Hartman-Draper contract, namely $60 per ton; however, Draper had not been made aware of this fact. It is possible that Hartman could have told Hilt he was selling hay for $50 per ton instead of $60, and that it came from Draper Farms. Would Hilt have been able to enforce this hypothetical contract against Draper based on ratification if Draper had accepted the check without having been informed of the price? We think not.

Furthermore, the Hartman-Hilt contract did not contain the same terms as the Hartman-Draper contract, and thus it cannot be presumed that Draper knew all of the material facts surrounding it. Hartman had apparently told Hilt that he or Draper needed some earnest money or a deposit, so Hilt wrote a check for approximately twelve percent of the purchase price for the 400 tons he had agreed to buy. Draper did not know that Hartman failed to inform Hilt of Draper’s requirement for full payment in advance on each load of hay. This prepayment condition was material to Draper and he made it a condition of his contract with Hartman.

Third, Draper had an independent right to payment of the $3,000. It is not clear from the record whether or not Hartman had taken more hay than he had paid for at the time he tendered the $3,000 check from Hilt to Draper. This is because the record does not reflect the specific date Draper received the $3,000 check, and also because some of the weight slips are illegible. We are unable to determine the amount of hay that left Draper’s farm at the time Draper received the check, and thus we cannot characterize the $3,000 payment as a debt owed. Even though we cannot consider the check received as a debt payment, Draper still had an independent right to receive it. Draper had an independent right to the $3,000 check delivered by Hartman arising from his contract with Hartman, wherein Hartman had agreed to prepay all of the hay. The fact that the check was written by Hilt does not prevent the check from operating to serve as payment from Hartman to Draper, nor does the origination of the check negate the condition in the Hartman-Draper contract. We hold that Draper had an independent right to this payment coming from Hartman.

DIRECT CONTRACT

Hilt also argues that he had a contract with Draper for the sale of 400 tons of hay aside from the agency theories. Hilt contends that the $3,000 check itself, delivered by Hartman and accepted by Draper, established a contract. The authority Hilt cites for this proposition does not establish such a conclusion absent other facts which do not exist in the instant case. In fact, the cited section of one of *622Hilt’s authorities states that, “[i]t should be kept in mind that a memorandum which satisfies the statute [of frauds] does not necessarily prove the existence of a contract; it is only evidence of an agreement.” Bender’s Uniform Commercial Code Service, Yol. 3, Section 2.04[1] (1991). The check by itself does not create a contract. As we stated in the ratification discussion, Draper had an independent right to receive payment from Hartman in conformity with the express contract he had entered into with Hartman; the check from Hilt was part of the contract payment due from Hartman. Therefore it cannot be said that the check alone establishes that Hilt and Draper shared a mutual intent to contract. *Gulf Chemical Employees v. Williams,*107 Idaho 890, 693 P.2d 1092 (Ct.App.1984).2

ATTORNEY FEES ON APPEAL

Draper timely requested an award of fees for this appeal under I.C. § 12-120 in his first appellate brief. I.A.R. 35(a)(5), 41(a). Although Draper is the prevailing party in this appeal, initially this Court did not award fees. As a result, Draper petitioned for rehearing, arguing for a mandatory award of fees under I.C. § 12-120(3) because Draper has been successful in defending an “action to recover on an ... [alleged] contract relating to the purchase or sale of goods,” and also because this action related to a “commercial transaction.”

On the other hand, Hilt argues that because we held no contract existed between him and Draper for the sale of Draper’s hay, this statutory ground for awarding fees does not apply, citing *Day v. Ciba Geigy Corp.,*115 Idaho 1015, 772 P.2d 222 (1989). We are not persuaded that *Day*controls this case.

Unlike the situation in *Day,*Hilt’s action against Draper was based entirely upon the existence of a contract. Although he failed to prove a contract, that failure should not insulate him from having to pay a reasonable award of attorney fees to the prevailing party. *See, e.g., Brower v. E.I. Du-Pont De Nemours and Company,*117 Idaho 780, 784, 792 P.2d 345, 349 (1990), *citing Clement v. Franklin Invest. Group, Ltd.,*689 F.Supp. 1575 (D.Idaho 1988) (where claim was for breach of contract, attorney’s fees were justified despite court’s ruling that a contract did not exist). “[T]he test is whether the commercial transaction comprises the gravamen of the lawsuit.” *Id.*

The present case fits the language of I.C. § 12-120(3) precisely. The “gravamen” of Hilt’s action was contractual. *Brower, supra.*Because Draper has prevailed in an action brought to recover damages for the breach of a contract for the sale of hay, he is entitled to a reasonable award for attorney fees incurred in bringing this appeal. I.C. § 12-120(3); *Twin Falls Livestock Commission Company v. Mid-Century Insurance Company, supra; Konic International Corp. v. Spokane Computer Services, Inc.,*109 Idaho 527, 708 P.2d 932 (Ct.App.1985).

CONCLUSION

We hold that the evidence presented to the magistrate was not sufficient to sup*623port a finding that Hartman was Draper’s agent, or had apparent or implied authority to contract on Draper’s behalf. Draper’s act of accepting Hilt’s “deposit” check did not create a contract between Draper and Hilt for the sale of 400 tons of hay, by ratification or otherwise. The judgment awarding Hilt damages for breach of contract must be reversed. The case is remanded with directions to enter judgment, with costs, to Draper. Costs and attorney fees on appeal are awarded to Draper.

SILAK, J., and CAREY, J. Pro Tern., concur.

1

. At Hilt’s request, Hartman did deliver one load of oat hay from the Draper farm to Hilt on July 18, 1988. The trial court allowed a credit to Draper for the value of this hay, in computing the amount of Hilt’s judgment against Draper.

2

. Draper argues that even if there was a contract between Hilt and Draper for the sale of 400 tons of hay, Draper did not breach that contract and Hilt bore the risk of loss from any failure by Hartman to deliver the hay. Draper notes that if the contract existed, it required payment in advance for all hay removed from the Draper farm. Draper notes that on July 28 Hartman owed Draper over $2,700 for hay already removed. Although Hartman gave Draper a check which brought him current again, Hartman could not pay, and did not offer to pay, in advance for another load of hay. Accordingly, Draper refused to allow Hartman to take more hay. Because Hartman had received all of the hay he had paid for, amounting to over 400 tons taken after July 5 (the date of the alleged contract), Draper did not breach the contract.

Moreover, Draper argues, Hartman was *Hilt's*agent for the purpose of hauling the hay. In any event, Hilt bore the risk of nondelivery or misdelivery of the hay because of the provisions of I.C. § 28-2-509(1) which, under the facts of this case, place the risk of loss upon the buyer. We are satisfied that this issue was raised in the trial court. However, because we hold that a contract between Draper and Hilt did not exist, we do not need to address the merits of these arguments.