Where a prisoner is employed at any occupation for which pay is allowed or permitted, or at any gainful occupation from which the state derives an income, the department shall credit the prisoner with the total amount of his or her earnings.
The amount of earnings credited but unpaid to a prisoner may be paid to the prisoner's spouse, children, mother, father, brother, or sister as the inmate may direct upon approval of the superintendent. Upon release, parole, or discharge, all unpaid earnings of the prisoner shall be paid to him or her.