When computing the real property transfer tax, an exception to the ordinary rule exists when the real property is sold at a foreclosure sale and the mortgagee is the purchaser. Only that portion of the selling price that exceeds the unpaid debt, including accrued interest and cost of foreclosure, is subject to the transfer tax if the mortgagee is the purchaser. 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. (RTC 11926) In all other cases the entire tax is imposed.