
    ENERGETICS, INC., Plaintiff-Appellee, v. ALLIED BANK OF TEXAS, Defendant-Third Party Plaintiff-Appellant, v. CREDIT SUISSE, Third Party Defendant-Appellant.
    No. 85-2098.
    United States Court of Appeals, Fifth Circuit.
    March 21, 1986.
    Rehearing Denied April 17, 1986.
    
      Louis H. Salinas, Jr., Kevin R. Risley, Houston, Tex., for Allied Bank of Texas.
    Pamela A. Prestridge, Houston, Tex., for Credit Suisse.
    B. Lawrence Theis, Walter & Theis, Denver, Colo., for Energetics, Inc.
    Before CLARK, Chief Judge, POLITZ and WILLIAMS, Circuit Judges.
   JERRE S. WILLIAMS, Circuit Judge:

In this diversity suit, a lender bank appeals a judgment declaring that from a depositor’s account it wrongfully offset money which belonged to a third party. We find that the bank wrongfully offset the funds, but the district court’s judgment did not state the correct amount. We reverse the district court judgment of $604,-597.97 and remand for entry of judgment in the sum of $428,362.70.

Appellant Allied Bank of Texas made approximately $20,000,000 in loans to an oil and gas contractor, Republic Drilling & Service, Inc. Republic also maintained a regular deposit account at the bank. Funds in this account were deposited as “prepayment” drilling expenses by appellee Energetics, Inc., the operator in an oil and gas venture with Republic. The account was designated “Well Account-Energetics.” Republic defaulted on the bank loans. The bank then took control of the funds in Republic’s deposit account as an offset against the defaulted loans. At the time of the offset, the amount in Republic's deposit account was $604,597.97.

Energetics filed this suit claiming that the bank had wrongfully offset the account because the money not yet expended for drilling costs by Republic still belonged to Energetics. The district court agreed, and ordered the bank to return the $604,597.97 to Energetics. The district court ruling in favor of Energetics was based upon the “equitable exception” to the bank’s right of offset. The district court also held that the trustee in bankruptcy of Republic was entitled to $176,797.94 of the $604,597.97 provided that he file a claim for the funds. This ruling in favor of the trustee was made because there was testimony that Energetics owed an outstanding $176,-797.94 debt to Republic.

On appeal to this Court, the bank argues: (1) the equitable exception to offset should not have been applied to the facts of this case; and (2) if the exception is applied, the recovery by Energetics was excessive and the judgment is invalid because it awards $176,797.94 to the trustee in bankruptcy of Republic, who is not a party before the court. We find that the equitable exception to offset does apply but that Energetics’ recovery should be limited to $428,-362.70. We remand for the entry of judgment in accordance with this conclusion.

I. EQUITABLE EXCEPTION TO OFFSET

The law of Texas has long recognized that a bank has the right to offset funds in a depositor’s account against indebtedness owed by the depositor to the bank. Elizarraras v. Bank of El Paso, 631 F.2d 366, 371 (5th Cir.1980). Energetics brought this action claiming the “equitable exception” to the bank’s right of offset. This equitable exception is also well established in Texas law. As adopted or recognized by the Texas Supreme Court in National Indemnity Co. v. Spring Bank State Branch, 162 Tex. 521, 348 S.W.2d 528 (Tex.1961), it provides that a bank cannot apply funds on deposit to the individual debt of the depositor when the funds belong to a third party and are held in trust for that third party by the depositor, “if there has been no change in the bank’s position to its detriment.” Id. 348 S.W.2d at 529. The equitable exception is not limited to funds held pursuant to an express trust but applies to any funds “held in a fiduciary capacity." South Central Livestock v. Security State Bank, 551 F.2d 1346, 1350 (5th Cir.1977), modified on other grounds and aff'd, 614 F.2d 1056 (1980).

Allied Bank argues that the equitable exception was erroneously applied to the facts of the present case because: (1) the bank had no knowledge that the funds belonged to Energetics; (2) Energetics did not own the funds; and (3) Energetics failed properly to trace the funds. We reject each of these contentions.

