Exemplo n.º 1
0
        public ActionResult MSTInvoice()
        {
            MSTInvoiceBillingReportingViewModel viewModel =
                BillingReportingHelper.GenerateMSTInvoiceBillingReportingViewModel();

            return(View(viewModel));
        }
Exemplo n.º 2
0
        public ActionResult AppendixItems_Read([DataSourceRequest] DataSourceRequest request, string bilDoc)
        {
            Contract serviceModel;

            try
            {
                serviceModel =
                    WCFClientManager.SAPServiceClient.GetBillingsToPrintAppendix(UserManagementHelper.GetSessionId(),
                                                                                 bilDoc) as Contract;
            }
            catch (Exception ex)
            {
                ErrorSignal.FromCurrentContext().Raise(ex);
                return(Json(JsonRequestBehavior.AllowGet));
            }

            var viewModel = BillingReportingHelper.GenerateBillingItemsViewModel(serviceModel);

            var result = viewModel.AppendixTableViewModels.ToDataSourceResult(request);
            var json   = Json(result, JsonRequestBehavior.AllowGet);

            json.MaxJsonLength = int.MaxValue;

            return(json);
        }
Exemplo n.º 3
0
        public ActionResult BillingServiceRequest(BillingServiceRequestViewModel viewModel)
        {
            if (!ModelState.IsValid)
            {
                ModelState.AddModelError("", ErrorResource.FormFieldNotValid);
                viewModel = BillingReportingHelper.GenerateBillingServiceRequestViewModel();
                return(View(viewModel));
            }

            viewModel = BillingReportingHelper.GenerateBillingServiceRequestViewModel();
            return(View(viewModel));
        }
Exemplo n.º 4
0
        public ActionResult GenerateInvoice(string bilDoc)
        {
            RunPrintBillingsDTO serviceModel;

            try
            {
                serviceModel =
                    WCFClientManager.SAPServiceClient.GetBillingsToPrintTotal(UserManagementHelper.GetSessionId(),
                                                                              bilDoc) as RunPrintBillingsDTO;
            }
            catch (Exception ex)
            {
                ErrorSignal.FromCurrentContext().Raise(ex);
                return(RedirectToAction("Index", "Error"));
            }
            ReportInvoiceViewModel invoiceViewModel = BillingReportingHelper.GenerateInvoiceViewModel(serviceModel);

            HeaderInvoice(bilDoc);
            return(GenerateInvoicePdf(invoiceViewModel, bilDoc));
        }
Exemplo n.º 5
0
        public JsonResult BillingDocument(MSTInvoiceBillingReportingViewModel iModel)
        {
            BillingNumberItemDTO[] billingNumber;
            try
            {
                var dateFrom = DictionaryHelper.KendoDatePickerDateStringToDateTime(iModel.DateFromValue);
                var dateTo   = DictionaryHelper.KendoDatePickerDateStringToDateTime(iModel.DateToValue);
                billingNumber =
                    WCFClientManager.SAPServiceClient.QueryBillingNumbers(UserManagementHelper.GetSessionId(),
                                                                          iModel.SoldToFromValue, dateFrom, dateTo);
            }
            catch (Exception)
            {
                return(Json(new { html = ErrorResource.WCFCannotGetObjectHTML }));
            }

            var viewModel    = BillingReportingHelper.GeneratePopupBillingDocumentViewModel(billingNumber, iModel);
            var renderedHtml = ViewHelper.RenderPartialViewToString(this, "_PartialPopupBillingDocumentListBilling",
                                                                    viewModel);

            return(Json(new { html = renderedHtml }));
        }
Exemplo n.º 6
0
        public ActionResult DetailSubMaterialDescription()
        {
            RunPrintBillingsDTO serviceModel = null;

            try
            {
                serviceModel =
                    WCFClientManager.SAPServiceClient.GetBillingsToPrint(UserManagementHelper.GetSessionId(),
                                                                         "1960007091") as RunPrintBillingsDTO;
            }
            catch (Exception)
            {
                var mockedServiceModel = BillingReportingHelper.GenerateMockedInvoiceDetailViewModel();
                var mock = BillingReportingHelper.GenerateInvoiceViewModel(mockedServiceModel);
                return(View(mock));
            }

            var viewModel = BillingReportingHelper.GenerateInvoiceViewModel(serviceModel);

            return(View(viewModel));

            //return RedirectToAction("GenerateInvoice");
        }
Exemplo n.º 7
0
        public ActionResult BillingServiceRequest()
        {
            var viewModel = BillingReportingHelper.GenerateBillingServiceRequestViewModel();

            return(View(viewModel));
        }
Exemplo n.º 8
0
        public ActionResult MSTInvoice(PopupBillingDocumentViewModel iModel)
        {
            var viewModel = BillingReportingHelper.GenerateMSTInvoiceBillingReportingViewModel(iModel);

            return(View(viewModel));
        }