Every ordinance granting any franchise shall prohibit the issuing of any stock on account thereof by any corporation holding, or doing any business under, said franchise. Any violation of the terms of this section shall, at the option of the city, operate as a forfeiture of said franchise.