When any person is sentenced to the workhouse, the judge of the court trying the case shall fix the fine in each case against the prisoner at a sum equal to the state and county tax provided by law; provided, that a greater fine may be entered, in the discretion of the court.