
  <?php
  		include_once("../php/config.php");
        $sql = mysql_query("select * from kardex where almacen like '%".$_GET['almacen']."%' and fecha='$hoy' order by fecha desc") or die(mysql_error());



        $c = mysql_num_rows($sql);
     
	?>
	



	<div class="table-responsive border p-3">
					<table class="table table-hover table-striped table-sm
" data-page-length='8' style="width: 100%">
						<thead>
							<th># movimiento</th>
							<th>Fecha</th>
							<th>Codigo</th>
              				<th>Descripcion</th>
             
             
             
                <th>Cantidad</th>
                 <th>Almacen</th>
                 <th>Concepto</th>
                 <th>Tipo mov.</th>
                 <th>Aplicado por</th>
              <th>Editar</th>
						</thead>
						<tbody>
            <?php while($r=mysql_fetch_array($sql)){
					$c++;

            	?>
							<tr>
				<td><?php echo $r["id_kardex"]?></td>
				<td><?php echo $r["hora"]?></td>
                <td><span class="text-primary"><?php echo $r["codigo"]?></span></td>
				<td><?php echo $r["descripcion"]?></td>
				 <td><?php echo $r["cantidad"]?></td>
               <td><?php echo $r["almacen"]?></td>
               
                 <td><?php echo $r["concepto"]?></td>
                 <td><?php echo $r["tipo"]?></td>
                  <td><?php echo $r["usuario"]?></td>
               <td><a class="" href="#modalProducto" data-toggle="modal" onClick='ver(<?php echo $r["id_producto"]?>)'><i class="fa fa-edit"></i></a></td>
							</tr>
                                                        <?php }?>
						</tbody>
						<tfoot>
							<th>Cant. lineas: <?php echo $c;?></th>
							
						</tfoot>
					</table>
				</div>

<script type="text/javascript">
	
	$("table").DataTable({
   "language": {
            "url": "//cdn.datatables.net/plug-ins/9dcbecd42ad/i18n/Spanish.json"
        }
});

</script>
