
682 N.W.2d 317 (2004)
2004 SD 77
GRYNBERG EXPLORATION CORPORATION, Plaintiff and Appellee,
v.
Donald PUCKETT, Nancy A. Puckett, Michael Sweeney, Everett Frerichs d/b/a Everett Frerichs Oil & Gas Company, Defendants and Appellants, and
W.D. Culwell, Inc., and Eland Energy Inc., Defendants.
No. 22979.
Supreme Court of South Dakota.
Considered on Briefs April 26, 2004.
Decided June 9, 2004.
*318 Dwight A. Gubbrud of Bennett, Main & Gubbrud, Belle Fourche, South Dakota, Attorneys for plaintiff and appellee.
Brad A. Schreiber of Day, Morris & Schreiber, Belle Fourche, South Dakota, Attorney for defendants and appellants.
ZINTER, Justice.
[¶ 1.] Grynberg Exploration Corp., an operator of oil wells, sued alleged interest holders to recover a share of the oil well operating expenses. The trial court ruled that Grynberg was entitled to recover the expenses on theories of contract and quasi-contract. We affirm.

Facts and Procedural History
[¶ 2.] Grynberg Exploration Corp. was the "operator" of oil wells in the East Simms Draw and the North Hollingsworth oil fields in Fall River County. As the operator, Grynberg was responsible for "managing the ... production of oil and for accounting for profits and expenses on behalf of all of the owners." Grynberg v. Citation Oil & Gas Corp., 1997 SD 121, ¶ 2, 573 N.W.2d 493, 497. Grynberg sought recovery against Donald Puckett, Nancy Puckett, and Michael Sweeney for oil well operating expenses in the East Simms Draw field. Grynberg's claim against Everett Frerichs relates to operating expenses in the North Hollingsworth field. Because the legal theories are different in each field, we address the East Simms Draw and the North Hollingsworth claims separately.

East Simms DrawPucketts and Sweeney
[¶ 3.] Grynberg, Pucketts, and Sweeney are all successors in interest to prior operators and interest owners in the East Simms Draw field. Citation Oil and Gas Corp. (Citation Oil) originally operated the wells. Wright Citation I Ltd. (Wright Citation), a limited partnership, was an original "non-operator" interest owner. The wells were at all times operated pursuant to a model form operating agreement. That operating agreement provided that interest owners were responsible for their proportionate share of operating expenses.
*319 [¶ 4.] Wright Citation mortgaged its ownership interest to Citizen Fidelity Bank and Trust Company, which later became PNC Bank, in order to secure a loan to Wright Enterprises. Wright Enterprises subsequently defaulted on the loan, and PNC Bank sued Wright Enterprises, Wright Citation, and others who had interests in these wells.[1] PNC Bank ultimately obtained a $3.1 million "Agreed Judgment" against the defendants in that litigation. One of those judgment debtors was Thomas Wright, a partner in Wright Citation. At that time, Thomas Wright was married to Michael Sweeney's daughter. Michael Sweeney and Donald Puckett are siblings.
[¶ 5.] Pucketts and Sweeney apparently desired to assist Thomas Wright in his financial difficulties with PNC Bank. In April 1994, Pucketts and Sweeney paid PNC Bank $85,000 for the Agreed Judgment. In return, Pucketts and Sweeney each received an undivided 50% interest in the East Simms Draw field. The interest included the collateral pledged to the bank by Wright Citation as well as numerous other oil and gas properties. They acquired these interests by an "assignment" from PNC Bank. Those interests were referred to in the assignment as the "Citation Oil Interests," and they were defined as "[a]ll of the property pledged, assigned and conveyed by Wright Citation [ ] to PNC Bank pursuant to the Mortgage[.]" (Emphasis added.) In addition to the property acquired under the assignment, Pucketts and Sweeney also assumed "all... obligations" relating to the oil interests acquired.
[¶ 6.] Citation Oil continued as the operator of the wells in the East Simms Draw throughout these transactions. After they acquired their interest from PNC Bank, Pucketts and Sweeney notified Citation Oil of the assignment, and they directed Citation Oil to deduct their share of expenses from their share of oil production revenues. As with its other working interest owners, Citation Oil then began paying Pucketts and Sweeney their proportionate share of the net production revenue (the production revenue remaining after withholding operating expenses). Citation Oil also mailed statements to the working interest owners, disclosing the revenue and expenses for each well.
[¶ 7.] Citation Oil was eventually removed as operator, see Grynberg, 1997 SD 121, 573 N.W.2d 493, and Grynberg became the new operator of the East Simms Draw field. However, unlike Citation Oil, Grynberg sold the oil to Texaco Trading & Transportation (Texaco). Under that arrangement, Grynberg did not receive direct payment of oil revenues from Texaco. Rather, Texaco paid the interest owners directly in proportion to each ownership interest. Furthermore, Texaco did not withhold operating expenses. Consequently, all operating expenses were paid by Grynberg, who subsequently billed each working interest owner, including Pucketts and Sweeney, for their monthly share of the operating expenses.
[¶ 8.] In December 1997, operations ceased at the East Simms Draw field because the wells could no longer be operated economically. During the time that Grynberg operated the wells, Texaco paid Pucketts $12,454.73 and Sweeney $12,473.65 for their share of production revenues. During the same period, Grynberg alleged that Pucketts' proportionate share of operating expenses was $18,823.18, and Sweeney's alleged share was $18,821.04. Pucketts and Sweeney, however, refused to pay Grynberg.
*320 [¶ 9.] Consequently, Grynberg sued Pucketts and Sweeney for breach of contract and, in the alternative, breach of quasi-contract. The trial court ruled for Grynberg on both theories, holding that Grynberg was entitled to judgment against Pucketts and Sweeney for those operating expenses, plus interest and attorney's fees as provided for in the operating agreement.

