
173 Cal.App.2d 420 (1959)
343 P.2d 408
ADVANCE INDUSTRIAL FINANCE COMPANY (a Limited Partnership), Respondent,
v.
WESTERN EQUITIES, INC. (a Corporation) et al., Appellants.
Docket No. 23386.
Court of Appeals of California, Second District, Division Three.
August 28, 1959.
*423 Leonard Cohen and Charles W.P. Kamanski for Appellants.
Leland & Plattner, Norman E. Stevens and N. Stanley Leland for Respondent.
VALLE, J.
Appeal by defendants from a judgment for plaintiff in an action for damages for the breach of a written contract of guaranty.
On December 30, 1954, plaintiff and defendant Western Equities entered into a contract in writing whereby plaintiff agreed to buy and Western Equities agreed to sell to plaintiff accounts receivable. On various occasions thereafter Western Equities sold, assigned, and transferred to plaintiff accounts receivable which had been assigned to and purchased by it from Jo-Max of California. Under the contract plaintiff was to purchase the accounts for 82 1/2 per cent of their net amount, the net amount to be calculated on the most favorable terms given to the debtors or the lowest figure for which the debtors could pay the account in full. An additional 15 per cent of the net amount of each account purchased, less any charges or debts due from Western Equities to plaintiff, was to be paid or credited to Western Equities after receipt by plaintiff of the payment of the account, or on certain other conditions. This 15 per cent was known as a reserve and is referred to as the Western reserve. The additional 2 1/2 per cent of the net amount was to be retained as plaintiff's profit for the transaction. The contract provided that all moneys accrued, due, owing, or which were to be paid, and which were paid, by the debtors under the accounts receivable, became the property of plaintiff.
By the contract Western Equities guaranteed the payment of accounts receivable purchased pursuant thereto to the extent of the amount paid to it by plaintiff. It was provided that the guaranty should terminate whenever the persons liable on the assigned accounts acknowledged notice of the assignment and their liability thereunder. The contract further provided that each and every account receivable sold by Western Equities to plaintiff represented a bona fide sale and that there were no offsets or counterclaims against the amount of each account shown to be due.
On December 30, 1954, defendant Moser, by an instrument in writing, guaranteed full and faithful performance by *424 Western Equities of all the terms, covenants, and conditions of its agreement of December 30, 1954, with plaintiff.
The court found: 1. Accounts receivable totaling $9,291.79 which were assigned to plaintiff by Western Equities pursuant to the contract were paid by the debtors to Jo-Max. 2. There were no sums or accounts due from the debtors on the accounts so assigned constituting the $9,291.79. 3. Plaintiff paid Western Equities $7,665.72 for said accounts. 4. Notice of the assignment was given to the debtors within a reasonable time after delivery to it of the accounts. 5. None of the debtors acknowledged notice or its liability on the accounts. 6. By reason of the fact that the accounts receivable were uncollectible, Western Equities became indebted to plaintiff in the sum of $7,665.72 less a credit from the reserve of $1,742.46 which plaintiff held. 7. Plaintiff is entitled to recover from Western Equities the net sum of $5,923.26 with interest from October 1, 1956, the date that amount was due.
The court also found: 1. Defendant Moser has paid no sums whatever to plaintiff pursuant to his guaranty or any debt, liability, or obligation arising thereunder. 2. Defendant Moser is obligated to plaintiff in the same amounts as Western Equities is indebted.
Judgment was for plaintiff against Western Equities and Moser for $5,923.26 with interest from October 1, 1956, and, pursuant to the contract, for attorney's fees. Defendants appeal.
On January 13, 1955, plaintiff and Jo-Max entered into an entirely separate contract similar to the one between plaintiff and Western Equities. Under that contract plaintiff purchased accounts receivable directly from Jo-Max; a reserve of 20 per cent was retained by plaintiff, called the Jo-Max reserve; and the factoring fee was 2 1/2 per cent.
[1] Defendant's first contention is that plaintiff was partially paid for Western Equities' debt to it in an amount equal to the Jo-Max reserve. In other words, they seek to offset their liability to plaintiff by the Jo-Max reserve. It was stipulated that plaintiff "is presently holding a reserve in the amount of $3,824.76, for the accounts receivable assigned directly by Jo-Max to Advance [plaintiff]." (Emphasis added.) The court found that defendants are not entitled to an offset of any amount held in reserve by plaintiff under the contract between plaintiff and Jo-Max, to which contract defendants were never parties, and to which reserve defendants have no *425 right, title or interest. The finding is manifestly correct. Defendants were not parties to the contract between plaintiff and Jo-Max. They have no rights under it. They have no right to have funds held under it applied to their debt to plaintiff. The contract between plaintiff and Jo-Max contained this provision:
"... second party [plaintiff] shall have a prior lien on any funds, credits, and/or property in second party's possession and shall hold same until the status of the accounts previously purchased has been determined."
Obviously plaintiff had a lien on funds in its possession under that contract until the status of the accounts purchased under it had been determined. The lien could be asserted only as to accounts purchased under plaintiff's contract with Jo-Max, and not as to accounts purchased from Western Equities. There was nothing in the contract between plaintiff and Jo-Max providing that the Jo-Max reserve could be offset against plaintiff's loss under its contract with defendant; nor was that contract for the benefit of Western Equities.
Defendants rely on testimony to the effect that plaintiff orally agreed with Jo-Max to apply the Jo-Max reserve against the defalcations of the account-debtors. [2] A contract in writing may be altered by a contract in writing or an executed oral agreement, and not otherwise. (Civ. Code, ß 1698.) There was no executed oral agreement. Plaintiff did not at any time apply any of the Jo-Max reserve to its loss under its contract with Western Equities. The purported oral agreement was not with Western Equities. No claim is made that any such oral agreement was made with Western Equities. [3] The contract between plaintiff and Western Equities is fully integrated, unambiguous, and certain, and it may not be varied by parol evidence. (Ohio Electric Car Co. v. Le Sage, 182 Cal. 450, 456 [188 P. 982], a contract of guaranty; Graddon v. Knight, 99 Cal. App.2d 700, 704 [222 P.2d 329]; Sass v. Hank, 108 Cal. App.2d 207, 210-212 [238 P.2d 652].) [4] The rule is one of substantive law; and evidence of an oral agreement incompetent under the rule, even if admitted without objection, may not be considered on review of the judgment and must be ignored. It has no legal force. (Estate of Gaines, 15 Cal.2d 255, 264-265 [100 P.2d 1055]; El Zarape etc. Factory, Inc. v. Plant Food Corp., 90 Cal. App.2d 336, 344 [203 P.2d 13].)
Defendants assert the Jo-Max reserve is deemed to have *426 offset plaintiff's loss by operation of law. As an affirmative defense and counterclaim defendants pleaded "That Defendants are entitled to offset against any amounts found owing Plaintiff such amount as an accounting shall show was actually retained by Plaintiff as payment or restitution of the amounts wrongfully retained by said JANET HELLER, dba JO-MAX OF CALIFORNIA." They argue that plaintiff had a claim against Jo-Max in an amount equal to the sums paid to Jo-Max by its debtors; and at the same time Jo-Max had a claim against plaintiff in the amount of the reserve held by plaintiff in the sum of $3,824.76, arising out of the contract between plaintiff and Jo-Max. They say, "So far as these cross demands equaled each other, they must be deemed to have been compensated and to have been extinguished eo instante their simultaneous existence."
Section 438 of the Code of Civil Procedure provides: "The counterclaim mentioned in section 437 must tend to diminish or defeat the plaintiff's recovery and must exist in favor of a defendant and against a plaintiff between whom a several judgment might be had in the action. ..." (Emphasis added.)
Section 440 provides: "When cross-demands have existed between persons under such circumstances that, if one had brought an action against the other, a counterclaim could have been set up, the two demands shall be deemed compensated so far as they equal each other, and neither can be deprived of the benefit thereof by the assignment or death of the other."
[5] A counterclaim or a setoff is defined as a cause of action in favor of the defendant on which he might have sued the plaintiff in a separate action and, in the case of a counterclaim, might have obtained affirmative relief. (44 Cal.Jur.2d 611, ß 2.) The emphasized part of section 438 strictly limits those who may assert a counterclaim. (Counterclaims and Cross-Complaints in California, by Professor Stanley Howell, 10 So.Cal.L.Rev. 415.) [6] A claim based on an equitable right may be set up as a counterclaim against a claim based on a legal right. (44 Cal.Jur.2d 614, ß 5.) [7] While the doctrine of setoff, as distinguished from statutory counterclaim, is eminently an equitable one, the equitable right is founded on the idea that mutual existing indebtedness, arising out of contracts between parties to the record, creates payment of both demands so far as they equal each other. The *427 two demands must be mutual. [8] The equitable right of setoff requires some peculiar circumstances based upon equitable grounds, such as fraud, insolvency, or the like, to warrant the interference of the court. (Lyon v. Petty, 65 Cal. 322, 324-325 [4 P. 103].) [9] A counterclaim must be a claim in favor of the defendants and against the plaintiff; it may not be in favor of another person. [10] In Eistrat v. Humiston, 160 Cal. App.2d 89 [324 P.2d 957], it is said (p. 91):
"It is a general rule that the right to setoff exists when the parties hold mutual cross-demands under such circumstances that in equity they should be applied one against the other. (Harrison v. Adams, 20 Cal.2d 646 [128 P.2d 9]; 29 Cal.Jur.2d pp. 308-309, ß 326.) [11] However, in order to warrant an offset the debts must be mutual and the principle of mutuality requires that the debts should not only be due to and from the same person, but in the same capacity. (Kaye v. Metz, 186 Cal. 42, 49 [198 P. 1047]; Peterson v. Lyders, 139 Cal. App. 303, 306 [33 P.2d 1030]; H.K. McCann Co. v. Week, 115 Cal. App. 393, 398 [1 P.2d 452].)
"In the instant action it will be noted that Marjorie Humiston was made a party to the appeal taken by plaintiffs herein and it was incumbent upon her to join with her husband in filing a reply brief. The judgment of the lower court was affirmed on appeal. Both were jointly allowed to recover their costs on appeal in the sum indicated. The judgment in which plaintiffs seek the offset is against only one, namely, William I. Humiston. Therefore, it is not a mutual debt due from the same person within the meaning of the above-cited cases. It has been held that a court of equity will not offset the claim of an individual creditor of one joint owner of a judgment against the other. (Collins v. Butler, 14 Cal. 223, 230.) The doctrine of setoff is preeminently an equitable doctrine. (Meherin v. Saunders, 131 Cal. 681 [63 P. 1084, 54 L.R.A. 272].)"
This action is between plaintiff and Western Equities and the guarantor, Moser; it is not against Jo-Max. In order that defendants may offset against plaintiff, they must own a claim against plaintiff which they can offset. They have no such claim. Defendants' claim of offset is based on the right of Jo-Max to the Jo-Max reserve under its contract with plaintiff. [12] Under the rule of mutuality, in an action on a several obligation, the defendant may not set up as a counterclaim a demand in which others besides himself are beneficially *428 interested. The test is whether he could have maintained an independent action on the demand attempted to be set off. (Cuneo v. Lawson, 203 Cal. 190, 195-196 [263 P. 530].)
[13] Defendants may not offset the Jo-Max reserve against plaintiff's loss under any principle of suretyship. Western Equities and Moser were the guarantors; not Jo-Max. The fact that some debtors paid Jo-Max instead of paying plaintiff and that Jo-Max took the money did not relieve defendants of their obligations as guarantors or make Jo-Max a guarantor, nor did it make the Jo-Max reserve available as an offset against plaintiff's loss under its contract with Western Equities. Under their contracts with plaintiff, defendants were not guarantors of Jo-Max. They guaranteed payment by the debtors to plaintiff.
Defendants contend the contract with plaintiff merely purports to be a contract of sale; that it is not a sale, but a loan. They argue the provision that the guaranty shall terminate as to each individual account purchased whenever the person liable under the assigned account acknowledges notice of the assignment of the account and his liability thereunder was in reality nonexistent because "the account debtor never acknowledges his liability." Therefore, they say, in substance the contract was "an absolute guarantee of the return of the moneys paid at the time of the assignment of the accounts receivable." The result, they assert, is that plaintiff is not entitled to the 2 1/2 per cent profit it received, and this amount of $2,068.77 should have been offset against plaintiff's claim, and treble the amount of interest paid in damages.
As an affirmative defense and counterclaim defendants pleaded that the contract was a loan of moneys by plaintiff to Western Equities. The court found that this defense was not true, and "the Court specifically finds that the transaction between plaintiff and defendant, Western Equities Inc., was a purchase and sale of accounts receivable and that plaintiff in no manner loaned moneys to the defendant, Western Equities Inc.; nor did plaintiff collect interest of any kind or in any amount from the defendant, Western Equities Inc." [14] Defendants have not "demonstrated" that there is no substantial evidence to support this finding, as they are required to do to sustain their claim of error. (Nichols v. Mitchell, 32 Cal.2d 598, 600 [197 P.2d 550]; New v. New, 148 Cal. App.2d 372, 383 [306 P.2d 987].) [15] Under the contract plaintiff bought the receivables for its own account. *429 The contract expressly provided that all moneys accrued, due, owing, or which were to be paid, and which were paid, by the debtors under the accounts receivable, became the property of plaintiff. There was a real purchase, not a loan. (Refinance Corp. v. Northern Lbr. Sales, Inc., 163 Cal. App.2d 73, 78-81 [329 P.2d 109].) The giving of a guaranty is simply an item of testimony or evidence which the trial court may consider in determining whether the transaction is in fact a loan, or, what it purports to be, a purchase and sale of a chose in action. (O.A. Graybeal Co. v. Cook, 111 Cal. App. 518, 531 [295 P. 1088].)
Milana v. Credit Discount Co., 27 Cal.2d 335 [163 P.2d 869, 165 A.L.R. 621], did not hold, as defendants claim, that a contract for purchasing receivables is per se a loan or a usurious one. In Milana the court stated (p. 340): "Contractors are free to buy and sell their property, and this may include promissory notes and other instruments, at a price agreed upon, and when the bona fides of the parties is established the percentage of profit has no relation to the usury law."
[16] Lastly, defendants contend that under the terms of the guaranty they are liable only to the extent of the difference between the cash amount paid by plaintiff and the amount plaintiff received from the account-debtors. The argument is that it was stipulated that $82,750.75 of the accounts receivable were assigned by Western Equities to plaintiff; $69,074.66 was paid by plaintiff to Western Equities for the transfers; plaintiff paid an additional $4,200 to Western Equities; thus the total amount paid was $73,274.66; the total amount of unpaid receivables was $10,534.18; thus plaintiff received $72,216.57; deducting $72,216.57 from $73,274.66 leaves $1,058.09, the amount for which defendants should have been held liable. The argument is based on the erroneous premise that the guaranty was of the entire amount of the receivables assigned, not of each individual account. The contract contained the provisions set out in the margin.[1] We *430 think the trial court's construction of the contract is reasonable Äî that is, that defendants' liability is based on the price paid by plaintiff for the specific invoices which were not paid.
Furthermore, in defendants' pretrial statement it was said *431 "That if Defendants are liable on their guarantee as alleged by Plaintiff said guarantee would require them to pay the face value of the accounts not paid plaintiff less seventeen and one-half per cent (17 1/2%) of the said sum of $7,665.73 less any other offsets proved." The sum awarded plaintiff was less than the amount thus conceded.
We find no error in the record.
Affirmed.
Shinn, P.J., and Wood (Parker), J., concurred.
NOTES
[1]  "FIRST: First party [Western Equities] agrees to offer for sale to the second party [plaintiff] all of its Accounts, and the second party agrees to purchase such of said Ac[c]ounts as may be acceptable to it from a credit consideration or which the second party may have approved for purchase in writing, based on definite terms of sale, prior to the date of delive[r]y of the merchandise being sold thereunder.

