Exemple #1
0
        /// <summary>
        ///
        /// </summary>
        /// <returns></returns>
        public ActionResult DistributionDeliveryDispatch()
        {
            var user           = _userProfileService.GetUser(User.Identity.Name);
            var stores         = _hubService.GetAllStoreByUser(user);
            var areas          = _adminUnitService.GetAllAreasForReport();
            var codes          = ConstantsService.GetAllCodes();
            var commodityTypes = _commodityTypeService.GetAllCommodityTypeForReprot();
            var programs       = _programService.GetAllProgramsForReport();
            var viewModel      = new DistributionDeliveryDispatchViewModel(codes, commodityTypes, programs, stores, areas);

            return(View(viewModel));
        }
Exemple #2
0
        /// <summary>
        ///
        /// </summary>
        /// <returns></returns>
        public ActionResult StockBalance()
        {
            var user                    = _userProfileService.GetUser(User.Identity.Name);
            var codesViewModels         = ConstantsService.GetAllCodes();
            var commodityTypeViewModels = _commodityTypeService.GetAllCommodityTypeForReprot();
            var programViewModels       = _programService.GetAllProgramsForReport();
            var storeViewModel          = _hubService.GetAllStoreByUser(user);
            var viewModel               = new StockBalanceViewModel(codesViewModels, commodityTypeViewModels, programViewModels, storeViewModel);


            return(View(viewModel));
        }
Exemple #3
0
        /// <summary>
        ///
        /// </summary>
        /// <returns></returns>
        public ActionResult CommittedVsDispatched()
        {
            var user           = _userProfileService.GetUser(User.Identity.Name);
            var storeViewModel = _hubService.GetAllStoreByUser(user);
            var areas          = _adminUnitService.GetAllAreasForReport();
            var codes          = ConstantsService.GetAllCodes();
            var commodityTypes = _commodityTypeService.GetAllCommodityTypeForReprot();
            var programs       = _programService.GetAllProgramsForReport();
            var viewModel      = new CommittedVsDispatchedViewModel(storeViewModel, areas, codes, commodityTypes, programs, user);

            return(View(viewModel));
        }
Exemple #4
0
        /// <summary>
        /// Show the ETA, MT Expected, MT + % that has arrived, MT + % still to arrive
        /// </summary>
        /// <returns></returns>
        public ActionResult ArrivalsVsReceipts()
        {
            var user = _userProfileService.GetUser(User.Identity.Name);
            var commoditySourceViewModels = _commoditySourceService.GetAllCommoditySourceForReport();
            var portViewModels            = _receiveService.GetALlPorts();
            var codesViewModels           = ConstantsService.GetAllCodes();
            var commodityTypeViewModels   = _commodityTypeService.GetAllCommodityTypeForReprot();
            var programViewModels         = _programService.GetAllProgramsForReport();
            var viewModel = new ArrivalsVsReceiptsViewModel(commoditySourceViewModels, portViewModels, codesViewModels,
                                                            commodityTypeViewModels, programViewModels, user);

            return(View(viewModel));
        }
Exemple #5
0
        /// <summary>
        ///
        /// </summary>
        /// <returns></returns>
        public ActionResult Dispatches()
        {
            var user                    = _userProfileService.GetUser(User.Identity.Name);
            var codesViewModels         = ConstantsService.GetAllCodes();
            var commodityTypeViewModels = _commodityTypeService.GetAllCommodityTypeForReprot();
            var programViewModels       = _programService.GetAllProgramsForReport();
            var storeViewModels         = _hubService.GetAllStoreByUser(user);
            var areaViewModels          = _adminUnitService.GetAllAreasForReport();
            var bidRefViewModels        = _dispatchAllocationService.GetAllBidRefsForReport();
            var viewModel               = new DispatchesViewModel(codesViewModels, commodityTypeViewModels, programViewModels, storeViewModels,
                                                                  areaViewModels, bidRefViewModels);

            return(View(viewModel));
        }
