
209 Cal.App.3d 205 (1989)
258 Cal. Rptr. 612
PUBLIC EMPLOYEES' RETIREMENT SYSTEM, Plaintiff, Cross-defendant and Appellant,
v.
FRANK D. WINSTON, Defendant, Cross-complainant and Appellant.
Docket No. A040220.
Court of Appeals of California, First District, Division Three.
March 31, 1989.
*207 COUNSEL
McDonough, Holland & Allen and Michael B. Evans for Plaintiff, Cross-defendant and Appellant.
Jerome Sapiro, Jr., for Defendant, Cross-complainant and Appellant.
OPINION
STRANKMAN, J. 

I

Preliminary Statement
Plaintiff and cross-defendant, State of California Public Employees' Retirement System (PERS), as lessor, brought this action against defendant and cross-complainant, frank d. winston (winston), as lessee, seeking unpaid rent and attorney fees. Winston cross-complained for declaratory relief and retroactive rent abatement. Following a court trial, the court adjudged that PERS was entitled to recover against winston the sum of $5,281.57 plus interest accrued thereon, and costs. The court thereafter denied winston's motion to vacate judgment, ruled PERS was entitled to recover attorney fees and costs, and denied winston's claim for attorney fees. The court also granted in part and denied in part winston's motion to tax costs. Winston appeals from the judgment and several subsequent rulings against him. PERS appeals from the partial granting of the motion to tax costs.
We conclude the trial court erred in the calculation of the money judgment by failing to offset the amount of a security deposit paid by winston against the amount of rent owing to PERS. We reverse the judgment on this ground and remand for further proceedings.


*208 II

Facts
In 1982, winston entered into a lease agreement with PERS's predecessor-in-interest to lease premises in a commercial building in San Francisco for the term of June 15, 1982, through June 14, 1987. Winston paid at the outset of the lease a security deposit in the sum of $5,115. In 1983, PERS purchased the building subject to the lease agreement and acquired the deposit. Thereafter, many services previously rendered by the former owner incident to the lease were terminated or reduced by PERS. The trial court found that the elimination of these services substantially affected winston's quiet enjoyment of the premises. In February 1984, winston quit paying rent. On April 27, 1984, he paid the sum of $8,000 and then vacated the premises on May 5, 1984.
Following trial in August 1986, the trial court found that winston's vacation of the premises constituted a constructive eviction and that any obligation to pay rent terminated as of that date. The trial court further found that PERS was entitled to the amount of unpaid rent accrued from February through May 5, 1984, subject to a rent abatement for the reduction in services in the sum of $4,185. The court made no finding whatsoever in its statement of decision as to the deposit. Winston moved for modification of the statement of decision to provide for the offset of the amount of the deposit retained by PERS against the net rent owing as of May 5, 1984. PERS opposed the motion. The court ultimately confirmed its statement of decision and rendered judgment in favor of PERS in the amount of $5,281.57 with interest accrued thereon. The court also awarded PERS as the prevailing party attorney fees in the sum of $24,663, and costs.

III

Issue
Winston contends that under Civil Code section 1950.7, subdivision (c), on May 19, 1984, two weeks following his constructive eviction, he was entitled to offset against unpaid rent the $5,115 deposit held by PERS. With this offset, he argues, PERS owed him money as of May 19, 1984, rather than the reverse; consequently, he is entitled to a money recovery against PERS as well as attorney fees as the prevailing party under Civil Code section 1717.
PERS does not dispute that winston is entitled to an offset of the amount of the deposit against unpaid rent. PERS contends, however, that the offset *209 should be applied against the total amount of the money judgment rendered in May 1987, rather than against the amount of rent owing as of May 19, 1984. Applying the offset in this manner, a net amount remains owing to PERS, and PERS remains the prevailing party.

IV

