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. 1 The account was designated “Well Account-Energetics.” 2 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 *1302 time of the offset, the amount in Republic's deposit account was $604,597.97. 3
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. 4 The district court also held that the trustee in bankruptcy of Republic 5 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,
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,
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. 6 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.
*1304 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,
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. 9 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. 10
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 *1305 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,
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.
Notes
. 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. ...”
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,
. 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,
. 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.
