
74 Cal.App.2d 5 (1946)
U.S. MACHINERY COMPANY (a Corporation), Respondent,
v.
INTERNATIONAL METALS DEVELOPMENT, INC. (a Corporation), Appellant.
Civ. No. 7202. 
California Court of Appeals. Third Dist.  
Apr. 15, 1946.
 Bronson, Bronson & McKinnon for Appellant. Charles L. Gilmore for Respondent. *7
 ADAMS, P.J.
 On May 10, 1943, the parties to this action entered into a written agreement, in the form of a lease, by the terms of which plaintiff leased to defendant a 100 horse-power Diesel engine and a 100 KVA generator and exciter, together with a switchboard panel. The rental agreed to be paid by lessee was $3,500 plus sales tax of $105, of which $1,855 was payable at once, and the balance of $1,750 in two monthly installments of $875 each, plus interest. The agreement also provided that upon payment of the installments and compliance with the other conditions of the agreement the lessor, at lessee's election, would execute and deliver to the lessee a bill of sale of the property and sell same to lessee for $1.00. The execution of this agreement had been preceded by oral negotiations between the parties, in the course of which defendant had paid $1,855 on April 18th, and had taken possession of the equipment, unassembled, on May 5th. On execution of the agreement it also executed and delivered to plaintiff two promissory notes for $875 each, one payable June 10, and the other July 10, 1943.
 After defendant had taken possession of the equipment it was found that more than thirty parts of same were missing, and it was not put into operating condition until sometime in August, 1943, by which time defendant had expended the sum of $1,480.64 thereon. These expenditures were the subject of correspondence between the parties, which correspondence culminated in a demand from plaintiff, by a letter dated October 9th, that "Unless payment in full on your contract is received by October 20, it will be necessary to send our trucks for the equipment." Nothing was stated as to the amount due, which had not been agreed upon, and our attention is directed to no other demand. On October 14th defendant replied to this letter, listing the expenses it had incurred and showing the balance it deemed to be due, after deducting such expenses as it had incurred, to be $303.48, which it stated would be paid within a few days. On November 26th defendant wrote plaintiff, enclosing a check for $303.48, stating that same, together with costs of repairing the machinery, completed payment of the balance due. Plaintiff returned this check to defendant on December 2d, and this action followed.
 The complaint alleged the execution of the "lease", annexing a copy of same as an exhibit. The reasonable value of the property was alleged to be $3,605, and the reasonable rental value of same $1,167 per month. Plaintiff prayed for a judgment *8 for the recovery of the machinery, or for the sum of $3,605, the value thereof, $1,167 per month from August 10, 1943, for rental, for attorney's fees in such sum as the court might fix, and for such further relief as the court might deem proper.
 Answering this complaint defendant set up its payment of $1,855, its necessary expenditure of $1,480.63 to render the equipment usable, and its tender of $303.48 as the balance due plaintiff upon the notes. Also by way of counterclaim it set up the items which it had paid to condition the property. It prayed for a judgment in its favor for $1,480.64, in plaintiff's favor for $303.48, and for general relief.
 After trial by the court without a jury, findings were made. It was found that the contract was not one of lease but a conditional sales contract, that defendant had paid $1,855 thereon and executed the two promissory notes of $875 each, and that the total purchase price of the machinery was $3,506, plus $1.00; that the promissory notes had not been paid nor any interest thereon, nor had the sum of $1.00 been paid; that there was an implied warranty of the equipment sold by plaintiff that same was in a good and serviceable condition; that same was not in such condition when sold and that defendant necessarily spent $1,446.52 to put same in working condition; that defendant had tendered plaintiff the sum of $303.48 in full settlement of its claims, but that such tender was insufficient to cover the amount due; that the contract provided that defendant should pay all expenses, including attorney's fees, that might be incurred by plaintiff to enforce the contract or repossess the machinery, and that $350 was a reasonable attorney's fee. The value of the machinery was found to have been at all times $3,605, and it was found that plaintiff had been damaged in the sum of $1,500 by reason of the detention and use of same by defendant. Judgment was entered providing that plaintiff recover possession of the machinery, together with $1,500 and attorney's fees of $350; that in case delivery could not be had plaintiff should recover $3,605, the value thereof, together with the said damages and attorney's fees. Defendant was awarded the sum of $1,446.52 on its counterclaim, but was given no credit for the $1,855 paid on account of the purchase price, and there was no requirement for surrender of the notes.
 The effect of this judgment, then, is that if plaintiff recovers the machinery it will have machinery valued by the court *9 at $3,605, and will also have, not only the $1,855 which defendant paid it, but also the $1,500 awarded by the judgment--a total of $6,960, less the $1,446.52 awarded to defendant, or $5,513.48 for equipment which it agreed to sell for $3,500; and if defendant is unable to deliver same it will have to pay plaintiff the full value of the machinery, the $1,500 damages, together with attorney's fees and costs of suit, for machinery found to be worth only $3,605, and will have lost the initial payment of $1,855 less the amount of the judgment in its favor of $1,446.52.
 Such results can hardly be said to be equitable. Respondent has not attempted to justify them, for it has filed no brief in this court in support of the judgment. We shall therefore assume, for the purposes of this opinion, that the court properly held that the so-called lease was a conditional sales contract; that there was an implied warranty that the equipment sold was reasonably fit for the particular purpose for which it was sold; that said machinery was not in good or serviceable condition or reasonably fit for the purposes for which it was sold; that defendant was entitled to offset against the purchase price the amount found to have been expended by it in order to put same into serviceable condition, and that defendant tendered to plaintiff the sum of $303.48, which plaintiff refused.
 [1] Appellant's contention before this court is that the judgment of the trial court should have been that defendant was entitled to have permanent possession and ownership of the equipment upon payment to plaintiff of the sum of $303.48. This contention is based upon section 1789 of the Civil Code of this state which is a part of the Uniform Sales Act enacted in 1931, and which provides:
 "Remedies for breach of warranty. (1) Where there is a breach of warranty by the seller, the buyer may, at his election:"
 "(a) (Recoupment.) Accept or keep the goods and set up against the seller, the breach of warranty by way of recoupment in diminution or extinction of the price; ..."
 It urges that under this statute defendant was entitled to do what it did do--set up against the seller the breach of warranty by way of recoupment in diminution of the price; and that a proper judgment in the action would have been in favor of plaintiff for only the amount found due it as the balance of the purchase price, after deducting the down payment and *10 the amount of the expenditures necessary to put the equipment into serviceable condition.
 In support of this contention appellant relies especially upon Peuser v. Marsh, 218 N.Y. 505 [113 N.E. 494, Ann.Cas. 1918B 913], in which case the plaintiff sued to recover possession of a piano, together with stool and scarf, which defendant had purchased under a conditional sale contract which provided for a down payment and the balance in monthly installments. It was there averred that defendant had failed to pay a due balance of $141, with accrued interest. Defendant set up certain warranties and the breach thereof to his damage in the sum of $200. The question presented on appeal was whether, in the case of a conditional sale, where the seller sought to recover the goods by means of an action of replevin, the buyer might defend by pleading a breach of warranty by way of recoupment in diminution or extinction of the price. The court held that since it was provided by the Uniform Sales Act, which had been adopted in New York, and which provided, as does section 1789 of our Civil Code, that in case of a breach of warranty by the seller the buyer of personal property might at his election "accept or keep the goods and set up against the seller the breach of warranty by way of recoupment in diminution or extinction of the price," the defense pleaded by the buyer was proper. Peuser v. Marsh was followed in Studebaker Corporation of America v. Silverberg, 199 N.Y.S. 190, 193.
 In W. H. Bintz Co. v. Mueggler, 65 Idaho 760 [154 P.2d 513], an action to recover the possession of a bread-wrapping machine sold to defendant on a conditional sales contract, defendant set up a breach of warranty, and was awarded the sum of $554.05 as damages therefor. It was also decreed that he should be entitled to retain possession of the machine until such time as plaintiff returned a trade-in machine, repaid the down payment of $150, and paid the judgment for damages; but that defendant was also entitled, at his election, to keep the machine upon paying to plaintiff the difference between the unpaid balance and the damages awarded to defendant. Except that the Supreme Court of Idaho held that the amount of damages allowed was too large, the decision of the lower court was affirmed under the provisions of the Uniform Sales Law, then in effect in Idaho. Peuser v. Marsh, supra, was cited and followed; also Wayne Tank & Pump Co. v. Harper, 118 Okla. 274 [247 P. 985], holding that the plea *11 of breach of warranty may be shown as a defense pro tanto in a replevin action between the parties based on a conditional sales contract for the sale of machinery.
 In Mercantile Trust Co. v. Roland, 143 Okla. 190 [288 P. 300, 304], it was held that a replevin action is sufficiently flexible to authorize a settlement of all the equities between the parties arising from or growing out of the main controversy. It was said that it was necessary, in such an action, for a defendant to prove a loss or damage in an amount equal to the balance then due upon the contract, but it was also stated that in the event that the total damages suffered by defendant should be found to be less than the balance due under the sale contract, judgment should be entered for the plaintiff unless the defendant should elect to pay to plaintiffs such difference and retain the property.
 In W. H. Bintz Co. v. Mueggler, supra, it was said that by its prayer for general relief the plaintiff had submitted itself to the equity side of the court, and this justified the relief which was granted. Plaintiff's prayer in the case before us makes a similar appeal to the equity side of the court, and we think that, in this case as in that one, the trial court should have provided in its judgment that defendant, having elected to retain the machinery, should be permitted to do so on condition that it pay to plaintiff the balance due on the purchase price, with interest and attorney's fees, after deducting the amount found due defendant for damages for the breach of warranty.
 [2] While it is said in some cases that to justify such a judgment the amount found due for damages for breach of warranty should equal or exceed the balance due on the purchase price, section 1789 of the Civil Code above cited specifically provides that where there is a breach of warranty a buyer may accept the goods and set up the breach of warranty by way of recoupment either in diminution of or in extinction of the price; and if it were to be held that under such statute defendant could keep the goods only if the amount to which he was found entitled as damages for breach of warranty was sufficient to extinguish the debt, the word diminution would have no meaning. There are no reported decisions in this state that are directly in point here, but analogy may be found in cases holding that damages for the fraud of a seller may be set up as a defense in a possessory action. In Nevada Land *12 etc. Corp. v. Sistrunk, 220 Cal. 174, 178 [30 P.2d 389], an action in ejectment where it was alleged that plaintiff was entitled to possession of land which defendant had contracted to purchase since defendant had failed to make certain payments in conformity with the contract, defendant set up fraud as an affirmative defense by way of cross-complaint and alleged that the land was not worth the amount that he had already paid on the purchase price. The trial court sustained a demurrer to the cross-complaint without leave to amend, and struck out the defense of fraud in the answer. But the Supreme Court said that the right of a defrauded vendee to set up the fraud of the vendor by way of "defensive relief" as an answer to the demand, or in abatement of damages in a suit for the purchase price, had been recognized in numerous cases, and that "There would be little consistency or justice in a rule which, when suit was for the payments due under the contract, would allow the buyer to set up damage caused by the fraud of the seller in answer to the demand or in abatement of damages, but, when the action was one for possession of the premises and to quiet title, would not allow the same matter to be pleaded as a defense against a forfeiture for failure to make the payments which the law says he may withhold." Kent v. Clark, 20 Cal.2d 779, 783 [128 P.2d 868, 142 A.L.R. 576], presented a similar state of facts. The court said that in such a situation, as the vendee's failure to make payments was excused (where there was fraud on the part of the seller) the vendee might set up such fraud in an action by the vendor to have the contract canceled, to quiet title to the property and for possession. Also see Kaluzok v. Brisson, 27 Cal.2d 760 [167 P.2d 481], and General Refrigeration Sales Co. v. Roberts, 145 Kan. 333 [65 P.2d 269].
 [3] A reasonable and equitable construction of section 1789, supra, is that a purchaser under a conditional sales contract may be permitted to keep the goods upon payment of any balance which the court finds due to plaintiff after determining the amount of the damages the buyer has sustained by reason of a breach of warranty by the seller; and the equities of the situation dictate that whatever may be the nature of the action brought, the equities between the parties should be adjudicated in the one action. It is the apparent purpose of the Uniform Sales Law to so provide.
 [4] It is alleged in defendant's answer, and the evidence *13 shows without contradiction, that defendant tendered to plaintiff the sum of $303.48, as the balance due under the contract. The trial court, however, found that this amount was insufficient since it did not include $1.00 provided for in the contract. The provision of the contract in this respect was that the title to the property should remain in the lessor until all of the payments therein provided for had been made, "whereupon, should Lessee so elect, the Lessor shall make, execute and deliver to said Lessee a bill of sale of said property, and sell to said Lessee the said property for the sum of One Dollar ($1.00)." However, the court did not find the value of the property to include this $1.00, and it has been held that same is not proper to be considered a part of the purchase price under such a contract. (See Rapoport v. Rapoport Exp. Co., 90 N.J.Eq. 519 [107 A. 822, 823]; 8 Cal.L.Rev. 192.)
 [5a] While the amount tendered by appellant did not include a very small amount of interest on the unpaid balance of the purchase price, to hold that because of this omission plaintiff should recover the machinery together with the $1,855 already paid and an additional $1,500 for damages, reduced only by the amount allowed defendant for breach of warranty, can hardly be said to be equitable, especially where there had been no judicial determination nor any agreement between the parties as to the amount which defendant should be allowed as damages for the breach of warranty--all of which emphasizes the propriety of determining in the one action, whether it be deemed one in claim and delivery or otherwise, the balance due either party, and the entering of a money judgment for either as the facts might warrant. And this is especially true where the parties themselves have appealed to the equity side of the court.
 [6] But even if defendant were not entitled in this action to keep the goods upon payment of the balance found due to plaintiff, we think that the trial court erred in adjudging that, in case delivery could not be had, plaintiff, in addition to recovery of the equipment, should recover the sum of $1,500 by reason of defendant's detention and use of same. Upon what basis and upon what evidence the trial court fixed this sum of $1,500 does not appear from its findings, and the only evidence upon which it could be based was the following:
 "Q. Do you know the reasonable rental value of this whole equipment here, whole plant as of the date of this contract? *14 A. The reasonable rental value of that equipment is between $350.00 and $400.00 a month."
 As of the date of the contract the equipment was not assembled and obviously had no rental value. Also it does not appear from the findings or the record for what period of time the rental was allowed. Even assuming that evidence was sufficient to justify the amount awarded, the sales contract provided that in the event of default by the lessee (buyer), the amount paid prior to the date of repossession should be retained by the lessor (seller) "as rental for the use of said machinery during the time it has been in the custody of the Lessee." Defendant paid to plaintiff the sum of $1,855 on account of the purchase price, for which it was given no credit by the court, and since the only basis in the evidence for a finding of damages to plaintiff for detention was "rental," plaintiff was obviously adequately compensated therefor by the amount of the advance payment, especially in view of the fact that it never did put the equipment into operating condition.
 As hereinbefore stated, the prayer to plaintiff's complaint invites the doing of equity as does that of defendant's answer. [7] Forfeitures are abhorrent to the law and will not be declared if there is any other reasonable theory upon which a case can be settled. [8] In conditional sales the title is held only for security, and when a vendor gets the whole amount due him, together with interest, costs and attorney's fees, he has recovered all that he is equitably entitled to under his contract. [5b] And to permit plaintiff to resume possession of the property in this case, to retain the initial payment of $1,855, and to recovery in addition damages for detention, seems to us to be contrary to the fundamental principles of equity, especially where the balance due is so small in comparison to the value of the machinery and in view of the faulty condition of same when delivered. And, as previously stated, respondent has not defended the judgment before this court.
 Appellant urges that we should reverse the judgment in the case with directions to the trial court to enter judgment in favor of plaintiff in the sum of $303.48. This, however, we are unable to do, since it is apparent upon the face of the record that plaintiff is entitled to some small amount of interest on the deferred payments, which interest the said sum of $303.48 does not cover. The judgment is, however, reversed *15 with instructions to the trial court to enter judgment that defendant retain possession of the property on condition that it pay to plaintiff, within a specified time, the balance of the purchase price found due, with interest, and attorney's fees as fixed by the trial court, after deducting from the purchase price the $1,855 payment made by defendant in April, 1943, together with the sum of $1,446.52 found to be the amount of the damages suffered by defendant by reason of plaintiff's breach of warranty; otherwise plaintiff to recover possession of the machinery together with said attorney's fees and costs. Plaintiff, in the event of such payment by defendant, should also be ordered to deliver to defendant the two promissory notes given it as evidence of the two unpaid installments on the purchase price.
 Peek, J., and Thompson, J., concurred.
