opened_cash_registers.html.erb 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  1. <div class="page-container">
  2. <!-- BEGIN CONTENT -->
  3. <div class="page-content-wrapper">
  4. <!-- BEGIN CONTENT BODY -->
  5. <!-- BEGIN PAGE HEAD-->
  6. <div class="page-head">
  7. <div class="container-fluid">
  8. <!-- BEGIN PAGE TITLE -->
  9. <div class="page-title">
  10. <h1>Cajas abiertas</h1>
  11. </div>
  12. <!-- END PAGE TITLE -->
  13. </div>
  14. </div>
  15. <!-- END PAGE HEAD-->
  16. <!-- BEGIN PAGE CONTENT BODY -->
  17. <div class="page-content">
  18. <div class="container-fluid">
  19. <%= link_to cash_outs_path(:filter => @filter, :current_page => @current_page), {:class=>"btn blue-hoki pull-right margin-bottom-10"} do %> <i class="fa fa-angle-left "></i> Regresar
  20. <% end %>
  21. <!-- BEGIN PAGE BREADCRUMBS -->
  22. <ul class="page-breadcrumb breadcrumb">
  23. <%= render_breadcrumbs :tag => :li, :separator => ' <i class="fa fa-circle"></i> ' %>
  24. </ul>
  25. <!-- END PAGE BREADCRUMBS -->
  26. <!-- BEGIN PAGE CONTENT INNER -->
  27. <div class="page-content-inner">
  28. <div id="notice">
  29. <% if success %>
  30. <div class="alert alert-success">
  31. <p><%= success %></p>
  32. </div>
  33. <% elsif warning %>
  34. <div class="alert alert-warning">
  35. <p><%= warning %></p>
  36. </div>
  37. <% end %>
  38. </div>
  39. <div class="row">
  40. <div class="col-md-12">
  41. <div class="portlet light ">
  42. <div class="portlet-title">
  43. <div class="caption">
  44. <i class="fa fa-list "></i>
  45. <span class="caption-subject bold uppercase">Lista de cajas abiertas</span>
  46. </div>
  47. </div>
  48. <div class="portlet-body">
  49. <table class="table table-striped table-bordered table-hover tableadvanced" id="cash_outs_table">
  50. <thead>
  51. <tr>
  52. <th>#</th>
  53. <th>Punto de venta</th>
  54. <th>Caja registradora</th>
  55. <th>Ingresos</th>
  56. <th>Egresos</th>
  57. <th>Total</th>
  58. <th>Usuario</th>
  59. <th>Hora apertura</th>
  60. </tr>
  61. </thead>
  62. <tbody>
  63. <% @opened_cash_registers.each_with_index do |open_cash, key| %>
  64. <tr>
  65. <td><%= key + 1 %></td>
  66. <td>
  67. <%= OpenCashRegister.get_pointsale(open_cash.id, "open_cash_register").name %>
  68. </td>
  69. <td><%= open_cash.cash_register.name %> </td>
  70. <td>
  71. <% amount_in = CashRegistersMove.where(:open_cash_register => open_cash.id, :move_type => 1).sum(:quantity) %>
  72. <%= number_to_currency(amount_in, precision: 2) %>
  73. </td>
  74. <td>
  75. <% amount_out = CashRegistersMove.where(:open_cash_register => open_cash.id, :move_type => 0).sum(:quantity) %>
  76. <%= number_to_currency(amount_out, precision: 2) %>
  77. </td>
  78. <td>
  79. <%= number_to_currency((amount_in - amount_out), precision: 2) %>
  80. </td>
  81. <td><%= open_cash.user.first_name %></td>
  82. <td><%= l(open_cash.created_at, :format => '%I:%M %p') %></td>
  83. </tr>
  84. <% end %>
  85. </tbody>
  86. </table>
  87. </div>
  88. </div>
  89. </div>
  90. </div>
  91. </div>
  92. <!-- END PAGE CONTENT INNER -->
  93. </div>
  94. </div>
  95. <!-- END PAGE CONTENT BODY -->
  96. <!-- END CONTENT BODY -->
  97. </div>
  98. <!-- END CONTENT -->
  99. </div>
  100. <!-- END CONTAINER