Discussion
A. Application of Civil Code section 1950.7 in calculation of money judgment. Section 1950.7 pertains to a security deposit paid incident to a commercial lease. Subdivision (c) thereof provides in pertinent part: "The landlord may claim of the payment or deposit only those amounts as are reasonably necessary to remedy tenant defaults in the payment of rent, to repair damages to the premises caused by the tenant, or to clean the premises upon termination of the tenancy, if the payment or deposit is made for any or all of those specific purposes. Where the claim of the landlord upon the payment or deposit is only for defaults in the payment of rent, then any remaining portion of the payment or deposit shall be returned to the tenant no later than two weeks after the date the landlord receives possession of the premises. ..." (Italics added.)
(1) Winston contends, and we agree, that the foregoing statutory language unambiguously provides that the lessor must credit the deposit against any rent owing within two weeks following the termination of the lease, at which time the lessee becomes entitled to the balance, if any. Section 1950.7, subdivision (c), makes no reference to the application of the deposit towards the amount of any judgment against the lessee. Although certain cases relied on by PERS state that the lessees were entitled to have the security deposit credited against the money judgment rendered in the lessor's favor (see, e.g., Wickstrom v. McGrath (1927) 86 Cal. App. 651, 656 [261 P. 326]; Garfinkle v. Montgomery (1952) 113 Cal. App.2d 149, 157 [248 P.2d 52]), a careful examination of these cases reveals they do not compel the result urged by PERS.
For example, in Wickstrom, the trial court's findings provided that the defendant lessee was entitled to have the judgment for unpaid rent satisfied in part from the security deposit retained by the lessor, but the judgment did not allow for this credit. On appeal, the court reversed as to this issue, holding that the judgment should have comported with the trial court's findings. (Wickstrom v. McGrath, supra, 86 Cal. App. at p. 656.) The issue, however, of whether the deposit should have been credited against the unpaid rent at the time of the termination of the lease, as opposed to the subsequent money judgment, was never raised by the lessee and not *210 addressed by the court on appeal. Further, Civil Code section 1950.7 was not then in effect, and the decision did not involve the application of any statutory law governing security deposits.
In Garfinkle, the amount of the judgment for unpaid rent was simply the amount of rent owing at the time of the termination of the lease, and cost of repairs. There was no award of prejudgment interest accrued on the unpaid rent. (Garfinkle v. Montgomery, supra, 113 Cal. App.2d at p. 159.) Accordingly, whether the security deposit was offset against the unpaid rent at the time of termination of the lease or the amount of the subsequent money judgment made no difference in the calculation of the net amount owing to the lessor.
That is not the case here. Using PERS's calculations, the net rent owing on May 19, 1984, was less than $5,115. Offsetting the $5,115 deposit against this sum results in a net refund owing to winston as of this date as well as the date of judgment. In contrast, without the offset of the deposit, the net amount of unpaid rent plus interest owing on the date of judgment was $5,281.57, the amount of the judgment. Offsetting the $5,115 deposit against this sum results in a net balance owing in favor of PERS. Thus, unlike the case in Garfinkle, the timing of the offset here is critical to a determination of which party is entitled to a money judgment in its favor.
We accordingly conclude that the trial court erred in failing to offset the deposit against the unpaid rent as of May 19, 1984 (two weeks following May 5, 1984), and in calculating its money judgment, and we remand for correction. We will defer the making of the exact arithmetical calculations of the net judgment to the trial court on remand, but provide some guidelines for the trial court's computations. PERS was entitled to the amount of rent owing from February through April 27 (the date of the $8,000 payment), less the $4,185 rent abatement credit, with interest accrued on the net liquidated amount owing (i.e., unpaid rent less rent abatement credit) under Burgermeister Brewing Corp. v. Bowman (1964) 227 Cal. App.2d 274 [38 Cal. Rptr. 597] (when a plaintiff sues for a liquidated sum and the defendant establishes an offsetting claim based upon defective performance of the same contract by the plaintiff, the amount of the former is to be offset against the latter as of the due date of the original debt, and only the balance bears interest). The $8,000 sum paid by winston on April 27 is deducted from this figure. The amount of rent owing for May 1 through 5 is added to the resulting figure, and the total sum bears interest through May 19. The amount of the $5,115 deposit is subtracted from this total sum owing on May 19, leaving a negative balance in favor of winston. The *211 calculations set forth in winston's "Reply Memorandum of Points and Authorities" are largely in accord with these guidelines.[1]
B. Attorney fees and costs. (2) Winston contends that because he is entitled to a money judgment in his favor on remand, he should be deemed the prevailing party as a matter of law under Civil Code section 1717 and therefore is entitled to attorney fees as well as costs.
Civil Code section 1717, subdivision (b)(1), provides that, with certain exceptions, "the party prevailing on the contract shall be the party who recovered a greater relief in the action on the contract...." (Italics added.) Subdivision (b)(1) further provides that "[t]he court may also determine that there is no party prevailing on the contract for purposes of this section."
Because we hold that on remand, winston, not PERS, shall be entitled to a net money judgment in his favor, the trial court must reassess on remand the issue of whether winston is the prevailing party in this action, or whether neither party is the prevailing party entitled to attorney fees. In making this reassessment, equitable considerations are relevant. (International Industries, Inc. v. Olen (1978) 21 Cal.3d 218, 224 [145 Cal. Rptr. 691, 577 P.2d 1031].) The trial court thus should take into consideration evidence that on May 7, 1984, winston offered to pay a sum which was approximately $2,000 higher than the judgment entered, coupled with our holding that winston is entitled to a net refund; and winston's settlement offer on May 17, 1984, to pay rent through the day he quit the premises, which offer was rejected.
We conclude, however, that as a matter of law, PERS is not the party here who recovered "a greater relief" and cannot be deemed the prevailing party. PERS sought a determination that winston had breached the lease agreement and claimed unpaid future rent and other damages in excess of $100,000. The trial court found that PERS, not winston, had breached the lease which constituted a constructive eviction terminating the lease on May 5, 1984. As to unpaid rent before that date, the trial court found winston was entitled to a rent abatement credit substantially reducing the amount owing, and we hold that the security deposit further reduces the amount owing, such that winston, not PERS, is entitled to a net money judgment in his favor. PERS accordingly recovers nothing.
For these reasons, we reverse the trial court's ruling that PERS is the prevailing party in this action for purposes of Civil Code section 1717, and *212 remand for a reassessment of whether winston is the prevailing party entitled to attorney fees, and, if so, to set their amount.
(3) As to costs, Code of Civil Procedure section 1032, not the lease agreement, governs the award of costs here. That section provides that a prevailing party is entitled as a matter of right to recover costs in an action. (Code Civ. Proc., § 1032, subd. (b).) "`Prevailing party'" is defined to include "the party with a net monetary recovery...." (Code Civ. Proc., § 1032, subd. (a)(4).) "In competing money claims, where one claim offsets the other, the prevailing party [entitled to costs] is the one in whose favor the net amount is found to be due under the judgment." (Strickland v. Becks (1979) 95 Cal. App.3d Supp. 18, 20 [157 Cal. Rptr. 656].) Here, winston undisputably is the prevailing party for purposes of section 1032 as he has a net monetary recovery. We therefore reverse the award of costs in favor of PERS and direct the trial court on remand to assess costs in favor of winston.

V

Disposition
The judgment is reversed with directions to the trial court on remand to conduct further proceedings to determine the net money judgment in favor of winston in accordance with this opinion; to determine whether winston is the prevailing party entitled to attorney fees under Civil Code section 1717, and, if so, to fix their amount; and to assess costs in favor of winston.
White, P.J., and Barry-Deal, J., concurred.
NOTES
[1]  The calculations reflect the sum owing as of May 5, 1984. However, because PERS was not required to refund the security deposit until two weeks thereafter on May 19, we calculate the amount owing as of May 19.
