(a) The clerk of each magistrate court shall, at the end of each month, pay into the Regional Jail and Prison Development Fund in the state Treasury an amount equal to $40 of the costs collected in each criminal proceeding and all but $10 of the costs collected for the filing of each civil action.
(b) The clerk of each magistrate court shall, at the end of each month, pay into the Regional Jail Operations Partial Reimbursement Fund established in §15A-3-17 of this code the fees collected pursuant to subsection (g), section one and subdivision (3), subsection (a), section two of this article.