<?php

include_once "../../class/pedidopendiente.php";
$pedidopendiente = new pedidopendiente();
extract($_POST);
$fechaentregaestimada = $fechaentregaestimada != "" ? $fechaentregaestimada : '%';
$dat = $pedidopendiente->mostrarTodoRegistro(" nombrecliente LIKE '{$nombrecliente}%' and cicliente LIKE '{$cicliente}%' and fechaentregaestimada LIKE '{$fechaentregaestimada}'", 1, "fecha,hora,nombrecliente,cicliente");
?>
<table class="table table-bordered table-striped table-hover">
<thead>
<tr><th width="50">Nº</th><th>Nombre Cliente</th><th>C.I. Cliente</th><th>Celular Cliente</th><th>Fecha Estimada de Entrega</th></tr>
</thead>
<?php 
foreach ($dat as $d) {
    $i++;
    ?>
<tr>
    <td class="der"><?php 
    echo $i;
    ?>
</td>
    <td><?php 
    echo $d['nombrecliente'];
    ?>
</td>
    <td><?php 
    echo $d['cicliente'];
    ?>
</td>
    <td><?php 
    echo $d['celularcliente'];
    <td class="der <?php 
    echo $error;
    ?>
"><?php 
    echo $totalstock;
    ?>
</td>
</tr>
<?php 
}
?>
</table>
<?php 
include_once "../../class/pedidopendiente.php";
$pedidopendiente = new pedidopendiente();
$dpp = $pedidopendiente->mostrarTodoRegistro("codpedidopendiente=" . $_POST['codpedidopendiente'], 1, "");
$dpp = array_shift($dpp);
?>
<form id="formulario" method="post">
<input type="hidden" name="codpedidopendiente" value="<?php 
echo $_POST['codpedidopendiente'];
?>
">
<table class="tabla table-bordered">
    <thead>
        <tr>
            <th>Nombre Cliente</th>
            <th>C.I. Cliente</th>
            <th>Celular Cliente</th>
            <th>Fecha Estimada de Entrega</th>
            <th></th>