<?
$r = "../";
require_once($r."inc/funciones.php");
validNotSession($r);
$iduser=$_SESSION['userid'];
$mysqli = connectDB($r);
$row1 = $mysqli->query("SELECT * FROM z_pedidos INNER JOIN z_pedido WHERE `fechasalida` BETWEEN '2018-09-20 09:00:06' AND '2018-09-22 11:34:06' AND z_pedidos.codigopedido = z_pedido.codigopedido ");
?>
<!DOCTYPE html>
<html lang="en">
  <?php include $r."inc/head.php"; ?>
<body class="fixed-nav sidenav-toggled sticky-footer bg-dark" id="page-top">
  <?php include $r."inc/nav.php"; ?>
  <div class="content-wrapper">
    <div class="container-fluid">
      <div class="card mb-3">
        <div class="h3 card-header">
          <i class="fa fa-table"></i> CANTIDA ACTUAL EN INVENTARIO</div>
        <div class="card-body">
          <div class="table-responsive">
            <table class="table table-bordered" id="dataTable" width="100%" cellspacing="0">
              <thead>
                <tr>
                  <th>Codigo</th>
                  <th>Nombre</th>
                  <th>Cantidad</th>
                  <th>fechasalida</th>
                </tr>
              </thead>
                <? while($row2=$row1->fetch_assoc()){?>
                <tr>
                    <td><? echo $row2['codigopedido'];?></td>
                    <td><? echo $row2['idproducto'];?></td>
                    <td><? echo $row2['cantidad'];?></td>
                    <td><? echo $row2['fechasalida'];?></td>
                
                </tr>
                <? } ?>
                
              <tbody>
            </table>
          </div>
        </div>
      </div>
      <input type="button" class="btn btn-primary float-left" value="Atras" name="Back2" onclick="history.back()" />
    </div>
  </div>
  <?php include $r."inc/foot.php"; ?>
</body>
</html>   
