--added view to editInvoice function