"Nothing contained in this agreement to the contrary shall oblige the second party to purchase any Account which it does not approve, and the second party shall be the sole judge thereof.
"The second party will discount and purchase said approved Accounts for 82-1/2 % of their net amount, the net amount to be calculated or based on the most favorable terms given to the customers or the lowest figure for which they can pay said Accounts in full. An additional 15 % of said net amount of each account purchased, less any charges or debts due from the first party to the second party, will be paid or credited to the first party on the ____ day of the month after receipt by second party of payment of said Account, or when it has been determined by second party that payment has not been made because of the financial inability of the debtor to pay said account.
"The terms of this agreement shall in no way restrict or prohibit the purchase at a discount rate of 2-1/2 % by the second party from the first party of any rejected Account.
"SECOND: First party warrants, guarantees ands agrees as follows:
"(a) Contemporaneously with the purchase of Accounts which shall be subject to and governed by this contract, first party shall execute proper assignment so as to vest in second party full title to Accounts, and thereupon second party shall become and be entitled to all of the ownership, title, right, securities, or guaranties possessed by first party in respect thereto, and in respect to the property evidenced thereby, including the right to stoppage in transit or replevin in and to any of the merchandise covered by said Account, including, but not in limitation thereof, any and all of said merchandise that may be rejected, returned or reconsigned, and in to any new claim or Account created through the resale or exchange of such merchandise, and the right to collect and receive all moneys due and to become due upon said Account, and/or any such new Account. Second party is hereby authorized and empowered to compromise or settle, on such terms as it sees fit, any dispute arising between first party and first party's debtors; second party is authorized and empowered to dispose of any returned merchandise on such terms and conditions as second party sees fit; if it become neces[s]ary to sue first party's purchasers, first party hereby authorizes second party to use any and all lawful means to collect the account, including the use of first party's name if necessary, ratifying and confirming any and all actions taken by second party in connection with the same;
"(b) First party agrees to furnish second party with original and duplicate invoices and evidence of shipment. All invoices shall bear a printed endorsement that the Account has been assigned and is payable to the second party only, and billing of such invoices, and by whomever done, shall operate as such assignment to second party;
"(c) All outstanding Accounts assigned to second party shall be the property of the second party subject only to the final acceptance by the customer without dispute as to price, terms, quality, as above stated. If, for any reason, first party should receive any moneys, checks or other evidences of indebtedness in payment of or on account of any of the invoices purchased by second party hereunder, first party agrees that first party will receive and hold the same in trust for second party and keep same separate and apart from first party's property. First party will endorse and transmit the same to second party on the day the said remittance is received in the original form;
"(d) All purchases of first party's Accounts by the second party are irrevocable, and all expenses of settlement of disputes shall be borne by first party. First party guarantees the payment of all Accounts receivable purchased hereunder to the extent of the amount paid therefor by the second party. This guaranty however, shall terminate as to each individual Account purchased hereunder, whenever the person liable under said assigned Account acknowledges notice of the assignment of the Account and his liability thereunder. In the event the acknowledgment is only as to a portion of the Account or invoices assigned the second party shall have the right at its option, to charge the whole or any portion of said Account to first party, and second party shall be relieved of any and all credit risk involved in said Account;
"(e) Each and every Account represents a bona fide sale covering the kind, quantity and quality of merchandise stated therein, and that same has been delivered, and that there are no counter-claims or offsets against the amounts showing due on said Account, and that said merchandise has not been sold on consignment nor with any return privilege whatsoever, except defective merchandise, and first party has no information or reason to suspect that any purchaser is other than a good financial risk. First party agrees to notify second party immediately, in the event any debtor of any Account sold to second party by first party refuses payment, rejects, returns or refuses acceptance of any merchandise from first par[t]y, claims any offset or disputes the validity of his account for any reason whatsoever. Second party shall have the right, immediately on discovery of any such disputes, to charge back to the account of the first party the amount or amounts involved therein and any expense including attorney's fees incurred by second party and upon the incidence of any such dispute, the second party shall be relieved of any credit risk involved in said account or accounts;...
"FIFTH: Neither of the parties shall be bound by anything not expressed in writing. This contract shall inure to and be binding upon the parties, heirs, executors, adm[i]nistrators, successors and assigns."
