public ActionResult _CloseStockInvoice(int id) { var vm = new CloseStockInvoiceVM { StockInvoiceId = id, DeleteMessage = "Closing this invoice will update stock prices and landed Costs. You will not be able to edit this invoice after it has been closed.", Prompt = "Close Invoice?" }; return(PartialView(vm)); }
public ActionResult _CloseStockInvoice(CloseStockInvoiceVM mCloseStockInvoiceVm) { if (ModelState.IsValid) { var inv = _stockInvSvc.GetInvoice(mCloseStockInvoiceVm.StockInvoiceId); inv.IsProcessed = true; if (ExecuteRepositoryAction(() => { _stockInvSvc.CloseInvoice(inv); _stockInvSvc.CommitChanges(); })) { return(ReturnJsonFormSuccess()); } } return(PartialView(mCloseStockInvoiceVm)); }