North Hollingsworth FieldFrerichs
[¶ 10.] The North Hollingsworth field was operated by Grynberg in the same manner as the East Simms Draw. Texaco purchased the oil produced, and it divided the production revenue proportionally among working interest owners. Grynberg also paid the operating expenses and billed each working interest owner for their proportionate share of operating expenses.
[¶ 11.] Everett Frerichs, d/b/a Everett Frerichs Oil & Gas Company, owned and operated oil wells in Nebraska, Colorado, Texas, and South Dakota. In June 1996, Frerichs purchased a .XXXXXXXXX working interest in the North Hollingsworth wells. Frerichs purchased this interest from Providence Energy Joint Venture III, which was a limited partnership managed by Eland Energy Incorporated.
[¶ 12.] Once Grynberg was notified that Frerichs had purchased Providence's interest, Grynberg began mailing the monthly operating expense statements to Frerichs. However, because Texaco was apparently not notified of the transfer, it continued to make payments to Eland Energy, manager of Providence. From August 1996 until June 1997, Eland Energy received $12,280.26 from Texaco for Frerichs' share of production revenue from the North Hollingsworth wells.[2]
[¶ 13.] During that same period, Frerichs' share of operating expenses was $21,020. Frerichs was billed monthly, but he did not pay any of the expenses. Frerichs asserted that he had "wanted out" of the obligation to pay expenses, so he had assigned his interest to Grynberg. Alternatively, Frerichs asserted that if there was a contractual obligation to pay expenses, he received no consideration for the contract. The trial court found otherwise and ruled that Grynberg was entitled to recover Frerichs' proportionate share of operating expenses.
[¶ 14.] Pucketts, Sweeney, and Frerichs now appeal, contending that: (1) certain findings of fact were clearly erroneous; (2) certain conclusions of law were erroneous as a matter of law; and, (3) that a portion of an early trial court memorandum opinion denying summary judgment for Grynberg should now be deemed the law of the case. By motion, Grynberg seeks its appellate attorney's fees.

