No officer of the city, except corporation counsel, a justice of a city court, acting as clerk of said court, city marshal, marshal of a city or municipal court, commissioners of deeds and city officers acting as commissioners of deeds, shall have or receive to his use any perquisites, compensation or fees for services pertaining directly or indirectly, or which may hereafter be added to the duties of his office, in addition to his salary; and all perquisites, compensation and fees paid to and received by any such officer for services pertaining directly or indirectly, or which may hereafter be added to the duties of his office, other than his salary received from the city, shall be the property of the city, and shall be paid by the officer receiving the same into the city treasury. The compensation of all the officers, clerks and subordinates in the several departments shall not exceed in the aggregate the appropriation made by the board of estimate and apportionment for that purpose.
N.Y. Second Class Cities Law § 17