コード例 #1
0
        public ActionResult Report(EnumReports reports)
        {
            ReportParamViewModel viewModel = ReportParamViewModel.CreateReportParamViewModel(_mCostCenterRepository, _mWarehouseRepository, _mSupplierRepository, _tRecPeriodRepository, _mItemRepository);
            string title = string.Empty;

            switch (reports)
            {
            case EnumReports.RptBrand:
                title = "Daftar Master Merek";

                break;

            case EnumReports.RptCostCenter:
                title = "Daftar Master Cost Center";
                break;

            case EnumReports.RptJournal:
                title = "Daftar Jurnal";
                viewModel.ShowDateFrom   = true;
                viewModel.ShowDateTo     = true;
                viewModel.ShowCostCenter = true;
                break;

            case EnumReports.RptNeraca:
                title = "Laporan Neraca";
                viewModel.ShowCostCenter = true;
                viewModel.ShowRecPeriod  = true;
                break;

            case EnumReports.RptLR:
                title = "Laporan Laba / Rugi";
                viewModel.ShowCostCenter = true;
                viewModel.ShowRecPeriod  = true;
                break;

            case EnumReports.RptStockCard:
                title = "Kartu Stok";
                viewModel.ShowDateFrom  = true;
                viewModel.ShowDateTo    = true;
                viewModel.ShowItem      = true;
                viewModel.ShowWarehouse = true;
                break;

            case EnumReports.RptStockItem:
                title = "Lap. Stok Per Gudang";
                viewModel.ShowItem      = true;
                viewModel.ShowWarehouse = true;
                break;

            case EnumReports.RptAnalyzeBudgetDetail:
                title = "Lap. Analisa Budget";
                viewModel.ShowItem      = true;
                viewModel.ShowWarehouse = true;
                break;

            case EnumReports.RptServiceOmzet:
                title = "Lap. Omzet Penjualan";
                viewModel.ShowShiftNo  = true;
                viewModel.ShowDateFrom = true;
                break;

            case EnumReports.RptCommissionRecap:
                title = "Lap. Rekap Komisi Terapis";
                viewModel.ShowDateFrom = true;
                viewModel.ShowDateTo   = true;
                break;

            case EnumReports.RptCommission:
                title = "Lap. Komisi Terapis";
                viewModel.ShowDateFrom = true;
                viewModel.ShowDateTo   = true;
                break;

            case EnumReports.RptCustomerBirthday:
                title = "Daftar Member Ulang Tahun";
                //viewModel.ShowDateFrom = true;
                //viewModel.ShowDateTo = true;
                break;
            }
            ViewData["CurrentItem"] = title;


            ViewData["ExportFormat"] = new SelectList(Enum.GetValues(typeof(EnumExportFormat)));

            return(View(viewModel));
        }
コード例 #2
0
        public ActionResult ReportTrans(EnumReports reports, EnumTransactionStatus TransStatus, EnumReportGroupBy?groupBy = null)
        {
            ReportParamViewModel viewModel = ReportParamViewModel.CreateReportParamViewModel(_mCostCenterRepository, _mWarehouseRepository, _mSupplierRepository, _tRecPeriodRepository, _mItemRepository);

            if (TransStatus != EnumTransactionStatus.None)
            {
                viewModel.TransStatus = TransStatus;
            }
            string title = Helper.CommonHelper.GetStringValue(reports);

            switch (reports)
            {
            case EnumReports.RptBrand:

                break;

            case EnumReports.RptCostCenter:
                break;

            case EnumReports.RptNeraca:
                viewModel.ShowCostCenter     = true;
                viewModel.ShowRecPeriod      = true;
                viewModel.ShowGenerateDetail = true;
                break;

            case EnumReports.RptLR:
                viewModel.ShowCostCenter     = true;
                viewModel.ShowRecPeriod      = true;
                viewModel.ShowGenerateDetail = true;
                break;

            case EnumReports.RptNeracaSum:
                viewModel.ShowRecPeriod      = true;
                viewModel.ShowGenerateDetail = true;
                break;

            case EnumReports.RptLRSum:
                viewModel.ShowRecPeriod      = true;
                viewModel.ShowGenerateDetail = true;
                break;

            case EnumReports.RptStockCard:
                viewModel.ShowDateFrom  = true;
                viewModel.ShowDateTo    = true;
                viewModel.ShowItem      = true;
                viewModel.ShowWarehouse = true;
                break;

            case EnumReports.RptStockItem:
                viewModel.ShowItem      = true;
                viewModel.ShowWarehouse = true;
                break;

            case EnumReports.RptAnalyzeBudgetDetail:
                viewModel.ShowDateFrom  = true;
                viewModel.ShowDateTo    = true;
                viewModel.ShowItem      = true;
                viewModel.ShowWarehouse = true;
                break;

            case EnumReports.RptTransDetail:
                title = string.Format(title, Helper.CommonHelper.GetStringValue(viewModel.TransStatus));
                switch (viewModel.TransStatus)
                {
                case EnumTransactionStatus.PurchaseOrder:
                    viewModel.ShowDateFrom  = true;
                    viewModel.ShowDateTo    = true;
                    viewModel.ShowWarehouse = true;
                    viewModel.ShowSupplier  = true;
                    break;

                case EnumTransactionStatus.Received:
                    viewModel.ShowDateFrom  = true;
                    viewModel.ShowDateTo    = true;
                    viewModel.ShowWarehouse = true;
                    viewModel.ShowSupplier  = true;
                    break;

                case EnumTransactionStatus.Purchase:
                    viewModel.ShowDateFrom  = true;
                    viewModel.ShowDateTo    = true;
                    viewModel.ShowWarehouse = true;
                    viewModel.ShowSupplier  = true;
                    break;

                case EnumTransactionStatus.ReturPurchase:
                    viewModel.ShowDateFrom  = true;
                    viewModel.ShowDateTo    = true;
                    viewModel.ShowWarehouse = true;
                    viewModel.ShowSupplier  = true;
                    break;

                case EnumTransactionStatus.Using:
                    viewModel.ShowDateFrom  = true;
                    viewModel.ShowDateTo    = true;
                    viewModel.ShowWarehouse = true;
                    break;

                case EnumTransactionStatus.Mutation:
                    viewModel.ShowDateFrom  = true;
                    viewModel.ShowDateTo    = true;
                    viewModel.ShowWarehouse = true;
                    break;

                case EnumTransactionStatus.Budgeting:
                    //viewModel.ShowDateFrom = true;
                    //viewModel.ShowDateTo = true;
                    viewModel.ShowWarehouse = true;
                    break;
                }

                break;

            case EnumReports.RptTransRecap:

                string groupByTitle = groupBy != null?Helper.CommonHelper.GetStringValue(groupBy) : string.Empty;

                title = string.Format(title, Helper.CommonHelper.GetStringValue(viewModel.TransStatus), groupByTitle);
                switch (viewModel.TransStatus)
                {
                case EnumTransactionStatus.PurchaseOrder:
                    viewModel.ShowDateFrom  = true;
                    viewModel.ShowDateTo    = true;
                    viewModel.ShowWarehouse = true;
                    viewModel.ShowSupplier  = true;
                    break;

                case EnumTransactionStatus.Received:
                    viewModel.ShowDateFrom  = true;
                    viewModel.ShowDateTo    = true;
                    viewModel.ShowWarehouse = true;
                    viewModel.ShowSupplier  = true;
                    break;

                case EnumTransactionStatus.Purchase:
                    viewModel.ShowDateFrom  = true;
                    viewModel.ShowDateTo    = true;
                    viewModel.ShowWarehouse = true;
                    viewModel.ShowSupplier  = true;
                    break;

                case EnumTransactionStatus.ReturPurchase:
                    viewModel.ShowDateFrom  = true;
                    viewModel.ShowDateTo    = true;
                    viewModel.ShowWarehouse = true;
                    viewModel.ShowSupplier  = true;
                    break;

                case EnumTransactionStatus.Using:
                    viewModel.ShowDateFrom  = true;
                    viewModel.ShowDateTo    = true;
                    viewModel.ShowWarehouse = true;
                    break;

                case EnumTransactionStatus.Mutation:
                    viewModel.ShowDateFrom  = true;
                    viewModel.ShowDateTo    = true;
                    viewModel.ShowWarehouse = true;
                    break;

                case EnumTransactionStatus.Budgeting:
                    //viewModel.ShowDateFrom = true;
                    //viewModel.ShowDateTo = true;
                    viewModel.ShowWarehouse = true;
                    break;
                }

                break;

            case EnumReports.RptItem:

                break;

            case EnumReports.RptJournal:
                viewModel.ShowDateFrom  = true;
                viewModel.ShowDateTo    = true;
                viewModel.ShowAccount   = false;
                viewModel.ShowAccountTo = false;
                break;

            case EnumReports.RptBukuBesar:
                viewModel.ShowDateFrom  = true;
                viewModel.ShowDateTo    = true;
                viewModel.ShowAccount   = true;
                viewModel.ShowAccountTo = true;
                break;

            case EnumReports.RptJournalByCostCenter:
                viewModel.ShowDateFrom   = true;
                viewModel.ShowDateTo     = true;
                viewModel.ShowCostCenter = true;
                viewModel.ShowAccount    = false;
                viewModel.ShowAccountTo  = false;
                break;

            case EnumReports.RptBukuBesarByCostCenter:
                viewModel.ShowDateFrom   = true;
                viewModel.ShowDateTo     = true;
                viewModel.ShowCostCenter = true;
                viewModel.ShowAccount    = true;
                viewModel.ShowAccountTo  = true;
                break;
            }
            ViewData["CurrentItem"]  = title;
            ViewData["ExportFormat"] = new SelectList(Enum.GetValues(typeof(EnumExportFormat)));

            return(View(viewModel));
        }
