All expenses authorized and necessarily incurred in the preparation for, and conduct of, elections as provided in this code shall be paid from the county treasuries, except that when an election is called by the governing body of a city the expenses shall be paid from the treasury of the city. All payments shall be made in the same manner as other county or city expenditures are made. The elections official, in providing the materials required by this division, need not utilize the services of the county or city purchasing agent.