<?php
 
session_start();
$com = "M";
include("DMMYSQLG.php");
include("DSA3000.php");
include("DMMYSQLG.php");
include("DF30000.inc");
?>
<html>
<link rel="stylesheet" href="css/estilo1.css" type="text/css"/>
<script type="text/javascript" language="JavaScript1.2" src="DSSCRIPT.js"></script>
<?php

if ($_POST['bot']==""){
	echo '<h2>!!! SELECCIONA UN REGISTRO... ACTUALIZANDO !!!</h2>';
	echo '<meta content="1; url=DX70000_PR.php"  HTTP-EQUIV="REFRESH">';
}else{
	include('DX70000_CL.php');
	$varible_clase = new clase_tas_iva();
	$res=$varible_clase->lista_busqueda($_POST["bot"]);
	$reg=mysqli_fetch_array($res);
?>
<body
<?php
 
if(isset($_POST['bot3'])){
	echo ' onLoad="deshab()"';
}
?>
>
<form  name="frm1" id="frm1" method="post" action="">
<input name="bot" type="hidden" value="<?php
 echo $_POST["bot"]?>">
  <table width="400"  align="center">
    <tr>
      <th colspan="2" class=\"titulo\"><div align="center">TASA DE IVA </div></th>
    </tr>
    <tr>
      <td>Tipo:</td>
      <td><select name="select">
	  <?php
 
	  if($reg['tip_iva']=="A"){
	  	echo '<option selected>A</option>';
	  }else{
	  	echo '<option>A</option>';
	  }
	  if($reg['tip_iva']=="B"){
	  	echo '<option selected>B</option>';
	  }else{
	  	echo '<option>B</option>';
	  }
	  if($reg['tip_iva']=="C"){
	  	echo '<option selected>C</option>';
	  }else{
	  	echo '<option>C</option>';
	  }
	  if($reg['tip_iva']=="D"){
	  	echo '<option selected>D</option>';
	  }else{
	  	echo '<option>D</option>';
	  }
	  if($reg['tip_iva']=="E"){
	  	echo '<option selected>E</option>';
	  }else{
	  	echo '<option>E</option>';
	  }
	  ?>

        </select>
      </td>
    </tr>
    <tr>
      <td>Fecha de Vigencia:</td>
      <td>
        <?php

		echo '<input name="t1" type="hidden"  value="' . $reg['cve_iva'] . '"/>';
		?>
        <input name="t_2" type="text" class="emplea" id="t_2" size="15" readonly 
			<?php

				$fec1=$reg['fec_vig'];
				include("DF20000.php");
					echo 'value="'.$f_f.'"';
			?>/> 
		<input name="bot2" id="bot2" type="image" value="Cal" src="logos/cal4.jpg" />
		 <script type="text/javascript">
  Calendar.setup(
    {
      inputField  : "t_2",        // ID of the input field
      ifFormat    : "%d/%m/%Y",    // the date format
      button      : "bot2"      // ID of the button
    }
  );
</script> </td>
    </tr>
    <tr>
      <td>Nombre:</td>
      <td><?php

		echo '<input name="t3" type="text"  value="' . $reg['conc_iva'] . '"/>';
		?></td>
    </tr>
    <tr>
      <td>Porcentaje:</td>
      <td><?php

		echo '<input name="t4" type="text"  value="' . $reg['porc_iva'] . '"/>';
		?></td>
    </tr>
    <tr>
      <td>Iva Trasladado Cobrado:</td>
      <td><?php

		echo '<input name="t5" type="text"  value="' . $reg['cta_iva_ppa'] . '"/>';
		?></td>
    </tr>
    <tr>
      <td>Iva Acreditable Pagado:</td>
      <td><?php

		echo '<input name="t6" type="text"  value="' . $reg['cta_iva_acr'] . '"/>';
		?></td>
    </tr>
    <tr>
      <td>Iva Trasladado No Cobrado:</td>
      <td><?php

		echo '<input name="t7" type="text"  value="' . $reg['cta_iva_ppa_nc'] . '"/>';
		?></td>
    </tr>
    <tr>
      <td width="80">Iva Acreditable No Pagado</td>
      <td width="304"><?php

		echo '<input name="t8" type="text"  value="' . $reg['cta_iva_acr_np'] . '"/>';
		?></td>
    </tr>
    <tr>
      <td colspan="2"><div align="center">
          <input type="button" name="Submit2" value="Modificar" onClick="openpage('DX70000_MC.php','_self')"/>
          &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
          <input type="button" name="Submit" value="Regresar" onClick="openpage('DX70000_PR.php','_self')"/>
      </div></td>
    </tr>
  </table>
</form>
 <?php
 
if(isset($_POST['bot3'])){
	echo '<div align="center">
	<form id="form1" name="form1" action="DX70000_PR.php" target="_self">
		<input type="submit" name="submit" value="Regresar">
	</form>
	</div>';
	
}
?>
 </body>
<?php
 
mysqli_close($con);
}
?>
</html>