A general approach to conservation laws in viscoelsticity