<script src="ajax_orios.js" language="javascript"></script>


<link href="ucaestilos.css" rel="stylesheet" type="text/css" />

  <table width="950" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">

    <tr>

      <td><table width="950" border="0" align="center" cellspacing="10">

      <tr>

              <td><p align="left" class="style7">CONSULTAR COMPRA :.

            </p></td>

          </tr>

          </table>

      <br />

          <table width="950" border="0" align="center">

            <tr>

              <td align="center" valign="top"><table width="100%" height="0" border="0" cellpadding="0" cellspacing="5">

                  <tr>

                    <td width="62%" class="style4">Por Proveedor:

                          <?php

					include("conexion.php");

					$cons="select idProveedor,nombre from proveedor" ;

					$res=mysql_query($cons,$conex) or die ("No se pudo realizar la consulta de Proveedor");

					echo "<select name='proveedor' id='proveedor' class='cuadrotexto' onchange='javascript:facturas()' style='width:300px;'>";
					echo "<option value='0' >Seleccione proveedor</option>n"; 
   					while ($campo=mysql_fetch_assoc($res)) 

	    			{

						echo "<option value='".$campo['idProveedor']."'>".$campo['nombre']."</option>n"; 

 					}

					echo "</select>";

					mysql_free_result($res);

					?>
                   </td>

                    <td width="38%" valign="top">

                      <span class="style4">Facturas por fecha: </span>
                      <label for="fecha6">
                        <input name="fecha6" type="text" class="cuadrotexto calendar" id="datetimepicker" value="<?php echo date("Y-m-d");?>" size="10" maxlength="10" />
                      </label>
                        &nbsp;
                        <input name="Submit22" type="button" class="botonDefault" value="Buscar" onclick="javascript:porfecha()">
                    </td>
                </tr>

                  <tr>

                    <td colspan="4" align="center" valign="top"><hr width="100%" size="1" noshade="noshade" color="#0D3356" /></td>
                  </tr>

                </table>

                <table width="100%" border="0" cellspacing="10" cellpadding="0">

        <tr>

                        <td width="24%" valign="top">
                        <table width="100%" border="0" cellspacing="0" cellpadding="0">

  <tr>

    <td><div align="center"><span class="style10">REGISTRO DE FACTURAS</span> </div></td>

  </tr>

</table>

                          <div id="facturas"> </div></td>

                        <td width="76%" valign="top"><div id="visualiza"> </div></td>

                  </tr>

                </table>

                 

              </td>

            </tr>

        </table>

        <p>&nbsp;</p>
        <table width="173" border="0" align="center" cellspacing="10">

        <tr>

              <td width="55" valign="top"><div align="right">

                  <input name="Submit" type="button" class="botonDefault" onclick="javascript:print()" value="Imprimir" />

          </div></td>

          <td width="84" valign="top">
          <form id="form1" name="form1" method="post" action="main.php">
                     <input name="Submit2" type="submit" class="botonDefault" value="Volver a inicio" />
          </form></td>

          </tr>

          </table>

      </td>

    </tr>

  </table>

<script>

$('#datetimepicker').datetimepicker({
	lang:'es',
	timepicker:false,
	format:'Y-m-d',
	formatDate:'Y-m-d',
});
</script>

