If the defendant who appeals a conviction in municipal court in a city that does not adopt a resolution of approval under section 23a of the Michigan municipal court act, 1956 PA 5, MCL 730.523, is found not guilty on appeal in circuit court, the circuit court shall discharge the defendant. If the defendant is convicted on appeal to circuit court, the circuit court has the authority to enter judgment, sentence, and impose costs as provided in section 22 of this chapter. If the defendant was released on recognizance as provided in section 34 or 42 of this chapter and is sentenced to jail by the circuit court, the defendant shall be remanded back to the county jail for the length of time determined by the circuit court, less any time served under the sentence imposed by the municipal court and less any time spent in jail awaiting trial. The defendant shall also be given credit for any fine paid under the sentence of the municipal court against any fine imposed by the circuit court on appeal.