Analysis and Decision
[¶ 15.] Pucketts, Sweeney, and Frerichs challenge numerous trial court findings of fact and conclusions of law. However, the essence of their challenge is their contention that there was no contract, quasi-contract, or other obligation to pay the operating expenses. We review the trial court's findings of fact "under a clearly erroneous standard." Sherburn v. Patterson Farms, Inc., 1999 SD 47, ¶ 4, 593 N.W.2d 414, 416 (citations omitted). "The trial court's findings will not be disturbed unless the court is `firmly and definitely *321 convinced a mistake has been made.'" Id. (citation omitted). We review conclusions of law de novo. Id.

Pucketts and Sweeney
[¶ 16.] As previously mentioned, Pucketts and Sweeney assert that "[t]here is no evidence that a contractual relationship existed between Pucketts and Grynberg or Sweeney and Grynberg[.]" Pucketts and Sweeney base this assertion on the premise that they did not own a "working interest" in the wells. Rather, they assert that their assignment from PNC Bank only conveyed the bank's security interest. They conclude that because the bank was not obligated to pay expenses under the security interest, neither were they. They also support their position by arguing that they never signed anything obligating them to pay expenses and there was no mutual assent to any alleged contract to pay expenses. We conclude that all of their arguments are misplaced because they fail to acknowledge the nature of the property interest they acquired from PNC Bank.
[¶ 17.] The property interest at issue was acquired by assignment from PNC Bank. After the default on the note to PNC Bank, Wright Citation and the other debtors stipulated to an "Agreed Judgment." That Agreed Judgment gave PNC Bank explicit authority to "sell any or all of the remaining collateral" of Wright Citation that was subject to the bank's security interest.
[¶ 18.] PNC Bank subsequently exercised that right to sell collateral by assigning the "Citation Oil Interests" to Pucketts and Sweeney. Significantly, the terms of that assignment were not limited to a transfer of a security interest. Rather, the assignment provided that Pucketts and Sweeney "desire to purchase the interests of PNC Bank under the Judgment and under the Mortgage[.]" The interests conveyed under the Agreed Judgment included "any and all interests that PNC Bank may have, if any, in and to the Mortgage, the Citation Oil Interests, and the Judgment[.]" (Emphasis added.) Thus, the assignment transferred collateral ("Citation Oil Interests"), which expressly included Wright Citation's ownership interest in the oil wells. Moreover, that collateral was transferred free of the bank's security interest. SDCL 57A-9-504(4) (1988).[3] Most significantly, the assignment specifically imposed the contractual obligation of paying operational expenses. It stated: "Buyers hereby accept any and all such interests and assume all rights and obligations relating thereto." (Emphasis added.)
[¶ 19.] As a result, this assignment was not a mere transfer of a security interest. It was a sale of the "Citation Oil Interests" *322 that was contractually subject to the operating agreement's obligation to pay a proportionate share of operating expenses. Therefore, the trial court correctly concluded that Pucketts and Sweeney were contractually obligated to pay those expenses.
[¶ 20.] Pucketts and Sweeney, however, argue that an early trial court memorandum opinion denying summary judgment to Grynberg constituted the law of this case. In its denial of summary judgment, the trial court stated, "Pucketts and Sweeney have what PNC Bank had[,] which was a security interest created in July 1988." From this, Pucketts and Sweeney reassert their argument of having only acquired a "secured interest." They then contend that this earlier ruling should be deemed the law of this case, superceding the court's later finding that they owned a working interest in the wells.
[¶ 21.] "The `law of the case' doctrine is intended to afford a measure of finality to litigated issues." Western States Land & Cattle Co., Inc. v. Lexington Ins. Co., 459 N.W.2d 429, 435 (S.D. 1990) (citations omitted) (emphasis added). See also Shaffer v. Honeywell, Inc., 249 N.W.2d 251, 260 (S.D.1976) (stating that there "is a rule of practice and procedure[,] which for policy reasons provides that once an issue is litigated and decided it should remain settled for all subsequent stages of the litigation"). Here, however, the trial court's memorandum opinion "did not purport to find any facts,"[4] or finally determine the merits of any issue. It simply denied summary judgment. Moreover, the doctrine is usually applied when a question decided on a former appeal is questioned in a second or any subsequent appeal involving any branch of the case. Western States Land & Cattle Co., 459 N.W.2d at 435. Here, there has been no prior appeal from the memorandum decision denying summary judgment. Finally, SDCL 15-6-56(c) provides that a summary judgment is "interlocutory in character." Therefore:
[A]s a practical matter the application of the rule prior to entry of judgment [should not] inhibit the trial court in correcting what it believed to be an erroneous decision. The rule of the "law of the case" should not be used to perpetuate an erroneous decision at this stage of the proceedings.
Shaffer, 249 N.W.2d at 260.
[¶ 22.] We are not suggesting that the trial court's earlier ruling was erroneous. We merely believe that, considering these principles, the law of the case doctrine was inapplicable to the trial court's earlier memorandum opinion denying summary judgment. Notwithstanding its memorandum decision, the trial court was free to find, after a trial on the merits, that the interest conveyed was more than a security interest.
[¶ 23.] Pucketts and Sweeney finally assert that there was no "mutual assent" to any contractual obligation to pay expenses. We believe that Pucketts' and Sweeney's actions, and those of their attorney, indicate otherwise. Within one month of the assignment, Pucketts' attorney, acting on behalf of Pucketts and Sweeney, notified Citation Oil of the assignment describing their interest as an "ownership interest." The attorney also directed Citation Oil to deduct Pucketts' and Sweeney's share of expenses from production revenue. Pucketts and Sweeney *323 subsequently paid those expenses as required by the assignment and operating agreement until Grynberg became the operator and began billing Pucketts and Sweeney separately from the revenues. It was only then that they refused to pay their share of operating expenses. This conduct demonstrates contemporaneous mutual assent to the rights and obligations under the assignment and the operating agreement.
[¶ 24.] Furthermore, during this time, Pucketts and Sweeney received and accepted the production revenue from Texaco. Having accepted the benefits, they are precluded from repudiating the accompanying obligations. South Dakota law provides that the "voluntary acceptance of the benefit of a transaction is equivalent to a consent to all the obligations arising from it so far as the facts are known or ought to be known to the person accepting." SDCL 53-3-5.
This statute is a declaration of the equity rule which prevents the party benefited from questioning the validity and effectiveness of a matter or transaction insofar as it imposes a liability or obligation upon him. It precludes one who accepts the benefit from repudiating the accompanying obligations. The rule in effect denies the right to assume inconsistent positions and is based on the principle of election and ratification[.]
Strom v. Buholz, 73 S.D. 583, 586, 46 N.W.2d 912, 914 (1951) (citations omitted). Consequently, because Pucketts and Sweeney accepted the benefits of the assignment and operating agreement, they are precluded from repudiating the corresponding obligations.
[¶ 25.] We therefore agree with the trial court's ultimate conclusion[5] that an express contract existed that obligated Pucketts and Sweeney to pay their pro-rata share of the operating expenses. For these reasons, we need not reach the issue of quasi-contract.

Frerichs
[¶ 26.] Frerichs first argues that any contract to pay expenses that might have existed between his company and Grynberg failed for lack of consideration. Frerichs points out that the production payments from this field were being mistakenly held by Eland Energy. Frerichs asserts that because he had not "received" that revenue, he did not receive the benefit of the bargain, and there was no consideration for any contractual obligation to pay expenses.
[¶ 27.] However, failure of consideration is an affirmative defense, and Frerichs did not plead it in his answer or in his response to Grynberg's amended complaint. "Under SDCL 15-6-8(c), a party's pleadings must affirmatively set forth matters constituting an avoidance or affirmative defense. If such an affirmative defense is not pleaded, it is waived." Wolff v. Secretary of South Dakota Game, Fish and Parks Dept., 1996 SD 23, ¶ 15, 544 N.W.2d 531, 534 (quoting Varga v. Woods, 381 N.W.2d 247, 251 (S.D.1986)). Because Frerichs did not plead his defense of failure of consideration, it was waived.[6]
[¶ 28.] Even if this issue were not waived, it is undisputed that Texaco mistakenly *324 made Frerichs's payments to Eland Energy, and those payments were held for Frerichs by Eland Energy. Moreover, during this litigation, the funds were paid to the court to be used to partially satisfy any judgment against Frerichs. Therefore, even if Frerichs had properly raised this issue, he did receive the benefit of the payments, and there was no failure of consideration.
[¶ 29.] Frerichs's second argument is that he "did not pay costs and expenses because he had assigned his interest [back] to Grynberg." Frerichs alleged that he assigned his interest to Grynberg on August 31, 1996. Therefore, he testified that he did not claim any right, title, or interest to the revenue that had erroneously been received by Eland Energy.
[¶ 30.] The record, however, does not support Frerichs's claim of a valid assignment. We first note that the purported assignment contains signature lines for both the assignor (Frerichs) and assignee (Grynberg). However, Grynberg neither signed nor acknowledged the assignment. Moreover, the purported assignment contains a legal description of real property, but the blank reserved for the description of the oil interests assigned was not completed. Finally, the legal description contained in the alleged assignment does not describe the same land that Frerichs acquired.[7] Therefore, the document itself does not contain all of the essential terms necessary to establish a contract by assignment.
[¶ 31.] Aside from that, it is significant that Bob Pelo, controller for Grynberg, indicated that there was no assignment. He testified that he was responsible for accounting at Grynberg, and he would have been advised if Grynberg had obtained an assignment of Frerichs's interest. However, to Pelo's knowledge, Grynberg never received or accepted any assignment of Frerichs's interest. This testimony is convincing because, despite the fact that he continued to receive billings from Grynberg, Frerichs neither asked Grynberg to stop the billing nor notified Grynberg of a mistake.
[¶ 32.] We give deference to the trial court's opportunity to judge the credibility of witnesses and to weigh their testimony on such issues of fact. Meldrum v. Novotny, 2002 SD 15, ¶ 18, 640 N.W.2d 460, 463. Considering the evidence presented, the trial court's finding that there was no assignment was not clearly erroneous.

