The sentence to pay a fine, when imposed upon a corporation, association, partnership, or governmental instrumentality for an offense defined in this code or the ordinances of the municipality or for any offense defined outside of this code over which this municipality has jurisdiction, for which no special corporate fine is specified, shall be sentenced to pay an amount, fixed by the court, not exceeding $299 when the conviction is for a class B or C misdemeanor or infraction.