#### CARPET WORLD, INC., an Oklahoma Corporation, Appellant, v. Gerald G. RIDDLES and Mary E. Riddles, Appellees.

No. 63023.

Supreme Court of Oklahoma.

May 26, 1987.

*940Richard A. Nelson, Oklahoma City, for appellant.

Lawrence D. Taylor, Tulsa, for appellees.

DOOLIN, Chief Justice.

The primary issue for decision is whether an appellate court can render the judgment the trial court should have rendered where the party-defendant has not been afforded an opportunity to present its evidence before the trial court. We answer in the negative.

Having reached a conclusion that the Court of Appeals judgment was incorrect, we must then address the effect of our finding on the award of costs and attorney fees rendered below.

Gerald G. Riddles (Buyer) and his wife, entered into a contract with Carpet World, Inc., (Seller), for the purchase of $2,335.19 worth of carpet to be installed in their home. The Buyer had selected the style and color of the carpet that he wanted from a sample, which Seller allowed Buyer to keep. Seller’s employees delivered the carpet, and while installing the carpet, the Buyer complained that the carpet did not conform to the sample. Seller agreed.

The parties then negotiated a modification of their original contract whereby the non-conforming carpet would be entirely installed in Buyer’s home, and would remain until new carpet, conforming to Buyer’s original order, could be installed by Seller. The purchase price, upon which Buyer had made no payment, would remain the same. The non-conforming carpet was to be returned to Seller upon installation of carpet conforming to Buyer’s original order.

Seller then ordered new carpet two times, but each time Buyer rejected the *941carpet as being non-conforming to the order and sample. Thereafter, Seller filed suit for breach of contract, and sought the original purchase price of the carpet already installed in Buyer’s home. Buyer had refused to return the non-conforming carpet to Seller. Buyer counterclaimed alleging non-acceptance, rejection, revocation, failure to perform the contract, failure of consideration, breach of warranty, and material breach of contract by Seller. Thus Buyer contends that Seller’s breach of contract authorized Buyer’s recission.1

After Seller presented its case, the Buyer entered a demurrer to the evidence. The trial court ruled that Buyer’s rejections of the second and third rolls of carpet ordered by Seller were wrongful and a breach of the *modified*contract. Nevertheless, the trial court sustained Buyer’s “partial demurrer” to Seller’s evidence holding that Buyer owed Seller $175.50 for the cost of the carpet pad installed in Buyer’s home. Thus, the trial court’s judgment allowed the Buyer to retain and use unpaid-for carpet installed in Buyer’s home by Seller.

Seller appealed.

The Court of Appeals believed that Seller’s suit was an action governed by Article 2 of the Uniform Commercial Code (UCC),2 and by that section of Article 1 which prescribed a liberal administration of remedies.3 However, the appellate court found that the provisions of Article 2 of the UCC were of “little help in the present situation where there was an original qualified rejection which included an agreement to accept the first carpet until the receipt, approval, and installation of conforming goods.” Accordingly, the Court of Appeals characterized the issue before it as whether a Buyer’s retention and use of non-conforming goods and Buyer’s refusal to return such goods to the Seller, constitutes an acceptance of the non-conforming goods under 12A O.S. 1981, § 2-709.4

The Court of Appeals correctly found that the trial court improperly attempted to strictly apply the relevant provisions of the UCC. The trial court also erred by ruling that Seller was not entitled to the original contract price, because Seller did not produce evidence to show any damages flowing from the Buyer’s wrongful rejection of the third roll of carpet. We agree with the appellate court that the trial court’s partial sustention of Buyer’s demurrer, and the trial court’s award of $175.50 for the carpet pad Seller was “legally inconsistent.” Such action amounted to an “overruling of the [Buyer’s] demurrer to the evidence.” Moreover, Buyer’s counsel admitted this fact at oral argument before the appellate court. A demurrer to the evidence is similar to the federal rule for a motion to dismiss for failure to state a claim on which relief may be granted. It is an allegation that no legal cause of action has been proven,5 and is not a tool for ‘dismissal’ of individual items of damage. Although we agree with the appellate court’s assessment of this case, we disagree with its final disposition.

The appellate court held that Buyer’s collective actions of not accepting the replacement carpet and refusing to return the non-conforming carpet frustrated the performance of the parties’ modified agreement; and therefore Buyer did accept the *942non-conforming carpet installed in Buyer’s home by Seller. Thus, the court held that Buyer’s conduct constituted an acceptance. Consequently, the Court of Appeals reversed the trial court’s judgment, holding that Seller was entitled to judgment against Buyer for the original contract price and remanded the action to determine Seller’s award of cost, including the cost of the appeal from the trial court, and a reasonable attorney’s fee.

We granted certiorari limited to the question of whether the Court of Appeals denied Buyer’s due process of law by ordering that judgment be entered against Buyers for the original contract price. We reverse that judgment awarding Seller the recovery of the original contract price, and remand the case to the trial court, because Buyer’s constitutional right to due process has been abridged in that Buyer has not been afforded the opportunity to present evidence before the trial court.

> [I]f the order sustaining the demurrer to the evidence in an equity action is reversed on appeal as against the clear weight of the evidence, then the defendant must be afforded an opportunity to present his evidence. Thus the general rule that the appellate court will render the judgment the trial court should have rendered is not operative inasmuch as the defendant has yet to put his evidence before the Court.6

Here, judgment for Carpet World was inappropriate, because the Court of Appeals made its decision without benefit of Buyer’s evidence in support of the defense and counterclaim.7

We further reverse the award of costs and attorney fees because our ruling does not terminate the action by Seller to recover the costs of goods sold to Buyer. A reasonable attorney’s fee may be allowed to the prevailing party in a civil action to recover on a contract relating to the sale of goods, wares or merchandise.8 However where the action is left pending there can be no such allowance. A prevailing party is one in whose favor judgment was rendered and as yet no judgment has been rendered here.9

We therefore direct the trial court to enter the appropriate award of fees to the ultimately prevailing party, and in determining that award the court may take into account the amount of costs and fees relating to this appeal.10

The opinion of the Court of Appeals is VACATED and the cause is REMANDED for further proceedings.

HARGRAVE, V.C.J., and LAVENDER, SIMMS, OPALA, ALMA WILSON, KAUGER and SUMMERS, JJ., concur.

1

. See: *Murphy v. Banfield,*363 P.2d 942 (Okl.1961), wherein an action commenced as a case at law is transformed into one in equity by reason of a counterclaim seeking cancellation and recission. The instant case is also subject to the application of equitable principles for the same reasons.

2

. 12A O.S.1981, § 2-101, et seq.

3

. 12A O.S.1981, § 1-106, reads in pertinent part:

> (1) The remedies provided by this act shall be liberally administered to the end that the aggrieved party may be put in as good a position as if the other party had fully performed....

4

. 12A O.S.1981, § 2-709 reads, in pertinent part:

> (1) When the buyer fails to pay the price as it becomes due the seller may recover, together with any incidental damages under the next section, the price

> (a) of goods accepted or of conforming good lost or damages within a commercially reasonable time after the risk of their loss has passed to the buyer,

> 

5

. 12 O.S.1981, § 577, Third.

6

. *Malnar v. Whitfield,*708 P.2d 1093, 1095 (Okl.1985).

7

. *Jackson v. Independent School Dist. No. 16,*648 P.2d 26, 31 (Okl.1982), *Geb v. Wilkins,*399 P.2d 456, 459 (Okl.1965).

8

. 12 O.S.1981, § 936.

9

. *Associates Financial Services v. Millsap,*570 P.2d 323, 326 (Okl.1977).

10

. *Chamberlin v. Chamberlin,*720 P.2d 721, 728 (Okl.1986).