s than 5,000 may retain, from fines collected for violations of this title and from special expenses collected under Article 45.051, Code of Criminal Procedure, in cases in which a violation of this title is alleged, an amount equal to 30 percent of the municipality's revenue for the preceding fiscal year from all sources, other than federal funds and bond proceeds, as shown by the audit performed