First, Allied Bank argues that the equitable exception to the bank’s right of offset should not be applied because the bank had no knowledge that the funds were held in a fiduciary capacity at the time that it took the offset. The bank argues that the National Indemnity rule did not survive the adoption of the Uniform Commercial Code in Texas.

The adoption of the Uniform Commercial Code in Texas, however, did not abolish the National Indemnity rule. South Central Livestock, 551 F.2d at 1350. The common law on commercial transactions is still the law of Texas except in those instances where it has been “displaced by the particular provisions” of the Code. Tex.Bus. & Comm.Code § 1.103 (Vernon 1968); see also First National Bank v. Lone Star Life Ins., 524 S.W.2d 525 (Tex.Civ.App. — Dallas 1975), ref. n.r.e., 529 S.W.2d 67 (1975). It is clear that Texas law does not consider the equitable exception as it applies to funds held in a deposit account to have been displaced by the Commercial Code. Continental National Bank v. Great American Management, 606 S.W.2d 346 (Tex.Civ.App. — Fort Worth 1980, writ ref’d n.r.e.); Pan American National Bank v. Holiday Wines, 580 S.W.2d 7 (Tex.Civ.App. — Houston 1979, writ ref’d n.r.e.); South Central Livestock, 551 F.2d at 1350. We conclude that the National Indemnity rule is still the applicable law in cases such as the one before us.

In the present case, the district judge found that Allied Bank was given notice four days after it took the offset that the funds belonged to Energetics. The bank did not return the funds. Under the equitable exception doctrine the funds should have been returned to Energetics unless the bank could show that it had changed its position to its detriment. As stated in Continental National Bank v. Great American Management:

[Furthermore even where innocently seized, the funds must be yielded up to the equitable owner when the entrustment fact is established unless he who is in possession can and does show that he has changed his position to his injury so that it would be inequitable to require him to yield up the funds.

606 S.W.2d at 348 (emphasis in original). Allied Bank did not even attempt to make a showing of detrimental reliance. Thus, Allied Bank’s contention that its lack of knowledge precluded the applicability of the equitable exception is without merit.

Second, the bank argues that Energetics did not establish that it was the owner of the funds in question. The district court found that the prepayment funds were held by Republic as a fiduciary for Energetics. Our review of factual findings of the district court is limited to review under the “clearly erroneous” standard. F.R.Civ.P. 52(a).

Appellant argues that Energetics did not own the funds because it took a tax deduction for them in 1981. Appellant cites tax regulations and tax court decisions stating that this deduction can only be taken once the funds have been parted with “irretrievably.” The tax characterization of the funds, however, is not the question for our review. We agree with the district court that the “tax treatment is irrelevant because ... it has [nothing] to do with the ownership for the purposes of offset for [this] case.” See Commissioner of Internal Revenue v. Tower, 327 U.S. 280, 287, 66 S.Ct. 532, 536, 90 L.Ed. 670 (1946) (Tax court deciding a tax question “is not governed by how Michigan law might treat the same circumstances for purposes of state law.”); see also Bagur v. Commissioner of Internal Revenue, 603 F.2d 491 (5th Cir.1979) (Tax law characterization is separate from state law characterization of same issue); Estate of Johnston v. United States, 586 P.Supp. 500 (D.C.Tex.1984). The only question before us is whether the funds were controlled by and belonged to Energetics under Texas law.

There was evidence that Energetics had complete control over the account and the money was not to be used by Republic except upon approval by Energetics. There was testimony that Energetics could order withdrawal of funds from the account at any time including all of the funds in the account. There was also testimony that Energetics directed how the funds were to be used, that Republic had no voice in how they were used, and that Republic could not keep the funds for itself. The name on the account was “Well Account-Energetics.” Thus, there was ample evidence to support the district court’s finding that the funds belonged to Energetics. Whether the tax deduction was properly taken by Energetics is not at issue before us.

Third, Allied urges that Energetics did not properly trace the funds that were in the Republic account. The district judge found that “plaintiff has clearly traced these funds,” and that the “ideas of tracing” of .the accountant hired by defendants “leave a great deal to be desired.” We do not find this conclusion to be “clearly erroneous.” Mr. Webber, Energetics’ accountant, traced the funds through the cashing of a Certificate of Deposit. In fact, the bank’s own accountant admitted that, practically speaking, the funds had been traced. We find that the district court did not err, therefore, in applying to the facts of this case the equitable exception prohibiting offset.

II. DAMAGES

Appellant contends that any recovery should be limited to $396,672.75, or, alternatively, to $428,362.70. Energetics and Republic entered into a written agreement regarding the prepayment fund three months after the bank undertook the offset. In that agreement, Energetics setoff the prepaid drilling payments which it had made to Republic against the costs and expenses which Republic had incurred. Energetics also agreed that Republic should setoff approximately $200,000 of unrelated debts against the account. The bottom line was that all debts owed Energetics by Republic were covered by a balance that Republic owed Energetics the amount of $396,672.75.

According to the testimony of Energetics’ accountant, the final amount in the setoff agreement omitted certain invoices which erroneously were thought to have been paid at the time of the agreement. The proper amount of receivables owed to Republic should have been $176,797.94 instead of the $200,000 mentioned above. Subtracting the $176,797.94 receivables owed to Republic from the balance of the prepayment fund ($604,597.97) yields a total of $427,800.03. There was an additional unpaid third party invoice on the R.V. Moore # 1 well of $562.67. Adding the latter two figures together yields the total of $428,362.70. This is the amount which Energetics admits is the total balance due to it from Republic. The bank argues that because Energetics was owed $428,362.70 by Republic according to this setoff agreement, it should not be awarded the full $604,597.97 in the prepayment fund.

We agree with the bank’s contention. By virtue of the setoff agreement (as corrected), Energetics agreed that Republic owed it only a total of $428,362.70. Thus, that is the full interest that Energetics could possibly have in the prepayment account. Energetics is entitled only to its valid legal claim in the monies in the prepayment fund, which — by its own admission — is $428,362.70.

The trustee in bankruptcy of Republic is not a party to this case. It is obvious that the district judge was attempting to achieve a just result by awarding the entire prepayment fund proceeds to Energetics and then requiring that $176,797.94 of that judgment be paid by Energetics to the Republic trustee if the trustee made a claim for it against Energetics. The district court’s judgment is invalid, however, because it awards a judgment which is partially for the benefit of a party not before the court. The judge has no power to award relief to the trustee in bankruptcy of Republic against a debt owed by the bank when the trustee is not before the court. Hardware Mutual Casualty Co. v. Schantz, 186 F.2d 868, 872 (5th Cir.1951); see also Harrington v. Schuble, 608 S.W.2d 253, 257 (Tex.Civ.App. — Houston 1980, no writ). The $176,797.94 does not belong to Energetics, and therefore Energetics cannot be given judgment which includes this amount. Our case is between Allied and Energetics. We have no authority to deal with a claim a third party may have against the bank. We can only dispose of and we do dispose of the claims which exist between the parties before us.

In view of the above conclusions, the judgment is reversed, and the case remanded for entry of a judgment for Energetics in the sum of $428,362.70.

REVERSED AND REMANDED. 
      
      . A "prepayment” is an advance payment to a drilling contractor at year’s end to be held by the contractor to pay drilling costs as they are incurred in the next year. On December 31, 1981, Energetics forwarded checks totaling $7,439,100 to Republic for "prepayment". Republic deposited these funds in the Allied Bank account designated "Well Account-Energetics.” This Well Account had been continuously maintained by Republic since 1979 for the purpose of holding Energetics’ prepayment funds. Immediately upon deposit of Energetics' checks into the account, Republic purchased with those funds Certificates of Deposit at Allied Bank totaling $7,000,000. Thereafter, throughout the course of Republic’s relationship with Energetics, Republic would draw money from the certificates purchased from funds in the Well Account for the purpose of drilling the Energetics’ wells. Interest was deposited into Republic’s operating account at the bank as an administrative fee which had been negotiated between Republic and Energetics. The principal was re-deposited into the Well Account.
     
      
      . The funds were later transferred to a new account designated “Cotton Petroleum." The funds were also shuffled in and out of Certificates of Deposit. The problem of tracing the funds is discussed in Section I infra.
      
     
      
      . Appellant Credit Suisse is another creditor of Republic. It is in exactly the same position as Allied Bank, and is liable for 43.9% of the judgment. For purposes of this appeal, Credit Suisse adopts the arguments of Allied Bank.
     
      
      . The equitable exception states that a bank cannot offset funds held in a fiduciary capacity for another by a depositor to satisfy the indebtedness of the depositor, unless the bank has changed its position to its detriment in reliance on the representation that the funds belonged to the depositor. See Section I, infra (discussion of the law of the equitable exception to the right ofoffset).
     
      
      . Republic has filed for Chapter 11 bankruptcy.
     
      
      . The bank makes much of the fact that the district court found that the bank acted "in good faith” in making the offset. Good faith, however, has no bearing on the district court’s holding because the bank continued to withhold the funds once it was advised of the relationship between Republic and Energetics. The trial judge held:
      In short, I don’t think the bank acted with malice when it created this set off. I think it acted in good faith. But as soon as it was given information that the money was being held by Republic for special conditions between Republic and Energetics, Inc., the bank’s continued holding of the money and its refusal to return that part of it, which could ultimately be determined to belong to Energetics, the bank was creating a wrongful offset.
     
      
      . Allied urges that the adoption of the Uniform Commercial Code limited the equitable exception to situations where the bank had knowledge at the time of offset that the funds belonged to a third party. Allied cites language from Pan American National Bank for this proposition: "There are no cases which expressly limit the rule of National Indemnity to situations where the bank had knowledge, but this can be implied from the passage of the U.C.C. ...” 580 S.W.2d at 10.
      We are not persuaded that this language from Pan American delineated any distinction between pre-Code and post-Code law applicable in the context of the instant case. Under the preCode law as stated in National Indemnity, if a bank took an offset without knowledge and without demonstrating detrimental reliance, then the equitable exception applied. As soon as the bank was notified that the funds belonged to the third party, the bank had to return the funds. The same is true under post-Code Texas law. The cases hold that if a bank fails to demonstrate detrimental reliance once it is notified that offset funds are fiduciary funds held for a third party, then the bank must return the funds. Continental National Bank, 606 S.W.2d at 348. Thus, for purposes of the present case we can find no distinction between the pre-Code application of National Indemnity and its postCode application.
     
      
      . We reject Allied's contention that the equitable exception does not apply to funds which are held with the consent of the owner and which are not held in trust. Allied bases this argument upon its analysis of the case law, in which it found that "in all of the Texas cases which have applied the equitable exception, the court has either found that a trust relationship existed, or that the account debtor had wrongfully placed the funds on account at the bank.” We have found no Texas case which makes the distinction that the bank urges. It is clear that the key to the équitable exception is "the bank’s knowledge that the debtor has deposited in his account funds belonging to another and ... held in a fiduciary capacity,” not whether the funds are trust funds or whether they were deposited with consent of the beneficial owner of the funds. South Central Livestock, 551 F.2d at 1350.
     
      
      . For example, Eddie Freund, Energetics' Vice-President for operations, stated that he and L.H. Robertson, President of Republic, "always understood between the two of us that the money was ours [Energetics’]’’, and that the money was not to be used by Republic except upon approval of invoices. Mr. Robertson confirmed that, "The understanding I had is that [Energetics] had prepaid for future drilling and that those funds belong to Energetics until we had finished the drilling.
     
      
      . In any event, Energetics reported the prepayment funds as taxable income in the next year, 1982. Also, Republic did not include the prepayments on its financial statement or cash flow statement until the amounts were actually earned.
     