(1) Notwithstanding the provisions of any other law, an inmate may be employed by the corporation or by any other private entity operating on the grounds of a correctional institution prior to the last 24 months of the inmate’s confinement. Compensation received for such employment shall be credited by the department to an account for the inmate and shall be used to make any court-ordered payments, including restitution to the victim. The department rules shall provide that a portion of such compensation be credited by the department in the manner provided in s. 946.512. (2) No inmate is eligible for reemployment assistance benefits, whether employed by the corporation or by any other private enterprise operating on the grounds of a correctional institution or elsewhere, when such employment is part of a correctional work program or work-release program of either the corporation or the department.