async Task CheckPayment(object state) { if (paymentRequestId >= 0) { paymentRequest = await paymentRequestService.Get(paymentRequestId); } }
// // GET: /Procurement/PaymentRequest/ public ActionResult Index() { LoadLookups(); //var list = (IEnumerable<PaymentRequest>)_PaymentRequestservice.GetAll(); var list = (IEnumerable <PaymentRequest>)_PaymentRequestservice.Get(t => t.BusinessProcess.CurrentState.BaseStateTemplate.StateNo <= 2).OrderByDescending(t => t.BusinessProcess.CurrentState.DatePerformed); return(View(list)); }
// // GET: /Procurement/ContractAdministration/ public ActionResult Index(int transporterID) { var transporterObj = _transporterService.FindById(transporterID); ViewBag.TransporterID = transporterID; ViewBag.PaymentRequests = (IEnumerable <Cats.Models.PaymentRequest>)_paymentRequestService .Get(t => t.TransportOrder.TransporterID == transporterID, null, "TransportOrder").ToList(); ViewBag.TransporterName = transporterObj.Name; ViewBag.TransporterAddress = "Region: " + transporterObj.Region + " | Sub-City: " + transporterObj.SubCity + " | Telephone: " + transporterObj.TelephoneNo; //var target = new TransportOrderDispatchViewModel { DispatchViewModels = dispatchView.Where(t => !t.GRNReceived).ToList(), DispatchViewModelsWithGRN = dispatchView.Where(t => t.GRNReceived).ToList(), TransportOrderViewModel = transportOrderViewModel }; return(View()); }
// // GET: /Procurement/ContractAdministration/ public ActionResult Index(int transporterID) { var transporterObj = _transporterService.FindById(transporterID); ViewBag.TransporterID = transporterID; ViewBag.PaymentRequests = (IEnumerable <Cats.Models.PaymentRequest>)_paymentRequestService .Get(t => t.TransportOrder.TransporterID == transporterID, null, "TransportOrder").ToList(); ViewBag.TransporterName = transporterObj.Name; ViewBag.TransporterAddress = "Region: " + transporterObj.Region + " | Sub-City: " + transporterObj.SubCity + " | Telephone: " + transporterObj.TelephoneNo; ViewBag.RegionID = new SelectList(_adminUnitService.GetRegions(), "AdminUnitID", "Name"); //ViewBag.TransporterOrderID = new SelectList(_transportOrderService.GetTransporter(), "TransporterID", "Name", 0); //ViewBag.Round = new SelectList(new int[] {1,2,3,4,5,6,7,8,9,10,11,12}, 0); //var target = new TransportOrderDispatchViewModel { DispatchViewModels = dispatchView.Where(t => !t.GRNReceived).ToList(), DispatchViewModelsWithGRN = dispatchView.Where(t => t.GRNReceived).ToList(), TransportOrderViewModel = transportOrderViewModel }; return(View()); }
public JsonResult ReadSummarizedNumbers([DataSourceRequest] DataSourceRequest request) { var paymentRequests = _paymentRequestService.GetAll().Count(); var paymentRequestsFromTransporters = _paymentRequestService.Get(t => t.BusinessProcess.CurrentState.BaseStateTemplate.Name == "Payment Requested").Count(); var paymentRequestsAtLogistics = _paymentRequestService.Get(t => t.BusinessProcess.CurrentState.BaseStateTemplate.Name == "Submitted for Approval").Count(); var approvedPaymentRequests = _paymentRequestService.Get(t => t.BusinessProcess.CurrentState.BaseStateTemplate.Name == "Approved for Payment").Count(); var rejectedPaymentRequests = _paymentRequestService.Get(t => t.BusinessProcess.CurrentState.BaseStateTemplate.Name == "Rejected").Count(); var checkIssuedPaymentRequests = _paymentRequestService.Get(t => t.BusinessProcess.CurrentState.BaseStateTemplate.Name == "Check Issued").Count(); var checkCashedPaymentRequests = _paymentRequestService.Get(t => t.BusinessProcess.CurrentState.BaseStateTemplate.Name == "Check Cashed").Count(); var summarizedNumbersViewModel = new SummarizedNumbersViewModel() { ApprovedPaymentRequests = approvedPaymentRequests, CheckCashedPaymentRequests = checkCashedPaymentRequests, CheckIssuedPaymentRequests = checkIssuedPaymentRequests, PaymentRequests = paymentRequests, PaymentRequestsAtLogistics = paymentRequestsAtLogistics, PaymentRequestsFromTransporters = paymentRequestsFromTransporters, RejectedPaymentRequests = rejectedPaymentRequests }; return(Json(summarizedNumbersViewModel, JsonRequestBehavior.AllowGet)); }