
226 Cal.App.2d 110 (1964)
SUNLIGHT ELECTRIC SUPPLY COMPANY, Plaintiff and Respondent,
v.
PACIFIC HOMES CORPORATION et al., Defendants and Appellants.
Civ. No. 7435. 
California Court of Appeals. Fourth Dist.  
April 1, 1964.
 Dillavou & Cox and C. C. Dillavou for Defendants and Appellants.
 Gray, Cary, Ames & Frye, J. Clifford Wallace, F. P. Crowell and Gerald R. Schmelzer for Plaintiff and Respondent.
 FINLEY, J. pro tem.  [fn. *]
 This is a consolidated appeal by defendants in two mechanic's lien foreclosure actions brought by plaintiff-respondent Sunlight Electric Supply Company on account of materials furnished by respondent to J.C.S. Electric Company, an electrical contractor doing business as Federal Electric, which contractor did electrical work on the Pacific Homes and Grossmont projects and afterward became bankrupt.
 Issues
 The appeal is concerned generally with only two of the several issues before the trial court. The first discussed by appellant concerns a question of the proper application by respondent of payments made by Federal on its account with respondent. The second issue has to do with the legal effect of an unrevoked written assignment of this account made by respondent to Bank of America prior to the bringing of these actions to foreclose the liens which are based upon that assigned account. *113
 Facts
 Respondent supplied electrical products to Federal Electric which used these materials on appellants' and many other construction projects. Federal Electric took bankruptcy in December 1961 and respondent promptly asserted liens against appellants' properties. St. Paul Marine and Fire Insurance Company was a defendant in both actions brought to foreclose those liens, having executed a release bond under the provisions of Code of Civil Procedure, section 1193.2.
 The materials were sold to Federal on an open running account. Under respondent's machine bookkeeping system, all charges for the sale of materials to Federal on all jobs would be posted to one set of ledger cards, without reference to any particular job. Credits and adjustments were reflected on this same set of cards and carbon or duplicate copies were sent to Federal. Apparently no instructions were given by Federal concerning application of its payments.
 Federal's account with respondent was current on March 1, 1961. Thereafter it fell in arrears. From June 1961 until it filed bankruptcy in December 1961, Federal paid respondent $376,000. These payments were made "on account" and no directions concerning application accompanied them or were given by Federal. They were entered as general credits on the ledger cards and on the statements or duplicates of the machine cards sent to Federal by respondent. [1] In May or June of 1961, which is about the time Federal began to get behind, Mr. Don McClure, a vice president of Federal, had a conversation with Mr. Engel, President of respondent Sunlight. Concerning this conversation Mr. McClure testified as follows:
 "A. Well, it was in regards to payment of the account."
 "Q. From Federal to Sunlight?"
 "A. Yes. And in regards to, we were trying to get extended credit at this point. We were not too liquid and we were expanding rapidly and Mr. Engel approached me on several occasions as to what security, if anything would happen to J.C.S. Electric, what security would he have in regards to being able to lien or being able to take some type of recourse to get his money. I assured him on two or three occasions that the money that we were paying him that he could use it in any way he deemed proper to his best advantage; that we were not specifically paying any one invoice; we would pay on account until such a time we could become *114 current again and clean up and we would have to go back and take invoices and take any problems that we had and straighten it up at that point; but otherwise to apply these funds on account. This is the reason why no remittance advice was made."
 "Q. All right. Mr. McClure, did you have any conversation with Mr. Engel pertaining specifically to any of the jobs such as Wesley or Grossmont?"
 "A. Well, Mr. Engel at this point, of course, as other suppliers were doing, was looking to find an area that we were going to get funds in to pay him, of which we took the large accounts. I explained to him that we did expect to receive money from these accounts and we would pay from our receivables, not necessarily from those jobs, but our accounts receivable, whatever job it might be. It might have been a ten dollar account or five hundred thousand dollar account." (Italics added.)
 Some time after December 2, 1961, the date when respondent last sold materials to Federal, respondent's office manager on so-called worksheets "applied" the $376,000 paid by Federal after March 1, 1961, as follows: first, to open stock in over-the-counter purchases, second, to purchases for which the lien period had expired, and lastly, to "hard to identify" purchases for specific jobs. Respondent notes that this application was completed December 4, 1961, the day before Federal closed its doors. The application was made only on these worksheets and no formal entry reflecting the application was otherwise made on respondent's machine cards, books or records. No notice of the application was given to Federal. Respondent thereafter consistently abided by this application. It released lien claims previously filed on jobs on which the payments had been applied and refused additional payments on these jobs.
 The judgment against the Pacific Homes property (Wesley Palms) was in the amount of $48,669.25, and that against Grossmont, in the amount of $39,010.01. Appellants contend that had the $376,000 paid by Federal to respondent been applied to charges in the order in which they were made rather than according to respondent's claim, then Pacific Homes' judgment would have been reduced by $18,090.82 and the Grossmont judgment by $16,133.97.
 Issue No. 1: Application of Payments.
 Appellants contend that there is no substantial evidence in the record to support a finding that respondent made an *115 actual application of funds in December 1961 as claimed, or that such application, if made, was a "proper" one under the provisions of section 1479 of the Civil Code and binding on Federal or appellants. Appellants urge that posting on the ledger cards constituted an application and that the status of Federal's account was actually reflected on respondent's ledger cards rather than on the worksheets used by respondent's office manager for the alleged application; that even after the demise of Federal, respondent continued to reflect changes in the account on the ledger cards and that no entries were made on these cards or in statements sent to Federal to reflect the application made on the worksheets. It is further urged that respondent did not give seasonable notice of the so-called application to Federal, as the law requires, to render such an application legally effective and binding, and so in any event the prior application made on the ledger cards before preparation of the worksheets by respondent's office manager is binding on respondent.
 Respondent contends that there is substantial evidence in the record to support the trial court's finding that the posting of credits on the ledger cards did not constitute an application of payments; that the claimed application of funds made by respondent in December of 1961 was authorized and is legally binding, and that in making this application it was acting within the provisions of Civil Code, section 1479. This section provides as follows:
 "Where a debtor, under several obligations to another, does an act, by way of performance, in whole or in part, which is equally applicable to two or more of such obligations, such performance must be applied as follows:"
 "One -- If, at the time of performance, the intention or desire of the debtor that such performance should be applied to the extinction of any particular obligation, be manifested to the creditor, it must be so applied."
 "Two -- If no such application be then made, the creditor, within a reasonable time after such performance, may apply it toward the extinction of any obligation, performance of which was due to him from the debtor at the time of such performance; except that if similar obligations were due to him both individually and as a trustee, he must, unless otherwise directed by the debtor, apply the performance to the extinction of all such obligations in equal proportion; and an application once made by the creditor cannot be rescinded without the consent of [the] debtor. *116"
 "Three -- If neither party makes such application within the time prescribed herein, the performance must be applied to the extinction of obligations in the following order; and, if there be more than one obligation of a particular class, to the extinction of all in that class, ratably:"
 "1. Of interest due at the time of the performance."
 "2. Of principal due at that time."
 "3. Of the obligation earliest in date of maturity."
 "4. Of an obligation not secured by a lien or collateral undertaking."
 "5. Of an obligation secured by a lien or collateral undertaking." [Enacted 1872. As amended Code Am. 1873-74, ch. 612, p. 239,  182.]
 If the trial court's findings are supported by any substantial evidence, contradicted or uncontradicted, they must stand on appeal. (Primm v. Primm, 46 Cal.2d 690, 693 [299 P.2d 231]; Estate of Bristol, 23 Cal.2d 221 [143 P.2d 689].) The trial court found as follows:
 "7. As of March 1, 1961, Federal Electric was current in its account with plaintiff SUNLIGHT. Thereafter the account was in arrears and payments received by plaintiff from Federal Electric were merely shown on the ledger cards as credits to the general account."
 "8. Subsequent to March, 1961, an agent of Federal Electric, duly authorized to do so, agreed with the President of plaintiff SUNLIGHT that payments to be made by Federal Electric to plaintiff SUNLIGHT were to be applied in such a manner as plaintiff SUNLIGHT decided and determined was for its best interest."
 "9. In December, 1961, plaintiff SUNLIGHT made an application of all the funds received by it from Federal Electric subsequent to March, 1961. It did so by separating and filing by job all invoices representing materials sold by it to Federal Electric from March, 1961, to date. Plaintiff SUNLIGHT also prepared a summary statement showing monthly purchases by Federal Electric for various jobs and a ledger recap showing the amount of payments applied by it to each job. Said application was made within a reasonable time and was properly made by plaintiff SUNLIGHT. As Federal Electric had terminated its business, nothing further was required of plaintiff SUNLIGHT in order to properly accomplish its application."
 "10. Plaintiff made such application of funds upon and in *117 accordance with the understanding between plaintiff and the debtor, Federal Electric."
 Evidence in the record amply supports these findings and the case of Hollywood Wholesale Electric Co. v. John Baskin, Inc., 121 Cal.App.2d 415 [263 P.2d 665] is authority for the legal conclusions drawn by the trial court therefrom. [2] The Hollywood case is similar in many particulars to the case at bar. At page 422 appears the following language: "Where the plaintiff has proven the creation of a debt within the period of the statute of limitations, the burden is on the defendant to prove payment. (20 Cal.Jur. 952,  30.) The defense of payment is affirmative and is never established by mere proof that the claimant has received money. The proof must go further and establish that the money so received can be applied in discharge of the debt or obligation sued upon. (Bay Lbr. Co. v. Pickering, 120 Cal.App.163, 169 [7 P.2d 371].)"
 The burden was therefore upon appellants here to affirmatively establish the fact of payment in accordance with their theory of the case and by a showing that the evidence and the law will not support the contrary findings by the trial court.
 [3] We find nothing in the authority cited by appellant to support their contention that payments made by the debtor on account without specific instructions as to application and entered on general ledger cards by the creditor as payments on account were thereby irrevocably committed to liquidation of the oldest debt items. The provisions of section 1479 of the Civil Code provide no such inflexible mandate. The obvious purpose of the Legislature was to leave the field of choice wide open to the parties and to require application of the guide lines of the section only where the intent or desire of the parties could not be ascertained even generally. [4] Here, Mr. McClure, the vice president of Federal, testified that Federal was attempting to get extended credit from respondent, that Mr. Engel, president of respondent, approached him on several occasions as to what security respondent would have in regard to being able to lien. He was asked if he had any conversation with Mr. Engel pertaining specifically "to any of the jobs such as Wesley or Grossmont?" Mr. McClure's reply was as follows:
 "Well, Mr. Engel at this point, of course, as other suppliers were doing, was looking to find an area that we were *118 going to get funds in to pay him, of which we took the large accounts. I explained to him that we did expect to receive money from these accounts and we would pay from our receivables, not necessarily from those jobs, but our accounts receivable, whatever job it might be. It might have been a ten dollar account or five hundred thousand dollar account."
 This question was then asked:
 "Now, was there any conversation between you and Mr. Engel pertaining to the security that these bonded jobs would give?"
 After an objection and some argument on the objection came the following questions and answers:
 "Q. Go ahead with what conversation took place."
 "A. Well, I explained to him that these jobs were bonded by J.C.S. Electric or bonded with a company by J.C.S. Electric, not by a general contractor; they were lienable and therefore I prompted him to sell us additional materials."
 "Q. Lienable by whom?"
 "A. Lienable by Sunlight Electric."
 "Q. So Sunlight would be protected?"
 "A. Correct."
 It appears quite obvious then that there was consideration given to Federal by respondent Sunlight for the authority later exercised by respondent in making the application of payments that it did and that the authority exercised by respondent was exercised within the limits of the option given. [5] When this application had been completed by respondent, Federal had ceased to do business and there was therefore no requirement under Civil Code section 1479 that Federal be notified.
 [6] Appellant urges that Mr. Nunley, respondent's office manager, had not been advised and did not know of the conversations between Mr. McClure and Mr. Engel when he prepared the worksheet applications. But any lack of knowledge of the office manager on this point could not diminish respondent's right to act under the option given to it.
 Assignment Issue
 On September 12, 1961, respondent assigned its Federal Electric claim to the Bank of America. The assignment was in writing, executed by Mr. Engel, respondent's president and accepted by Mr. DeJoseph, a representative of the Bank of America. Federal Electric acknowledged receipt of a copy of the assignment. By express terms of the instrument it was *119 "irrevocable" and was to "remain in full force and effect until its release in writing" by the Bank of America.
 [7a] Prior to the commencement of this action there was never a written release of the assignment by the bank. At the trial the following letter was received into evidence over the objection of appellants:
 " 'March 20, 1963"
 " 'Mr. David Engel, President"
 Sunlight Electric Supply Company
 205 West Market Street
 San Diego, California
 Re: Renunciation and Relinquishment
 of Assignment of Accounts
 Receivable of Federal Electric
 Dear Mr. Engel:
 This is to notify you that the Bank of America hereby renounces and relinquishes any right, title or interest in the Assignment of Accounts Receivable made by you to us on September 12, 1961.
 Further, it was our understanding that the accounts were assigned merely as security for your obligation to us, and upon the payment by you of your obligation on October 1, 1961, we understood that the assignment was no longer valid or existing.
 We have always treated the assignment merely as one of security for your obligation, and to this end it has never been recorded and we have never made any attempt to police the collection of the account by you.
 Yours very truly,
 /s/ C. DeJoseph
 C. DeJoseph
 Manager
 CDJ :dg
 cc: Mr. F. P. Crowell.' ""
 Appellants contend that this letter was irrelevant, immaterial, sets forth opinions and conclusions of the signator, that it is an extrajudicial statement offered to prove the truth of the matter stated therein and therefore was and is hearsay.
 In connection with the assignment and letter the trial court made the following findings: *120
 "11. On September 12, 1961, plaintiff SUNLIGHT executed an assignment to the Bank of America of monies to become due from Federal Electric."
 "12. The assignment was given purely as security for money owed by plaintiff to the bank, and the Bank of America asserted no interest under the assignment, particularly after the debt to the bank from plaintiff SUNLIGHT was paid on October 1, 1961."
 "13. The Bank of America subsequently disclaimed any right under the assignment, and the assignment constitutes no obstacle to the enforcement of plaintiff's claim."
 Code of Civil Procedure, section 367 provides: "Every action must be prosecuted in the name of the real party in interest, except as provided in section three hundred and sixty-nine of this code."
 From the evidence it appears without question that regardless of the existence of this unrevoked assignment at the commencement of the action respondent was the real party in interest. A loan made by the Bank of America to respondent when the assignment was given was paid in full within a month after the assignment was given. There was no showing that any further borrowings were made from the bank by respondent or that there was any other obligation to be secured by the assignment. The trial court treated the assignment as one for security only and the offered letter as a disclaimer by the bank. We are not persuaded that this finding is erroneous, not supported by the evidence, or that it is not legally justified by the circumstances. [8] So long as appellants were placed in a position where they could not again be made liable on these claims they had no legal basis for demanding abatement of the actions on the ground of no written termination of assignment prior to suit where both signators to the assignment went on record in this action in denominating the assignment a security transaction rather than an assignment absolute and where the letter from the bank, which constitutes a sufficient disclaimer, became a part of the record.
 In First National Bank v. Pomona Tile Mfg. Co., 82 Cal.App.2d 592, 602 [186 P.2d 693], the court in discussing an assignment absolute in form makes the following statements all supported by authority as will be indicated: "The relationship between an assignor and assignee for security is as follows. So long as the obligation secured remains unsatisfied, *121 the assignee holds an entire but defeasible present interest in the subject matter of the assignment. [Citing cases.] There remains, however, in the assignor a future interest in the subject matter, namely, his power of defeasance of the assignee's interest by discharge of the secured obligation. [Citing cases.] Stated otherwise, the assignor's interest in the subject matter of the assignment is what remains after the secured obligation has been satisfied [citing case], and the assignee's interest is limited to the amount of the secured obligation. [Citing case.] It follows, therefore, that once the secured obligation has been discharged, the assignee for security holds the excess as agent or trustee for the assignor. [Citing cases.] ... The reassignment of the claim from the bank to Pomona was superfluous and ineffective because the bank's interest had already revested in Pomona upon payment of the secured advances."
 Appellants state in their closing brief: "Respondent and appellants both agree that if the assignment was in fact for security purposes only, then the assignor can maintain the action in its own name without showing a relinquishment of the assignment. However, if, as appellants contend, the assignment was absolute, then it is necessary for the assignor to show a relinquishment of the assignment in its favor prior to instituting suit." Citing Mitchell v. Shoreridge Oil Co. (1938) 34 Cal.App.2d 382. (Erroneous citation by appellant. Should be 24 Cal.App.2d 382 [75 P.2d 110, 77 P.2d 221].)
 The principal distinction between the Mitchell case and the case at bar is that in the Mitchell case the assignment had been made for the purpose of collection and the assignee had brought action on the assignment and had prosecuted the matter to a favorable judgment prior to the bringing of the action by the assignor on the same obligation. The court in that case said at pages 384-385: "It is apparent that the demands asserted in the prior action became merged in the judgment rendered therein and the entry of such judgment operated as a waiver of the rights of appellants to seek the remedy of foreclosure on the principle of estoppel. (California Nat. Supply Co. v. Porter, 83 Cal.App. 758, 763 [257 P. 161].)"
 In Graham v. Light, 4 Cal.App. 400 [88 P. 373] action was brought by plaintiff on a note which had earlier been assigned by plaintiff for collateral security to a bank. The note was not reassigned by the bank to plaintiff until the day *122 of trial. Defendant urged that plaintiff had no cause of action when the suit was brought. The court said at pages 402-403: "Under our system of practice, therefore, the real objection of the defendants to the judgment is, 'not a want of facts, but a want of parties' (id); and had the note still been held by the bank under its assignment at the time of the trial, it would have been the duty of the court, under the provisions of section 389 of the Code of Civil Procedure, to have ordered the bank to be brought in. But in this case, as it appeared that the bank had reassigned the note to the plaintiff, this was unnecessary."
 In the case at bar the trial court found that the letter set forth above and admitted into evidence as plaintiff's Exhibit 20, was in the nature of a disclaimer by the bank. The result was the same insofar as Federal or appellants are concerned. Appellants were thoroughly protected from a successful attempt by the bank to collect on the assignment which is as far as they are legally entitled to press their objection to the situation created by the assignment.
 In Space Properties, Inc. v. Tool Research Co., 203 Cal.App.2d 819, 828 [22 Cal.Rptr. 166], the court said: "Code of Civil Procedure, section 367, sets forth the requirement that every action must be prosecuted in the name of the real party in interest. This rule is designed to protect a defendant from a multiplicity of suits and from further annoyance and vexation, and to fix and determine the real liability which is alleged in the complaint. (Kadota Fig. Assn. v. Case-Swayne Co. (1946) 73 Cal.App.2d 796, 801 [167 P.2d 518].)"
 [7b] The findings made by the trial court are supported by the evidence, and the conclusions drawn find sanction in the law. The letter, plaintiff's Exhibit 20, was properly admitted into evidence.
 The judgments are affirmed.
 Griffin, P. J., and Coughlin, J., concurred.
NOTES
[fn. *]  *. Retired judge of the superior court sitting pro tempore under assignment by the Chairman of the Judicial Council.
