Advertisement
xxxxbe

store3

Jul 7th, 2020
797
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.80 KB | None | 0 0
  1. @extends('layouts.app')
  2. @section('css')
  3. <meta name="csrf-token" content="{{ csrf_token() }}">
  4. @stop
  5. @section('content')
  6. <section class="content">
  7. <div class="box">
  8. <div class="box-header with-border">
  9. <div class="row">
  10. <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
  11. <h3>Listado de Ventas
  12. <a href="{{route('venta.create')}}">
  13. <button class="btn btn-success"><i class="fa fa-plus-circle"></i> Nueva Venta</button>
  14. </a>
  15. @role('corredor|admin')
  16. <a href="{{route('reserva.create')}}">
  17. <button class="btn btn-success"><i class="fa fa-plus-circle"></i> Nuevo Pedido</button>
  18. </a>
  19. @endrole
  20. </h3>
  21. </div>
  22. </div>
  23. <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
  24. <div class="row">
  25. <div class="col-lg-5 col-md-5 col-sm-5 col-xs-12">
  26. <div class='input-group date' id='datetimepicker5'>
  27. <input type='date' name="start_date" id="start_date" class="form-control" placeholder="Inicio de Fecha" />
  28. <span class="input-group-addon"><span class="glyphicon glyphicon-calendar"></span></span>
  29. </div>
  30. </div>
  31. <div class="col-lg-5 col-md-5 col-sm-5 col-xs-12">
  32. <div class='input-group date' id='datetimepicker7'>
  33. <input type="date" name="end_date" id="end_date" class="form-control" placeholder="Final Fecha"/>
  34. <span class="input-group-addon"><span class="glyphicon glyphicon-calendar"></span></span>
  35. </div>
  36. </div>
  37. <div class="col-lg-2 col-md-2 col-sm-2 col-xs-12">
  38. <button id="btnFiterSubmitSearch" class="btn btn-info"><i class="fa fa-search"></i> Aplicar Filtro</button>
  39. </div>
  40. </div>
  41. </div>
  42. @foreach($ventas as $ven)
  43. @include('ventas.venta.modal')
  44. @endforeach
  45. <div class="row">
  46. <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
  47. <br>
  48. <div class="table-responsive">
  49. <table id="ven" class="table table-striped table-bordered table-condensed table-hover">
  50. <thead>
  51. <th>Fecha</th>
  52. <th>Cliente</th>
  53. <th>Comprobante</th>
  54. <th>Impuesto</th>
  55. <th>Total</th>
  56. <th>Estado</th>
  57. <th>Opciones</th>
  58. </thead>
  59. </table>
  60. </div>
  61. </div>
  62. </div>
  63. </div>
  64. </div>
  65. </section>
  66. @endsection
  67. @section('js')
  68. <script>
  69. $(document).ready(function () {
  70. $('[data-toggle="tooltip"]').tooltip();
  71. });
  72. $.ajaxSetup({
  73. headers: {
  74. 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
  75. }
  76. });
  77. $('#ven').DataTable({
  78. processing: true,
  79. serverSide: true,
  80. iDisplayLength: 10,
  81. order: [[2, "desc"]],
  82. ajax: {
  83. url: "{{route('venta.tabla')}}",
  84. type: 'GET',
  85. data: function (d) {
  86. d.start_date = $('#start_date').val();
  87. d.end_date = $('#end_date').val();
  88. },
  89. },
  90. columns: [
  91. {data: 'fecha', name: 'fecha'},
  92. {data: 'cliente', name: 'cliente'},
  93. {data: 'comprobante', name: 'comprobante'},
  94. {data: 'impuesto', name: 'impuesto'},
  95. {data: 'total_venta', name: 'total_venta'},
  96. {data: 'estado', name: 'estado'},
  97. {data: 'opcion', name: 'opcion', orderable: false, searchable: false}
  98. ],
  99. "language": {
  100. "url": "{{URL::to('/')}}/admin/Spanish.json"
  101. }
  102.  
  103. });
  104. $('#btnFiterSubmitSearch').click(function () {
  105. $('#ven').DataTable().ajax.reload();
  106. });
  107. </script>
  108. @stop
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement