removed some unnecessary code in send invoice