MT#5879 Clean up code and db from invoice templates activity flag