public ActionResult _DailyPerformanceMonitoringForSales(string reportOption, string locationCode)
        {
            List <DailyZonalPerformanceMonitoring> lstDailyZonalPerformanceReport = new List <DailyZonalPerformanceMonitoring>();

            lstDailyZonalPerformanceReport = erpDal.DailyPerformanceMonitoringZonalReport();

            DailyZonalPerformanceMonitoring objDailyZonalPerformanceMonitoring = new DailyZonalPerformanceMonitoring();

            objDailyZonalPerformanceMonitoring.LocationName                                                = "Total";
            objDailyZonalPerformanceMonitoring.Sales_Monthly_Target_Qty                                    = lstDailyZonalPerformanceReport.Sum(s => s.Sales_Monthly_Target_Qty);
            objDailyZonalPerformanceMonitoring.Sales_Monthly_Achievement_Percent                           = lstDailyZonalPerformanceReport.Sum(s => s.Sales_Monthly_Achievement_Percent);
            objDailyZonalPerformanceMonitoring.Sales_UpToDate_Target_Qty                                   = lstDailyZonalPerformanceReport.Sum(s => s.Sales_UpToDate_Target_Qty);
            objDailyZonalPerformanceMonitoring.Sales_UpToDate_Achievement_Qty                              = lstDailyZonalPerformanceReport.Sum(s => s.Sales_UpToDate_Achievement_Qty);
            objDailyZonalPerformanceMonitoring.Sales_UpToDate_Achievement_Percent                          = lstDailyZonalPerformanceReport.Sum(s => s.Sales_UpToDate_Achievement_Percent);
            objDailyZonalPerformanceMonitoring.Sales_OnTheDate_Target_Qty                                  = lstDailyZonalPerformanceReport.Sum(s => s.Sales_OnTheDate_Target_Qty);
            objDailyZonalPerformanceMonitoring.Sales_OnTheDate_Achievement_Qty                             = lstDailyZonalPerformanceReport.Sum(s => s.Sales_OnTheDate_Achievement_Qty);
            objDailyZonalPerformanceMonitoring.Collection_Monthly_CC_Receivable_InMillion                  = lstDailyZonalPerformanceReport.Sum(s => s.Collection_Monthly_CC_Receivable_InMillion);
            objDailyZonalPerformanceMonitoring.Collection_Monthly_Total_Overdue_InMillion                  = lstDailyZonalPerformanceReport.Sum(s => s.Collection_Monthly_Total_Overdue_InMillion);
            objDailyZonalPerformanceMonitoring.Collection_UpToDate_Target_CC_Receivable_InMillion          = lstDailyZonalPerformanceReport.Sum(s => s.Collection_UpToDate_Target_CC_Receivable_InMillion);
            objDailyZonalPerformanceMonitoring.Collection_UpToDate_Target_Overdue_Receivable_InMillion     = lstDailyZonalPerformanceReport.Sum(s => s.Collection_UpToDate_Target_Overdue_Receivable_InMillion);
            objDailyZonalPerformanceMonitoring.Collection_UpToDate_Achievement_CC_Recovered_InMillion      = lstDailyZonalPerformanceReport.Sum(s => s.Collection_UpToDate_Achievement_CC_Recovered_InMillion);
            objDailyZonalPerformanceMonitoring.Collection_UpToDate_Achievement_Overdue_Recovered_InMillion = lstDailyZonalPerformanceReport.Sum(s => s.Collection_UpToDate_Achievement_Overdue_Recovered_InMillion);
            objDailyZonalPerformanceMonitoring.Collection_UpToDate_Achievement_CC_Plus_OD_Percent          = lstDailyZonalPerformanceReport.Sum(s => s.Collection_UpToDate_Achievement_CC_Plus_OD_Percent);
            objDailyZonalPerformanceMonitoring.DRF_New_Qty            = lstDailyZonalPerformanceReport.Sum(s => s.DRF_New_Qty);
            objDailyZonalPerformanceMonitoring.DRF_Old_Qty            = lstDailyZonalPerformanceReport.Sum(s => s.DRF_Old_Qty);
            objDailyZonalPerformanceMonitoring.System_Return_UpToDate = lstDailyZonalPerformanceReport.Sum(s => s.System_Return_UpToDate);
            objDailyZonalPerformanceMonitoring.Resales_UpToDate       = lstDailyZonalPerformanceReport.Sum(s => s.Resales_UpToDate);

            lstDailyZonalPerformanceReport.Add(objDailyZonalPerformanceMonitoring);


            return(View(new GridModel <DailyZonalPerformanceMonitoring>
            {
                Data = lstDailyZonalPerformanceReport
            }));
        }