コード例 #3
0
        public ActionResult Report(EnumReports reports, DateTime?dateFrom = null, DateTime?dateTo = null, string customerId = null)
        {
            ReportParamViewModel viewModel = ReportParamViewModel.CreateReportParamViewModel(_mCostCenterRepository, _mWarehouseRepository, _mSupplierRepository, _tRecPeriodRepository, _mItemRepository);
            string title = string.Empty;

            switch (reports)
            {
            case EnumReports.RptBrand:
                title = "Daftar Master Merek";

                break;

            case EnumReports.RptCostCenter:
                title = "Daftar Master Cost Center";
                break;

            case EnumReports.RptJournal:
                title = "Daftar Jurnal";
                viewModel.ShowDateFrom   = true;
                viewModel.ShowDateTo     = true;
                viewModel.ShowCostCenter = true;
                break;

            case EnumReports.RptNeraca:
                title = "Laporan Neraca";
                viewModel.ShowDateFrom   = true;
                viewModel.ShowDateTo     = true;
                viewModel.ShowCostCenter = true;
                break;

            case EnumReports.RptLR:
                title = "Laporan Laba / Rugi";
                viewModel.ShowCostCenter = true;
                viewModel.ShowRecPeriod  = true;
                break;

            case EnumReports.RptStockCard:
                title = "Kartu Stok";
                viewModel.ShowDateFrom  = true;
                viewModel.ShowDateTo    = true;
                viewModel.ShowItem      = true;
                viewModel.ShowWarehouse = true;
                break;

            case EnumReports.RptStockItem:
                title = "Lap. Stok Per Gudang";
                viewModel.ShowItem      = true;
                viewModel.ShowWarehouse = true;
                break;

            case EnumReports.RptAnalyzeBudgetDetail:
                title = "Lap. Analisa Budget";
                viewModel.ShowItem      = true;
                viewModel.ShowWarehouse = true;
                break;

            case EnumReports.RptServiceOmzet:
                title = "Lap. Omzet Penjualan";
                viewModel.ShowDateFrom = true;
                viewModel.ShowDateTo   = true;
                break;

            case EnumReports.RptCommission:
                title = "Lap. Komisi Karyawan";
                viewModel.ShowDateFrom = true;
                viewModel.ShowDateTo   = true;
                break;

            case EnumReports.RptSalesByAction:
                title = "Lap. Penjualan Berdasar Jlh Tindakan";
                viewModel.ShowDateFrom = true;
                viewModel.ShowDateTo   = true;
                break;

            case EnumReports.RptBukuBesar:
                title = "Laporan Buku Besar";
                viewModel.ShowDateFrom   = true;
                viewModel.ShowDateTo     = true;
                viewModel.ShowCostCenter = true;
                break;

            case EnumReports.RptCommissionRecap:
                title = "Lap. Rekap Komisi Karyawan";
                viewModel.ShowDateFrom = true;
                viewModel.ShowDateTo   = true;
                break;

            case EnumReports.RptServiceByCustomer:
                title = "Lap. Tindakan Per Pasien";
                viewModel.ShowCustomer = true;
                viewModel.ShowDateFrom = true;
                viewModel.ShowDateTo   = true;

                viewModel.DateFrom   = dateFrom;
                viewModel.DateTo     = dateTo;
                viewModel.CustomerId = customerId;
                break;
            }
            ViewData["CurrentItem"] = title;


            ViewData["ExportFormat"] = new SelectList(Enum.GetValues(typeof(EnumExportFormat)));

            return(View(viewModel));
        }
