Gain or profit realized on sale, satisfaction, or transfer, not a leasing or a letting, of property referred to in this section shall be credited to the income in an amount up to, but not exceeding, the accrued unpaid interest on the original obligation secured by such property as of the date of its acquisition by enforcement of the obligation or agreement in lieu thereof, and the balance shall be credited to principal. Such credit to income on account of accrued interest shall be in addition to any and all other credits due income by the terms of any other section of this chapter. Should any portion of such credit to income on account of accrued interest be in a form other than cash, then, and in that event, the full amount of such credit to income shall be paid first out of any sums received from the conversion of such asset into cash whether by payment, sale, or transfer before any sums so received shall be paid to principal.
As between successive tenants or a tenant and a remainderman, all sums paid hereunder on account of accrued interest shall be apportioned in the same manner as provided for income by Section 731.06.
The cost price of the property shall be the unpaid balance of the principal sum of the debt secured by such property, plus all sums whenever paid on any of the following items:
Ca. Civ. Code § 731.14