Upon the conviction of any city or town official, department head, or other city or town employee of knowingly failing, or refusing, without just cause, to perform any duty imposed upon such officer or employee by this chapter, or city charter or city or town ordinance, in connection with the giving of notice, the preparing and filing of estimates of revenues or expenditures or other information required for preparing a budget report in the time and manner required, or of knowingly making expenditures in excess of budget appropriations, the official or employee shall be guilty of a misdemeanor and shall be fined not more than five hundred dollars for each separate violation.