In case of the resignation or removal from office of any officer who by law is accountable to the commonwealth for certain surplus fees of office, it shall be the duty of his successor or successors in office, who from time to time may receive and pay over such fees to his predecessor or predecessors in office, to take duplicate receipts for the same, and to transmit one of the said receipts to the auditor general, together with a statement of such fees as may otherwise be received by such predecessor from time to time, as far as he may be enabled to ascertain the same. And it shall be the duty of the auditor general, from time to time to settle the accounts of the late officer to whom such fees shall have been paid, and to compel him to account upon oath or affirmation, and to pay over such proportion of the arrearages of fees so received by him, as would have been paid to the commonwealth had he remained in office, allowing to such late officer, in case of deficiency in any year while he shall have held his office, such sum as shall make up the whole sum he would have been entitled to have retained, free from any tax thereon.
72 P.S. § 3217