    <?php
    include ("header.php");
    $sql="SELECT * FROM `productos` WHERE pro_activo = 1 and pro_tipo <> 'servicios'";
    $resultado = mysqli_query($mysqli, $sql);
    ?>

            <div class="content-wrapper">
                <!-- START PAGE CONTENT-->
                <div class="page-heading">
                    <h1 class="page-title">Inventario</h1>
                    <ol class="breadcrumb">
                        <li class="breadcrumb-item">
                        <button onclick="location.href='ninventario.php'" type="button" class="btn btn-primary">Ingresar o Egresar</button>
                        <button onclick="location.href='impinventario.php'"  target="_blank" type="button" class="btn btn-primary">Imprimir</button>
                        </li>
                      <li class="breadcrumb-item"></li>
                    </ol>
                </div>
               <div class="page-content fade-in-up">
                    <div class="row">
                        <div class="col-xl-12">
                            <div class="ibox">
                                <div class="ibox-head">
                                <div class="ibox-title">Listado de equipos e insumos</div>
                            </div>
                            <div class="ibox-body">
                            <table class="table table-striped table-bordered table-hover" id="dataTableInventario" cellspacing="0" width="100%">
                                <thead>
                                    <tr>
                                            <th> STATUS </th>
                                           <th> NOMBRE </th>
                                           <th> TIPO </th>
                                            <th> EXISTENCIA </th>
                                           <th> MINIMO </th>
                                            <th>INVENTARIO</th>
                                        </tr>
                                </thead>
                                   <tbody>
                                        <?php $NUM=0;while($row = mysqli_fetch_array($resultado)) { $NUM=$NUM+1?>
                                        <tr>
                                            <td><?php
                                            if ($row['pro_cantidad'] > $row['pro_minimo'])
                                                echo '<i class="fa fa-check text-success"></i>';
                                            if (($row['pro_cantidad'] <= $row['pro_minimo']) && ($row['pro_cantidad'] > 0))
                                                echo '<i class="fa fa-warning text-warning"></i>';
                                            if ($row['pro_cantidad'] == 0)
                                                echo '<i class="fa fa-warning text-danger"></i>';
                                            ?></td>
                                            <td><?php echo $row['pro_nombre']; ?></td>
                                            <td><?php echo $row['pro_tipo']; ?></td>
                                            <td><?php echo $row['pro_cantidad']; ?></td>
                                            <td> <?php echo $row['pro_minimo']; ; ?></td>
                                            <td> <a href="ninventario.php?id=<?php echo $row['pro_id']; ?>"><div class="icon-item"><i class="fa fa-file-text-o"></i></div></a> </td>
                                        </tr>
                                        <?php } ?>
                                    </tbody>
                            </table>
                            </div>
                        </div>
                    </div>
        </div>
    <?php
        include ('footer.php');
    ?>
