public ActionResult MSTInvoice() { MSTInvoiceBillingReportingViewModel viewModel = BillingReportingHelper.GenerateMSTInvoiceBillingReportingViewModel(); return(View(viewModel)); }
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); }
public ActionResult BillingServiceRequest(BillingServiceRequestViewModel viewModel) { if (!ModelState.IsValid) { ModelState.AddModelError("", ErrorResource.FormFieldNotValid); viewModel = BillingReportingHelper.GenerateBillingServiceRequestViewModel(); return(View(viewModel)); } viewModel = BillingReportingHelper.GenerateBillingServiceRequestViewModel(); return(View(viewModel)); }
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)); }
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 })); }
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"); }
public ActionResult BillingServiceRequest() { var viewModel = BillingReportingHelper.GenerateBillingServiceRequestViewModel(); return(View(viewModel)); }
public ActionResult MSTInvoice(PopupBillingDocumentViewModel iModel) { var viewModel = BillingReportingHelper.GenerateMSTInvoiceBillingReportingViewModel(iModel); return(View(viewModel)); }