Exemple #6
0
        /// <summary>
        ///
        /// </summary>
        /// <returns></returns>
        public ActionResult DistributionByOwner()
        {
            var user              = _userProfileService.GetUser(User.Identity.Name);
            var stores            = _hubService.GetAllStoreByUser(user);
            var areas             = _adminUnitService.GetAllAreasForReport();
            var codes             = ConstantsService.GetAllCodes();
            var commodityTypes    = _commodityTypeService.GetAllCommodityTypeForReprot();
            var programs          = _programService.GetAllProgramsForReport();
            var sourceDonors      = _donorService.GetAllSourceDonorForReport();
            var responsibleDonors = _donorService.GetAllResponsibleDonorForReport();
            var viewModel         = new DistributionByOwnerViewModel(codes, commodityTypes, programs, stores, areas, sourceDonors,
                                                                     responsibleDonors);

            return(View(viewModel));
        }
Exemple #7
0
        public ActionResult FreeStock()
        {
            MasterReportBound report = GetFreeStock(new FreeStockFilterViewModel());
            UserProfile       user   = _userProfileService.GetUser(User.Identity.Name);
            var codes          = ConstantsService.GetAllCodes();
            var commodityTypes = _commodityTypeService.GetAllCommodityTypeForReprot();
            var programs       = _programService.GetAllProgramsForReport();
            var commodities    = _commodityService.GetAllCommodityForReprot();
            var areas          = _adminUnitService.GetAllAreasForReport();

            FreeStockFilterViewModel ViewModel = new FreeStockFilterViewModel(codes, commodityTypes, programs, commodities, areas);

            ViewBag.Filters = ViewModel;
            return(View(report));
        }
Exemple #8
0
        public ActionResult Receive()
        {
            MasterReportBound report = GetReceiveReportByBudgetYear(new ReceiptsViewModel());
            UserProfile       user   = _userProfileService.GetUser(User.Identity.Name);

            var commoditySources = _commoditySourceService.GetAllCommoditySourceForReport();
            var ports            = _receiveService.GetALlPorts();
            var codes            = ConstantsService.GetAllCodes();
            var commodityTypes   = _commodityTypeService.GetAllCommodityTypeForReprot();
            var programs         = _programService.GetAllProgramsForReport();
            var stores           = _hubService.GetAllStoreByUser(user);
            var viewModel        = new ReceiptsViewModel(codes, commodityTypes, programs, stores, commoditySources, ports);

            ViewBag.Filters = viewModel;
            return(View(report));
        }
Exemple #9
0
        public ActionResult OffloadingReport()
        {
            MasterReportBound report = GetOffloading(new DispatchesViewModel());
            UserProfile       user   = _userProfileService.GetUser(User.Identity.Name);

            var codes                     = ConstantsService.GetAllCodes();
            var commodityTypes            = _commodityTypeService.GetAllCommodityTypeForReprot();;
            var programs                  = _programService.GetAllProgramsForReport();
            var stores                    = _hubService.GetAllStoreByUser(user);
            var areas                     = _adminUnitService.GetAllAreasForReport();
            var bidRefs                   = _dispatchAllocationService.GetAllBidRefsForReport();
            DispatchesViewModel ViewModel = new DispatchesViewModel(codes, commodityTypes, programs, stores, areas, bidRefs);

            ViewBag.Filters = ViewModel;
            return(View(report));
        }
Exemple #10
0
        public ActionResult DistributionReport()
        {
            DistributionViewModel newDistributionViewModel = new DistributionViewModel();

            newDistributionViewModel.PeriodId = (DateTime.Now.Month - 1 / 3) + 1;// current quarter by default
            MasterReportBound report = GetDistributionReportPivot(newDistributionViewModel);
            UserProfile       user   = _userProfileService.GetUser(User.Identity.Name);
            var codes          = ConstantsService.GetAllCodes();
            var commodityTypes = _commodityTypeService.GetAllCommodityTypeForReprot();
            var programs       = _programService.GetAllProgramsForReport();
            var stores         = _hubService.GetAllStoreByUser(user);
            var areas          = _adminUnitService.GetAllAreasForReport();
            var bidRefs        = _dispatchAllocationService.GetAllBidRefsForReport();
            var viewModel      = new DistributionViewModel(codes, commodityTypes, programs, stores, areas, bidRefs);

            ViewBag.Filters = viewModel;

            return(View(report));
        }