Grynberg's Appellate Attorney's Fees
[¶ 33.] Grynberg submitted a motion for appellate attorney fees. Pursuant to SDCL 15-26A-87.3, appellate attorney fees may be granted "where such fees may be allowable[.]" We have interpreted this to mean that appellate attorney fees may be granted "only where such fees are permissible at the trial level." Hentz v. City of Spearfish, Dept. of Pub. Works, Office of Planning & Zoning, 2002 SD 74, ¶ 13, 648 N.W.2d 338, 342 (citation omitted). At the trial level, SDCL 15-17-38 provides that compensation for attorney fees rendered in civil actions "is left to the agreement, express or implied, of the parties."
[¶ 34.] There was such an agreement in this case. The operating agreements governing *325 both the East Simms Draw and the North Hollingsworth fields allowed the operator to recover attorney fees from non-operators. Consequently, Grynberg is entitled to recover appellate attorney fees of $5,620, the amount Grynberg submitted in its verified, itemized statement of legal services rendered.
[¶ 35.] Affirmed.
[¶ 36.] GILBERTSON, Chief Justice, and SABERS, KONENKAMP and MEIERHENRY, Justices, concur.
NOTES
[1]  Wright Citation no longer exists.
[2]  The payments Eland Energy received were held in a special account in the name of Everett Frerichs. During this litigation, Grynberg amended its complaint to include claims for interpleader and accounting against Eland Energy. Eland Energy subsequently deposited these payments ($12,280.26) with the Fall River County Clerk of Courts for the benefit of Frerichs.
[3]  Although PNC Bank was initially acting as a secured creditor, it ultimately sold collateral (the "Citation Oil Interest") free of that security interest pursuant to SDCL 57A-9-504(4) (1988). At the time of the assignment, SDCL 57A-9-504(4) provided in part:

When collateral is disposed of by a secured party after default, the disposition transfers to a purchaser for value all of the debtor's rights therein, discharges the security interest under which it is made and any security interest or lien subordinate thereto.
Because Pucketts and Sweeney were "purchasers for value," they acquired Wright Citation's rights and obligations in the "Citation Oil Interest" collateral free of PNC Bank's security interest, which was discharged. Former section 9-504 provided "that disposition by the secured party after default transfers to a purchaser for value all the rights of the debtor in the collateral. In addition, the disposition of the collateral discharges the security interest under which the collateral is sold[.]" 9 William D. Hawkland, Hawkland Uniform Commercial Code Series § 9-504:11; see also 4 White & Summers, Uniform Commercial Code § 34-10 (4th ed 1995).
[4]  It could not have found facts. It was a ruling on summary judgment. See SDCL 15-6-56(c).
[5]  If considered out of context, we acknowledge Pucketts' and Sweeney's arguments that some of the trial court's findings and conclusions could be construed to be incorrect. However, on whole, they are supported by the record and correct as a matter of law.
[6]  The record reveals that Frerichs did not assert the defense until the parties submitted proposed findings of fact and conclusions of law after trial. At that late time, Grynberg had no opportunity to litigate this issue.
[7]  The assignment that Frerichs received involved 200 acres in the North Hollingsworth field. However, the trial court found that the assignment that Frerichs allegedly mailed to Grynberg only described 30 acres in the North Hollingsworth field, and it also contained legal descriptions for 30 acres that are not in the North Hollingsworth field. Frerichs does not specifically challenge that finding.