コード例 #4
0
        public ActionResult ReportTrans(EnumReports reports, EnumTransactionStatus TransStatus)
        {
            ReportParamViewModel viewModel = ReportParamViewModel.CreateReportParamViewModel(_mWarehouseRepository, _mSupplierRepository, _mItemRepository);
            string title = string.Empty;

            switch (reports)
            {
            case EnumReports.RptBrand:
                title = "Daftar Master Merek";

                break;

            case EnumReports.RptStockCard:
                title = "Kartu Stok";
                viewModel.ShowDateFrom  = true;
                viewModel.ShowDateTo    = true;
                viewModel.ShowItem      = true;
                viewModel.ShowWarehouse = true;
                break;

            case EnumReports.RptStockItem:
                title = "Lap. Stok Per Gudang";
                viewModel.ShowItem      = true;
                viewModel.ShowWarehouse = true;
                break;

            case EnumReports.RptAnalyzeBudgetDetail:
                title = "Lap. Analisa Budget";
                viewModel.ShowItem      = true;
                viewModel.ShowWarehouse = true;
                break;

            case EnumReports.RptTransDetail:
                title = "Lap. Detail";
                viewModel.ShowDateFrom  = true;
                viewModel.ShowDateTo    = true;
                viewModel.ShowWarehouse = true;
                break;

            case EnumReports.RptTransDetailByTransBy:
                title = "Lap. Rekap Detail Transaksi";
                viewModel.ShowDateFrom = true;
                viewModel.ShowDateTo   = true;
                viewModel.ShowSupplier = true;
                break;

            case EnumReports.RptLRDetailSales:
                title = "Lap. Detail Laba Kotor";
                viewModel.ShowDateFrom = true;
                viewModel.ShowDateTo   = true;
                viewModel.ShowCustomer = true;
                break;

            case EnumReports.RptMostItemSales:
                title = "Lap. Penjualan Terbanyak";
                viewModel.ShowDateFrom  = true;
                viewModel.ShowDateTo    = true;
                viewModel.ShowWarehouse = true;
                break;
            }
            ViewData["CurrentItem"] = title;


            ViewData["ExportFormat"] = new SelectList(Enum.GetValues(typeof(EnumExportFormat)));

            return(View(viewModel));
        }