Added setInvoice function