Beispiel #2
0
        public ActionResult _DailyPerformanceMonitoringForSales(string reportOption, string locationCode)
        {
            /*objLoginHelper = (LoginHelper)Session["LogInInformation"];
             * List<DailyPerformanceMonitoringForSales> lstDailyPerformanceMonitoringForSales = new List<DailyPerformanceMonitoringForSales>();
             *
             * if (reportOption == "RSFSUMMARY")
             * {
             *  locationCode = string.Empty;
             * }
             * else
             * {
             *  if (string.IsNullOrEmpty(locationCode))
             *      locationCode = objLoginHelper.LocationCode;
             * }
             *
             * lstDailyPerformanceMonitoringForSales = salesDal.ReadDailyPerformanceMonitoringForSales(reportOption, locationCode);
             *
             * DailyPerformanceMonitoringForSales objMonitoringForSalesColumnTotal = new DailyPerformanceMonitoringForSales();
             * objMonitoringForSalesColumnTotal.LocationName = "Total: ";
             * objMonitoringForSalesColumnTotal.SalesTarget_CurrentMonthTotal = lstDailyPerformanceMonitoringForSales.Sum(s => s.SalesTarget_CurrentMonthTotal);
             * objMonitoringForSalesColumnTotal.SalesTarget_Yesterday = lstDailyPerformanceMonitoringForSales.Sum(s => s.SalesTarget_Yesterday);
             * objMonitoringForSalesColumnTotal.SalesAchievement_Yesterday = lstDailyPerformanceMonitoringForSales.Sum(s => s.SalesAchievement_Yesterday);
             * objMonitoringForSalesColumnTotal.SalesTarget_UpToDate = lstDailyPerformanceMonitoringForSales.Sum(s => s.SalesTarget_UpToDate);
             * objMonitoringForSalesColumnTotal.SalesAchievement_UpToDate = lstDailyPerformanceMonitoringForSales.Sum(s => s.SalesAchievement_UpToDate);
             * objMonitoringForSalesColumnTotal.SalesVarianceWithMonthlyTarget = lstDailyPerformanceMonitoringForSales.Sum(s => s.SalesVarianceWithMonthlyTarget);
             * objMonitoringForSalesColumnTotal.RequiredTargetPerDay = lstDailyPerformanceMonitoringForSales.Sum(s => s.RequiredTargetPerDay);
             *
             * lstDailyPerformanceMonitoringForSales.Add(objMonitoringForSalesColumnTotal);*/

            List <DailyZonalPerformanceMonitoring> lstDailyZonalPerformanceReport = new List <DailyZonalPerformanceMonitoring>();

            lstDailyZonalPerformanceReport = erpDal.DailyPerformanceMonitoringZonalReport();

            DailyZonalPerformanceMonitoring objDailyZonalPerformanceMonitoring = new DailyZonalPerformanceMonitoring();

            objDailyZonalPerformanceMonitoring.LocationName                                                = "Total";
            objDailyZonalPerformanceMonitoring.Sales_Monthly_Target_Qty                                    = lstDailyZonalPerformanceReport.Sum(s => s.Sales_Monthly_Target_Qty);
            objDailyZonalPerformanceMonitoring.Sales_Monthly_Achievement_Percent                           = lstDailyZonalPerformanceReport.Sum(s => s.Sales_Monthly_Achievement_Percent);
            objDailyZonalPerformanceMonitoring.Sales_UpToDate_Target_Qty                                   = lstDailyZonalPerformanceReport.Sum(s => s.Sales_UpToDate_Target_Qty);
            objDailyZonalPerformanceMonitoring.Sales_UpToDate_Achievement_Qty                              = lstDailyZonalPerformanceReport.Sum(s => s.Sales_UpToDate_Achievement_Qty);
            objDailyZonalPerformanceMonitoring.Sales_UpToDate_Achievement_Percent                          = lstDailyZonalPerformanceReport.Sum(s => s.Sales_UpToDate_Achievement_Percent);
            objDailyZonalPerformanceMonitoring.Sales_OnTheDate_Target_Qty                                  = lstDailyZonalPerformanceReport.Sum(s => s.Sales_OnTheDate_Target_Qty);
            objDailyZonalPerformanceMonitoring.Sales_OnTheDate_Achievement_Qty                             = lstDailyZonalPerformanceReport.Sum(s => s.Sales_OnTheDate_Achievement_Qty);
            objDailyZonalPerformanceMonitoring.Collection_Monthly_CC_Receivable_InMillion                  = lstDailyZonalPerformanceReport.Sum(s => s.Collection_Monthly_CC_Receivable_InMillion);
            objDailyZonalPerformanceMonitoring.Collection_Monthly_Total_Overdue_InMillion                  = lstDailyZonalPerformanceReport.Sum(s => s.Collection_Monthly_Total_Overdue_InMillion);
            objDailyZonalPerformanceMonitoring.Collection_UpToDate_Target_CC_Receivable_InMillion          = lstDailyZonalPerformanceReport.Sum(s => s.Collection_UpToDate_Target_CC_Receivable_InMillion);
            objDailyZonalPerformanceMonitoring.Collection_UpToDate_Target_Overdue_Receivable_InMillion     = lstDailyZonalPerformanceReport.Sum(s => s.Collection_UpToDate_Target_Overdue_Receivable_InMillion);
            objDailyZonalPerformanceMonitoring.Collection_UpToDate_Achievement_CC_Recovered_InMillion      = lstDailyZonalPerformanceReport.Sum(s => s.Collection_UpToDate_Achievement_CC_Recovered_InMillion);
            objDailyZonalPerformanceMonitoring.Collection_UpToDate_Achievement_Overdue_Recovered_InMillion = lstDailyZonalPerformanceReport.Sum(s => s.Collection_UpToDate_Achievement_Overdue_Recovered_InMillion);
            objDailyZonalPerformanceMonitoring.Collection_UpToDate_Achievement_CC_Plus_OD_Percent          = lstDailyZonalPerformanceReport.Sum(s => s.Collection_UpToDate_Achievement_CC_Plus_OD_Percent);
            objDailyZonalPerformanceMonitoring.DRF_New_Qty            = lstDailyZonalPerformanceReport.Sum(s => s.DRF_New_Qty);
            objDailyZonalPerformanceMonitoring.DRF_Old_Qty            = lstDailyZonalPerformanceReport.Sum(s => s.DRF_Old_Qty);
            objDailyZonalPerformanceMonitoring.System_Return_UpToDate = lstDailyZonalPerformanceReport.Sum(s => s.System_Return_UpToDate);
            objDailyZonalPerformanceMonitoring.Resales_UpToDate       = lstDailyZonalPerformanceReport.Sum(s => s.Resales_UpToDate);

            lstDailyZonalPerformanceReport.Add(objDailyZonalPerformanceMonitoring);


            return(View(new GridModel <DailyZonalPerformanceMonitoring>
            {
                Data = lstDailyZonalPerformanceReport
            }));
        }