(a)
Except as otherwise provided with respect to damages liquidated in the lease agreement (Section 10504) or otherwise determined pursuant to agreement of the parties (Sections 1302 and 10503), if a lessor elects to retain the goods or a lessor elects to dispose of the goods and the disposition is by lease agreement that for any reason does not qualify for treatment under subdivision (b) of Section 10527, or is by sale or otherwise, the lessor may recover from the lessee as damages for a default of the type described in subdivision (a) of, or paragraph (1) of subdivision (c) of, Section 10523, or, if agreed, for other default of the lessee, (1) accrued and unpaid rent as of the date of default if the lessee has never taken possession of the goods, or, if the lessee has taken possession of the goods, as of the date the lessor repossesses the goods or
an earlier date on which the lessee makes a tender of the goods to the lessor, (2) the present value as of the date determined under paragraph (1) of the total rent for the then remaining lease term of the original lease agreement minus the present value as of the same date of the market rent at the place where the goods are located computed for the same lease term, and (3) any incidental damages allowed under Section 10530, less expenses saved in consequence of the lessee’s default.
(b)
If the measure of damages provided in subdivision (a) is inadequate to put a lessor in as good a position as performance would have, the measure of damages is the present value of the profit, including reasonable overhead, the lessor would have made from full performance by the lessee, together with any incidental damages allowed under Section 10530, due allowance for costs reasonably incurred and due credit for payments or proceeds of disposition.