Added genataring invoice and fix errors