		<!-- BEGIN CONTAINER -->
		<div class="page-container">
			<!-- BEGIN CONTENT -->
			<div class="page-content-wrapper">
				<!-- BEGIN CONTENT BODY -->
				<!-- BEGIN PAGE HEAD-->
				<div class="page-head">
					<div class="container-fluid">
						<!-- BEGIN PAGE TITLE -->
						<div class="page-title">
							<h1>Cajas registradoras</h1>
						</div>
						<!-- END PAGE TITLE -->
					</div>
				</div>
				<!-- END PAGE HEAD-->
				<!-- BEGIN PAGE CONTENT BODY -->
				<div class="page-content">
					<div class="container-fluid">
						<!-- BEGIN PAGE BREADCRUMBS -->
						<ul class="page-breadcrumb breadcrumb">
							<%= render_breadcrumbs :tag => :li, :separator => ' <i class="fa fa-circle"></i> ' %>
						</ul>
						<!-- END PAGE BREADCRUMBS -->
						<!-- BEGIN PAGE CONTENT INNER -->
						<div class="page-content-inner">
							<div id="notice">
								<% if success %> 
								<div class="alert alert-success">
									<p><%= success %></p>
								</div>
								<% elsif warning %>
								<div class="alert alert-warning">
									<p><%= warning %></p>
								</div>
								<% end %>
							</div>
							<div class="row">
								<div class="col-md-12">
									<div class="portlet light ">
										<div class="portlet-title">
											<div class="caption">
												<i class="fa fa-list "></i>
												<span class="caption-subject bold uppercase">Lista de cajas registradoras</span>
											</div>
											<div class="actions">
												<% if can? :create, CashRegister %>
												<%= link_to new_cash_register_path, {:class=>"btn bold green pull-right"} do %> Nueva Caja registradora <i class="fa fa-plus"></i>
												<% end %>
												<% end %>
											</div>
										</div>
										<div class="portlet-body">
											<table class="table table-striped table-bordered table-hover tableadvanced">
												<thead>
													<tr>
														<th>#</th>
														<th>Nombre</th>
														<th>Descripción</th>
														<% if current_user.usertype == "A" %><th>Punto de venta</th> <% end %>
														<th>Status</th>
														<% if can? :manage, CashRegister %>
														<th>Acciones</th> 
														<% end %>
													</tr>
												</thead>
												<tbody>
													<% @cash_registers.each_with_index do |cash_register, key| %>
													<tr>
														<td><%= key + 1 %></td>
														<td><%= cash_register.name %></td>
														<td><%= cash_register.description %></td>
														<% if current_user.usertype == "A" %><td><%= cash_register.pointsale.name %> </td> <% end %>
														<td class="text-center"><% if cash_register.status == "active" %>
																<i class="fa fa-check font-green"></i>
																<% else %>
																<i class="fa fa-times font-red"></i>
																<% end %>
														</td>
														<% if can? :manage, CashRegister %>
														<td class="text-center">
															<%= link_to edit_cash_register_path(cash_register), {:class=>"btn btn-icon-only btn-primary", :title=>"Editar caja registradora"} do %> <i class="fa fa-edit"></i>
															<% end %>
															<% if !cash_register.main? && cash_register.open_cash_registers.where("status = 0").count == 0 %>
																<% if cash_register.active? %>
									                              <%= link_to cash_register_update_status_path(cash_register), :class=>"btn btn-icon-only default", :title=>"Desactivar caja registadora", data: { confirm: '¿Esta seguro de desactivar la caja registadora?', method: 'post'}  do %>
									                                <i class="fa fa-toggle-off"></i>
									                              <% end %>
									                            <% elsif cash_register.inactive? %>
									                              <%= link_to cash_register_update_status_path(cash_register), :class=>"btn btn-icon-only green-jungle", :title=>"Activar caja registadora", data: { confirm: '¿Esta seguro de activar la caja registadora?', method: 'post'}  do %>
									                                <i class="fa fa-toggle-on"></i>
									                              <% end %>
									                            <% end %>
																<%= link_to cash_register_path(cash_register), method: :delete, :class => "btn btn-icon-only btn-danger", :title=>"Eliminar caja registradora", data: { confirm: '¿Esta seguro de eliminar la caja registradora?'}   do %>  <i class="fa fa-trash-o"></i>
																<% end %>      
															<% end %>                                     
														</td>
														<% end %>
													</tr>
												<% end %>
												</tbody>
											</table>
										</div>
									</div>
								</div>
							</div>
						</div>
						<!-- END PAGE CONTENT INNER -->
					</div>
				</div>
				<!-- END PAGE CONTENT BODY -->
				<!-- END CONTENT BODY -->
			</div>
			<!-- END CONTENT -->
		</div>
		<!-- END CONTAINER -->