(a) Each municipal appropriations ordinance, now in force or hereafter adopted, with all amendments as are adopted from time to time, shall continue in force and effect for the next fiscal year after adoption and it shall then expire except for any mandatory appropriations required to meet contractual obligations or the continued appropriations and authorization of state or federal grants. (b) The mayor and council shall not appropriate funds for any given fiscal year, which, in aggregate, exceed a sum equal to the amount of unappropriated surplus expected to have accrued in the city treasury at the beginning of the fiscal year, together with an amount not greater than the total municipal receipts from existing revenue sources anticipated to be collected in the fiscal year, less refunds as estimated in the budget report and amendments thereto. (c) All appropriated funds, except for the mandatory appropriations required by law and those required to meet contractual obligations, or the continued appropriation and authorization of state or federal grants, remaining unexpended and not contractually obligated at the expiration of the municipal appropriations ordinance, shall lapse. (d) All state or federal funds received by the city are hereby continually appropriated in the exact amounts and for the purposes authorized and directed by the state or federal government in making the grant.