When any prisoner shall wilfully violate the terms of his employment or the rules and regulations of the Department of Corrections, the Director of Corrections may in his discretion determine what portion of all moneys earned by the prisoner shall be forfeited by the said prisoner and such forfeiture shall be deposited in the State Treasury in a fund known as the Inmate Welfare Fund of the Department of Corrections.
Ca. Pen. Code § 2765