{% extends "djmicrosip_inventarios\base.html" %}
{% block title %}Inventarios Fisicos{% endblock %}

<!-- CSS Code -->
{% block style_css %}{% endblock %}

<!-- JavaScript Code -->
{% block js_code %}
{% endblock %}

{% block breadcrumb %}{{ block.super }} <li class='active'> Almacenes </li>{% endblock %}
{% block content %}
 
<div class="page-header">
    <h1>Almacenes</h1>
</div>
<table class="table table-striped table-hover">
    <tr>
      <th>Nombre</th>
      <th></th>
    </tr>


    {% for almacen in object_list %}
    </tr>
      <td>{{ almacen.nombre }}</td>
      <td>
      {% if almacen.inventariando %}
        <a href="/inventarios/inventarios_fisicos/{{ almacen.ALMACEN_ID }}/" class="btn btn-default"><i class="glyphicon glyphicon-list-alt"></i> inventario fisico</a>
      {% else %}
        
        {% if request.user.username = 'SYSDBA' %}
        <a href="/inventarios/almacenes/abririnventario/{{ almacen.ALMACEN_ID }}/" class='btn btn-default' ><i class="glyphicon glyphicon-folder-open"></i> Abrir inventario fisico</a>
        {% else %}
        <div class="alert alert-warning" role="alert">No estas Autorizado para abrir inventarios</div>
        {% endif %}
      {% endif %}
      </td>
    </tr>
    {% endfor %}


</table>


{% endblock %}