		<!-- 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>Clientes </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 clientes</span>
											</div>
											<div class="actions">
												<% if can? :create, Customer %>
												<%= link_to new_customer_path, {:class=>"btn bold green pull-right filtros"} do %> Nuevo Cliente <i class="fa fa-plus"></i>
												<% end %>
												<% end %>
											</div>
										</div>
										<div class="portlet-body">
											<input type='hidden' name='filter' id='filter' value='<%= @filter %>' >
											<input type='hidden' name='current_page' id='current_page' value='<%= @current_page %>' >
											<table class="table table-striped table-bordered table-hover tableadvanced">
												<thead>
													<tr>
														<th>#</th>
														<th>Cliente</th>
														<th>RFC</th>
														<th>Teléfono</th>
														<th>Inf. crédito</th>
														<th>Status</th>
														<th width="15%">Acciones</th>
													</tr>
												</thead>
												<tbody>
													<% @customers.each_with_index do |customer, key| %>
													<tr>
														<td><%= key + 1 %></td>
														<td><%= customer.nick_name %> </td>
														<td><% if !customer.billing_information.nil? %>
															<%= customer.billing_information.name %>
														<% end %> </td>
														<td><%= customer.phone %></td>
														<td>
															<% if customer.credit %>
																<span class="label label-sm label-success"> <i class="fa fa-check"></i> Crédito </span> <br> $ <%= customer.credit_limit %>, <%= customer.time_limit %> día(s)
															<% else %>
																<span class="label label-sm label-danger"> <i class="fa fa-times"></i> Crédito no otorgado </span>
															<% end %>
														</td>
														<td>
															<% if customer.status == "inactive" %>
																<i class='fa fa-times fa-2 font-red'></i> 
															<% else %> 
																<i class='fa fa-check fa-2 font-green'></i> 
															<% end %>
														</td>
														<td>
															<%= link_to customer, {:class=>"btn btn-icon-only default filtros", :title=>"Ver cliente"} do %>
																<i class="fa fa-search"></i>
															<% end %>
														<% if can? :update, Customer %>
															<%= link_to edit_customer_path(customer), {:class=>"btn btn-icon-only btn-primary filtros", :title=>"Editar cliente"} do %>
																<i class="fa fa-edit"></i>
															<% end %>
														<% end %>
														<% if customer.active? && customer.is_public == 0 %>
															<%= link_to customer_update_status_path(customer), :class=>"btn btn-icon-only default", :title=>"Desactivar cliente", data: { confirm: '¿Esta seguro de desactivar el cliente?', method: 'post'}  do %>
																<i class="fa fa-toggle-off"></i>
															<% end %>
														<% elsif customer.inactive? %>
															<%= link_to customer_update_status_path(customer), :class=>"btn btn-icon-only green-jungle", :title=>"Activar cliente", data: { confirm: '¿Esta seguro de activar el cliente?', method: 'post'}  do %>
																<i class="fa fa-toggle-on"></i>
															<% end %>
														<% end %>					
														<% if can? :destroy, Customer %>
															<% unless customer.get_debiting > 0 || customer.is_public == 1 %>
																<%= link_to customer , method: :delete, :class => "btn btn-icon-only btn-danger", :title=>"Eliminar cliente", data: { confirm: '¿Esta seguro de eliminar al cliente?'}   do %> 
																	<i class="fa fa-trash-o"></i>
																<% end %>								
															<% end %>
														<% end %>
														</td>
													</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 -->