Section 108. The salary and compensation of all elected officers of a town shall be fixed annually by vote of the town at an annual town meeting, but said salary or compensation may be revised by a two-thirds vote of any special town meeting called to conduct business later in the same fiscal year for which said salary or compensation was originally fixed; provided, however, that such salary revision occurs prior to the establishment of the tax rate of the town in said fiscal year. Except as provided in section four A and section one hundred and eight A, and except in any city in which salaries and wages are fixed by special law or by ordinance in accordance with the provisions of any general or special law, all boards or heads of departments of a town shall, as soon as may be after the passage of the annual budget, fix the salary or compensation of all officers or employees appointed or employed by them, subject to the provisions of section thirty-one of chapter forty-four. The provisions of this section shall be operative notwithstanding the provisions of sections thirteen and thirty-four of said chapter forty-four. A city may by ordinance prescribe that all fees, charges or commissions allowed by law to any officer thereof shall be paid into the city treasury and belong to the city, and in such case shall pay such officer such compensation as the city council may determine.