Local invariants for a finite multipartite quantum system