Any tax imposed pursuant to this chapter shall not apply with respect to any deed, instrument, or writing to a beneficiary or mortgagee, which is taken from the mortgagor or trustor as a result of or in lieu of foreclosure; provided, that such tax shall apply to the extent that the consideration exceeds the unpaid debt, including accrued interest and cost of foreclosure. Consideration, unpaid debt amount and identification of grantee as beneficiary or mortgagee shall be noted on said deed, instrument or writing or stated in an affidavit or declaration under penalty of perjury for tax purposes. (Ord. 9605 § 11 (part), 1996: prior code § 1958)