(1) Where a debt that consisted partly of principal and partly of interest was secured and the security has been realized before the debtor became a bankrupt, the proceeds of the realization shall, for the purposes of this Act but not otherwise, notwithstanding any agreement to the contrary, be deemed to have been apportioned in satisfaction of principal and interest in the proportion that the principal bore, at the time of the realization, to the amount then payable as interest at the agreed rate.
(2) Where a debt that consists partly of principal and partly of interest is secured and the security is realized after the debtor became a bankrupt or the value of the security is estimated in the creditor's proof of debt, the amount realized or estimated shall, for the purposes of this Act but not otherwise and notwithstanding any agreement to the contrary, be deemed to have been apportioned in satisfaction of principal and interest in the proportion that the principal bears to the amount payable as interest at the agreed rate.