
113 Cal.App.2d 149 (1952)
HARRY A. GARFINKLE, Plaintiff and Appellant,
v.
VERDIS M. MONTGOMERY, as Administratrix, etc., et al., Defendants and Appellants.
Civ. No. 8055. 
California Court of Appeals. Third Dist.  
Sept. 19, 1952.
 Norman R. Samuelsen and Darold D. DeCoe for Plaintiff and Appellant.
 Stanley J. Gale for Defendants and Appellants.
 VAN DYKE, J.
 Plaintiff and defendants alike have appealed from a judgment in an action for unlawful detainer brought by plaintiff, lessor, against defendants, lessees. Plaintiff leased a commercial building in Sacramento to the defendants for a term of 10 years beginning March 7, 1947. Pursuant to the terms of the lease the defendants paid to the lessor the sum of $2,700 which the lease provided should be turned over to the lessor as security for the performance of the covenants of the lease. The leased premises consisted of a store, a restaurant and a hotel.
 The lessees defaulted in the payment of rent for the months of May, June and July, 1950, and on June 30th of that year the lessor served a three-day notice upon the lessees to pay the rental then delinquent or vacate the premises. On July 12th the rent was not paid and the lessor filed his complaint in unlawful detainer and at the same time procured a writ of attachment which was levied on furniture and fixtures located in the restaurant. The attaching officer in levying the writ padlocked the restaurant doors. On August 22, 1950, a writ of possession was issued and on August 30, 1950, the lessor was put into possession of the whole of the leased premises, which possession he has enjoyed ever since.
 The lessees had sublet various portions of the leased premises. They received the rent of the store for the month of July and the subtenant thereafter moved out. The restaurant *152 was vacant when the writ of attachment was levied, but the lessees had received rent from a subtenant thereof for the month of May. The lessees collected rent from a subtenant of the hotel for the month of July. Thereafter the lessor collected the rent.
 The lessor's complaint in unlawful detainer alleged the existence of the lease and defendants' possession thereunder; set forth the defaults of the lessees in the payments of rental; alleged the service of the statutory three-day notice and the lessees' continued default and refusal to surrender possession. The prayer of the complaint was for the amount of delinquent rentals, various accrued charges, and damages for injury to the premises by subtenants. Termination of the lease was asked.
 The answer admitted accrued and unpaid rental in the sum of $900; denied that the same was due or owing and apparently both admitted and denied possession of the premises.
 The lessees filed a cross-complaint alleging that they had paid over to the lessor $2,700 as security for the performance of the lease; that the writ of attachment had been wrongfully and maliciously procured in that the lessor had by affidavit affirmed that he had no security for the performance of the lease when, in fact, he had; that by the wrongful attachment defendants had been damaged.
 After a trial findings of fact and conclusions of law and judgment were made, drawn and entered as of December 6, 1950. The lessor was allowed judgment for rentals accruing from the date of the first default on May 10, 1950, to December 9th of that year, totaling $3,125. In addition he was allowed the sum of $315.15 for repairs, insurance, increase in taxes and water bills. The trial court found as a fact that the lessor's entry pursuant to the writ of possession was for the benefit and account of the lessees; that while so in possession the lessor had collected $750 as rental for the benefit and account of the lessees, and this sum, plus the deposited sum of $2,700, was credited against the judgment in plaintiff's favor. The lease was terminated. The lessees were nonsuited as to their cross-complaint.
 We will first treat the contentions advanced by the lessees as appellants. They contend that as a matter of law there was a surrender of the premises to the lessor at about the time he obtained the writ of attachment and caused its levy, and possession having been surrendered they say the trial court erred in allowing rental to the lessor after the surrender. *153 Consistent with this contention the lessees do not contend that the court erred in awarding rental for the months of May, June and July, 1950. They further make no complaint of that part of the judgment awarding the lessor repair charges, utility charges and the like which accrued prior to the surrender. Of first importance, therefore, is the ascertainment of the date beyond which the lessees were no longer liable to pay rent and other incidental charges.
 Lessees, as appellants, contend that the writ of attachment effectively deprived them of the possession and use of the restaurant.
 We cannot sustain the lessees' contentions that the operation of the writ of attachment and the lessor's actions near or at that time constituted such a surrender of the premises as a matter of law as to terminate the liability for rent and hold that the trial court's implied finding to the contrary must be sustained. However, it is our further conclusion that liability for rental payments under the lease terminated upon the lessor's entry into possession under the writ of possession. [1] The summary remedy of unlawful detainer is primarily designed to recover possession from the defaulting lessee. As incidental to the main object the court under section 1174 of the Code of Civil Procedure assesses damages and determines the rent due. (Markham v. Fralick, 2 Cal.2d 221 [39 P.2d 804]; D'Amico v. Riedel, 95 Cal.App.2d 6 [212 P.2d 52].) [2] In an unlawful detainer action where the lessee remains in possession or deprives the lessor of possession until the rendition of judgment the allowance of rental to the date of judgment is proper. (Keyes v. Moy Jin Mun, 136 Cal. 129 [68 P. 476]; Flournoy v. Everett, 51 Cal.App. 406 [196 P. 916].) [3] However, if the lessor enters into and assumes full control of the premises during the pendency of the action and it cannot be said that such assumption of control is for the account of the lessees under appropriate provisions of the lease or circumstances justifying such a declaration, then such entry constitutes an eviction and liability for rent is thus terminated. In Telegraph Avenue Corp. v. Raentsch, 205 Cal. 93 [269 P. 1109, 61 A.L.R. 366], an unlawful detainer action, a receiver was appointed at the instance of the lessor and took possession of the property involved. The judgment allowing the lessor the full amount of rental during the occupancy of the receiver was reversed, the court stating at pages 100-101: *154
 " 'The rule follows the general principle that any act of the landlord which results in dispossessing the tenant and which deprives him of the use, occupancy and enjoyment of the premises amounts to an eviction. The reason for the rule is that rent is the landlord's right to receive from the tenant compensation for the benefits that are accruing to the tenant from his possession and enjoyment of the land, and that when the tenant is deprived of this right of possession and enjoyment by the action of the landlord the right of the landlord to receive compensation automatically ceases. ..."
 " 'It is, of course, true that the appointment of a receiver is not in every instance an ousting of possession of the property over which the receiver exercises control, but where, as here, a receiver is appointed at the instance of the plaintiff in an action in unlawful detainer, the very nature of which is to terminate the tenancy and to place the plaintiff in possession of the property, the receiver in such a case must be treated as the receiver of the party entitled to the possession ..., and where, as here, this receiver takes exclusive control and possession of the premises, all of which were occupied by subtenants under separate tenancies, and either collects the rents from such subtenants or removes them from possession, he must be treated as a receiver for the landlord whose entry into possession is an eviction of the lessee.' "
 We think the foregoing is applicable to and determinative of the question presented in this appeal as to the date when the liability of the lessees to pay rent ceased. And we think that under the situation presented here we have a much stronger case for the application of the principles laid down in the cited case than was presented in that case. [4] For in this case, although the court found that the lessor had gone into possession of the premises under the writ of possession for the benefit and account of the lessees, we think that such a holding is without support and against law. It appears from the record that answer was made by the lessees on August 4, 1950, and on August 7th there was served and filed in the action a notice of motion for summary judgment and an affidavit in support thereof pursuant to the provisions of section 437c of the Code of Civil Procedure. On August 11th a counteraffidavit was served and filed and on August 22d the motion was presented to the court. After a hearing it appears that the court neither granted nor denied the motion. The order made, after reciting the making of the motion for summary judgment, the consideration by the court of *155 the pleadings, the respective affidavits offered in support of and in opposition to the motion, and the arguments of counsel, was for the issuance of a writ of possession, upon the giving of a $2,000 bond. The writ was issued and possession was taken from the lessees and given to the lessor thereunder, as hereinbefore recited. Section 1166a of the Code of Civil Procedure provides for the issuance of a writ of possession in an unlawful detainer action where it appears that "the defendant is insolvent, or has no property that is subject to execution sufficient to satisfy the amount of damages sought to be recovered by the plaintiff, or resides out of the State, or has departed from the State, or cannot, after due diligence be found within the State, or conceals himself to avoid the service of summons." A search of the record does not reveal that any of the foregoing conditions precedent to the issuance of a writ of possession under section 1166a of the Code of Civil Procedure were made to appear. It does not appear that the issuance of the writ was based upon consent or stipulation of the lessees, but of course it does appear that the lessor accepted the benefits of the writ, was placed in possession under it, and maintained that possession over all of the demised premises thereafter and until judgment was rendered. Under such circumstances a finding of the court that the possession of the lessor was for and on account of the lessees is without support. [5] The purpose of the section authorizing the writ of possession in an unlawful detainer action is clear. It affords the lessor immediate possession of the premises unlawfully detained. The possession so given vests full and complete control of the premises in the lessor and therefore in line with the case of Telegraph Avenue Corp. v. Raentsch, supra, the lessee is thereby evicted and his liability for rent under the lease is terminated from that date forward where the action thereafter results in a termination of the lease without any resumption of possession by the lessee.
 Lessees, as appellants, further contend that the trial court erred in granting a nonsuit against them on their cross-complaint. [6] While normally a cross-complaint and counterclaim are not permissible in an unlawful detainer action (Woods-Drury, Inc. v. Superior Court, 18 Cal.App.2d 340, 344 [63 P.2d 1184]; D'Amico v. Riedel, supra), yet, since the trial of the cross-complaint went to a nonsuit without any objection, we shall consider the appellants' contention in regard thereto properly before us on this appeal. [7] It is argued that the attachment was illegally procured in that the *156 lessor was secured by deposit of $2,700 and for that reason was not entitled to the attachment. Upon this reasoning it is further argued that the use of the attachment constituted a conversion of the personal property seized by the officer. We do not agree. Section 537(4) of the Code of Civil Procedure provides for the issuance of an attachment in an unlawful detainer action for the payment of rent provided the payment is not secured "by any mortgage or lien upon real or personal property, or pledge of personal property." The deposit as security for the performance of the terms of the lease did not prevent the issuance of the attachment. In Lori, Ltd., Inc. v. Wolfe, 80 Cal.App.2d 557 [180 P.2d 21], an appeal from an order refusing to discharge an attachment in an unlawful detainer action, the court stated at page 560:
 "The principal point stressed by appellants as requiring a reversal of the order complained of is that the affidavit of plaintiffs for attachment is fatally defective in that, while it negatives the existence of all the kinds of security mentioned in section 537, Code of Civil Procedure, it fails to set forth the fact that the lease, including the obligation to pay rent, is secured by the sum of $4,800, in advance rentals in possession of plaintiffs; further, there is no allegation in the amended complaint or affidavit for attachment that this security has become valueless."
 "The language employed by plaintiffs in the affidavit for attachment conforms to the wording of the statute which is all that is required for the issuance of the writ. ... The most that can be said in support of appellant's apparent contention that the deposit with plaintiffs of the sum of $4,800 created some kind of lien or security preventing issuance of attachment is that it was posted as security for the faithful performance of the terms of the lease. The question as to whether the terms and provisions of the lease have been breached by defendants constitutes the fundamental issue of this unlawful detainer action and necessarily cannot be determined on a motion to discharge an attachment but only by being put in issue and tried on the merits of the case itself."
 In Hougham v. Rowland, 33 Cal.App.2d 11 [90 P.2d 860], upon the question of what security might be held without barring the right of attachment, it was said, at pages 14, 17:
 "In determining this question, it is important to notice carefully the precise terms used in the statute. The law does not provide that no attachment shall issue where the plaintiff has other security for the claim, but it designates the specific *157 kinds of security that will bar the remedy, namely, a mortgage, deed of trust, a lien, or a pledge of the property."
 * * *
 "If we are, therefore, to be guided by the plain meaning of the statute, it would follow that appellant was entitled to the writ of attachment. The only ground upon which this conclusion could be avoided would be that the statute contemplates other security as well as those which are specifically mentioned. We think the statute having specified the four particular kinds of securities, to wit, mortgage, trust deed, lien and pledge, by implication there would be excluded any other species."
 We hold that the writ of attachment was lawfully issued. It may be noted in addition that there was no showing made by the lessees in support of their cross-complaint that they did not owe rental unpaid at the time of the issuance of the writ. It follows, therefore, that the conversion complained of in the cross-complaint did not take place and that the nonsuit was properly granted.
 The lessor has also appealed from the judgment. [8] He first contends that the lessees, having breached the terms of the lease, were not entitled to a refund of the security deposited,nor were they entitled to have the security credited against the money judgment rendered in his favor, as was done. Paragraph 3 of the lease, referring to the matter of the deposit for security, provided as follows:
 "Upon the execution of this agreement, in addition to the payment of the first month's rental in advance, lessee will pay to lessor the further sum of $1350 as partial security for this agreement as hereinafter set forth. Further, and in addition, on the 10th day of January 1948, lessee agrees to pay to lessor, in addition to the regular rental, the sum of $1350, which said sum, together with the previous sum paid as security, shall be applied to the final six months rental due under the agreement, provided however that all the terms and conditions of this agreement have been complied with and there has been no default or breach of any of the conditions or covenants herein."
 To support the argument that he was entitled to retain the security and that it was error for the trial court to credit it against the judgment rendered in his favor, the lessor cites A-1 Garage v. Lange Inv. Co., 6 Cal.App.2d 593 [44 P.2d 681], and Gallagher v. McMann, 119 Cal.App. 688 [7 P.2d 204]. But these cases and many others sustain the trial court. In *158 the Gallagher case it was held that an agreement for deposit of money as security for the performance of the covenants of the lease is valid and enforceable and the lessor is entitled to retain the deposit until the complete discharge of the obligations which the same is intended to secure. A similar holding was made in the A-1 Garage case. In Ace Realty Co. v. Friedman, 106 Cal.App.2d 805, the court, quoting from 7 Cal.Jur.10-Year Supplement (1945 Rev.) 529, section 141, stated at page 812 [236 P.2d 174]:
 " 'The lessor is entitled to retain the deposited fund until complete discharge by the lessee of the obligations the performance of which the deposit is shown to have been intended to secure. ..."
 " 'The lease contract being terminated, the lessee has a right to the fund, less any amount that may be due and unpaid on account of rental. A right to have the deposited sum returned to him, accrues in the event of a surrender of the premises and acceptance by the lessor.' "
 In the present case the lease has been terminated; there were no obligations remaining thereunder. Under such circumstances we know of no legal theory and counsel has suggested none which would allow the lessor to retain the fund. Such retention, if allowed, would be an outright forfeiture. The trial court properly treated the deposited funds as property of the lessees, applicable insofar as necessary in the discharge of the judgment rendered in favor of the lessor. (Wickstrom v. McGrath, 86 Cal.App. 651, 656 [261 P. 326].)
 [9a] It is next contended by the lessor that the trial court should have allowed $400 damages upon his testimony that a subtenant had damaged a floor and that the estimated repair cost was between $400 and $500. We find no error in disallowing this item. The record shows that the lessor did testify that a subtenant had moved out, leaving the floor "in a very bad condition, that it sagged" because the tenant "had too heavy stuff on there" and that he, the lessor, believed that the damage would cost somewhere between $400 and $500 to repair. At that point it was objected by counsel for the lessees that there was nothing in the complaint about such an item of damage. The court said to the lessor, "You haven't any actual figure on it?" The lessor answered that he had an estimate but that the contractor giving it to him "didn't give any decided or positive figure--he just said between $400 and $500." Obviously the testimony as to the cost of repairs was not that of the witness and constituted *159 pure hearsay. What weight and what if any credibility were to be given thereto was a matter committed to the trier of fact. [10] As was held in California-Calaveras Min. Co. v. Walls, 170 Cal. 285 [149 P. 595], a finding of fact contrary to the direct evidence of the only witness testifying directly to the question of the fact found will not be disturbed on appeal where the testimony and the circumstances surrounding the transaction are such as to deprive that testimony of all credibility. It was also held in Blanc v. Connor, 167 Cal. 719 [141 P. 217], that it is within the province of the trial court to determine what credit and weight should be given to the testimony of any witness, and that the appellate court cannot control the trial court's finding or conclusion denying the testimony credence unless it appears that there are no matters or circumstances which at all impair its accuracy. [9b] Impliedly the trial court here refused to credit the testimony we have recited upon the issue of the cost of repair involved and we cannot here question the accuracy of that determination in view of the fact that the witness in reality gave no testimony other than that someone had told him that the cost of the repairs would be from $400 to $500. There was complete absence of any showing as to the qualification of the person making this statement and as to whether that person had inspected the premises or done anything reasonably necessary before an opinion upon so uncertain a matter as the cost of repairs to a damaged floor could be given. There are here ample circumstances justifying the refusal of the court to base a finding of fact upon the testimony put before it.
 [11] The lessor further claims that he was entitled to treble damages during the period of unlawful detainer, but the award of treble damages rests within the sound discretion of the trial court and we can find upon this record no reason for holding that such discretion was abused. (Code Civ. Proc.,  1174; Gwinn v. Goldman, 57 Cal.App.2d 393 [134 P.2d 915].)
 [12] Finally, it is contended by the lessor that he was entitled to an award of interest on the amount of the unpaid rental. The matter of interest was not raised by pleading, or otherwise called to the attention of the trial court, and it cannot now first be contended on appeal that error was committed in the failure to allow it.
 The record is not in such condition that we can correct the judgment as to those matters concerning which we have held it to be erroneous. Except as hereinbefore declared to be in *160 error, the judgment is affirmed and it is reversed so far as it awards to the lessor rental beyond the time when he was placed in possession of the demised premises under the writ of possession and insofar as it allows incidental charges accruing after that date. The cause is remanded with directions to the trial court to take such further proceedings as may be necessary in accordance herewith. Appellant lessees are entitled to costs on appeal.
 Adams, P. J., and Peek, J., concurred.
