Advertisement
Guest User

Untitled

a guest
Jul 22nd, 2019
130
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.44 KB | None | 0 0
  1. <div class="table-responsive hidden" data-bind="css:{hidden : dataSource().length <= 0}, template: {afterRender: myPostProcessingLogic}">
  2. <table class="table table-bordered table-striped table-condensed">
  3. <thead>
  4. <tr>
  5. <th class="text-center">@AdminResource.Admin_Report_Location</th>
  6. <th class="text-center">@AdminResource.Admin_Report_Employee</th>
  7. <th class="text-center">@AdminResource.Admin_Report_TicketNumber</th>
  8. <th class="text-center">@AdminResource.Admin_Report_Date</th>
  9. <th class="text-center">@AdminResource.Admin_Report_Customer</th>
  10. <th class="text-center">@AdminResource.Admin_Report_SubTotal</th>
  11. <th class="text-center">@AdminResource.Admin_Report_Tax</th>
  12. <th class="text-center">@AdminResource.Admin_Report_Tips</th>
  13. <th class="text-center">@AdminResource.Admin_Report_Discount</th>
  14. <th class="text-center">@AdminResource.Admin_Report_SalesPreTax</th>
  15. <th class="text-center">@AdminResource.Admin_Report_SalesTotal</th>
  16. <th class="text-center">@AdminResource.Admin_Report_Paid</th>
  17. <th class="text-center">@AdminResource.Admin_Report_PaidPreTax</th>
  18. <th class="text-center">@AdminResource.Admin_Report_PaymentMethod</th>
  19. @if ((bool?)ViewBag.WithCreditCard != null)
  20. {
  21. if ((bool)ViewBag.WithCreditCard)
  22. {
  23. @:<th class="text-center">@AdminResource.Admin_Ticket_CreditCardLast4Digits</th>
  24. @:<th class="text-center">@AdminResource.Admin_Report_PaymentMethod</th>
  25. }
  26. }
  27. <th class="text-center"></th>
  28. </tr>
  29. </thead>
  30. <tbody data-bind="foreach: pagedDataSource">
  31. <tr>
  32. <td data-bind="text: Location"></td>
  33. <td data-bind="text: Employee"></td>
  34. <td data-bind="text: CustomReceiptNumber"></td>
  35. <td data-bind="textAsDateTime: UserOrderDate"></td>
  36. <td data-bind="text: CustomerFullName"></td>
  37. <td data-bind="textAsCurrency: SubTotal" class="amount-formated"></td>
  38. <td data-bind="textAsCurrency: Tax" class="amount-formated"></td>
  39. <td data-bind="textAsCurrency: Tips" class="amount-formated"></td>
  40. <td data-bind="textAsCurrency: Discount" class="amount-formated"></td>
  41. <td data-bind="textAsCurrency: SalesPreTax" class="amount-formated"></td>
  42. <td data-bind="textAsCurrency: OrderTotal" class="amount-formated"></td>
  43. <td data-bind="textAsCurrency: OrderPaid" class="amount-formated"></td>
  44. <td data-bind="textAsCurrency: PaidPreTax" class="amount-formated"></td>
  45. <td data-bind="text: PaymentMethod"></td>
  46. @if ((bool?)ViewBag.WithCreditCard != null)
  47. {
  48. if ((bool)ViewBag.WithCreditCard)
  49. {
  50. @:<td data-bind="text: CreditCardLast4"></td>
  51. @:<td data-bind="text: AuthorizationTransactionCode"></td>
  52. }
  53. }
  54. <td>
  55. <button type="button" class="btn btn-circle btn-bordered btn-inverse btn-to-primary" data-bind="click: $parent.previewTicket"><i style="margin: 0" class="fa fa-eye"></i></button>
  56. </td>
  57. </tr>
  58. </tbody>
  59. <tfoot>
  60. <tr>
  61. <td><strong data-bind="visible: Count">@AdminResource.Common_Total: <span data-bind="text: Count"></span></strong></td>
  62. <td></td>
  63. <td></td>
  64. <td></td>
  65. <td></td>
  66. <td><strong data-bind="textAsCurrency: SubTotalSum" class="amount-formated"></strong></td>
  67. <td><strong data-bind="textAsCurrency: TaxSum" class="amount-formated"></strong></td>
  68. <td><strong data-bind="textAsCurrency: TipsSum" class="amount-formated"></strong></td>
  69. <td><strong data-bind="textAsCurrency: DiscountSum" class="amount-formated"></strong></td>
  70. <td><strong data-bind="textAsCurrency: OrderPreTaxSum" class="amount-formated"></strong></td>
  71. <td><strong data-bind="textAsCurrency: OrderTotalSum" class="amount-formated"></strong></td>
  72. <td><strong data-bind="textAsCurrency: OrderPaidSum" class="amount-formated"></strong></td>
  73. <td><strong data-bind="textAsCurrency: PaidPreTaxSum" class="amount-formated"></strong></td>
  74. <td></td>
  75. <td></td>
  76. </tfoot>
  77. </table>
  78. @RenderPage("~/Views/Shared/Partial/_PagedDataSourceControl.cshtml")
  79.  
  80. @{
  81. ViewBag.Title = AdminResource.Admin_Navigation_SalesByPaymentMethodTypeReport;
  82. Layout = "~/Views/Shared/_LayoutMaterial.cshtml";
  83. }
  84. @section ReportHeader{
  85. @Html.MaterialReportHeader((string)ViewBag.Title, (bool)@ViewBag.IsFavorite)
  86. }
  87.  
  88. <div class="row">
  89. <div class="col-md-6">
  90. @if (ViewBag.IsReportsByRevenueDate)
  91. {
  92. @Html.QuickDateTimes(null, null, "MM/dd/yyyy hh:mm tt")
  93. }
  94. else
  95. {
  96. @Html.QuickDates(null, null)
  97. }
  98. </div>
  99. <div class="col-md-4">
  100.  
  101. <div class="form-group bmd-form-group m-b-20">
  102. @Html.LabelFor(m => m.SelectedCompanies, new { @class = "bmd-label-static" })
  103. @if (ViewBag.LocationsDropDownTreeItems.Count > 0)
  104. {
  105. @Html.BootstrapDropDownTreeViewList((List<IConnect.Domain.Reports.DropDownTreeItem>)ViewBag.LocationsDropDownTreeItems);
  106. }
  107. else
  108. {
  109. <select class="form-control" data-bind="kendoMultiSelect: { data: locationsDTO, dataTextField: 'Name', dataValueField: 'Id', value: selectedLocations, placeholder: 'All' }"></select>
  110. }
  111. </div>
  112. <div class="form-group bmd-form-group m-b-20">
  113. @Html.LabelFor(m => m.SelectedEmployees, new { @class = "bmd-label-static" })
  114. <select class="form-control" id="ddlEmployees" data-bind="kendoMultiSelect: { data: employeesDTO, dataTextField: 'Name', dataValueField: 'Id', value: selectedEmployees, placeholder: '@AdminResource.Common_All', open: onEmployeesDDLOpening }"></select>
  115. </div>
  116. <div class="form-group bmd-form-group m-b-20">
  117. @Html.LabelFor(m => m.SelectedPaymentMethods, new { @class = "bmd-label-static" })
  118. <select class="form-control" data-bind="kendoMultiSelect: { data: paymentMethodsDTO, dataTextField: 'Name', dataValueField: 'Id', value: selectedPaymentMethods, placeholder: '@AdminResource.Common_All' }"></select>
  119. </div>
  120. </div>
  121.  
  122. </div>
  123. **<div class="horizontal-scroll" , id="partdetail">
  124. @RenderPage("Partial/_Details.cshtml")
  125. </div>**
  126.  
  127. self.selectedPaymentMethods.subscribe(function () {
  128. debugger;
  129. var cyclenumber = 0;
  130. if (self.selectedPaymentMethods().length == 0)
  131. cyclenumber = self.selectedPaymentMethods().length;
  132. else
  133. cyclenumber = self.paymentMethodsDTO().length;
  134. console.log(self.paymentMethodsDTO().length);
  135. console.log(self.selectedPaymentMethods().length);
  136. for (var i = 0; i < cyclenumber; i++) {
  137. if (self.paymentMethodsDTO()[i] == 5){
  138. @{
  139. ViewBag.WithCreditCard = true;
  140. }
  141. }
  142. else
  143. if (self.selectedPaymentMethods()[i] == 5){
  144. @{
  145. ViewBag.WithCreditCard = true;
  146. }
  147. }
  148. }
  149.  
  150. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement