<?php
 
session_start();
$com = "C";
include("DMMYSQLG.php");
include("DSA3000.php");
include("DMMYSQLG.php");
include("DF30000.inc");
$sql = mysqli_query($con ,"select * from dvcobdoc where n_reg = '".$_REQUEST['bot']."'");
$rr = mysqli_fetch_array($sql);
?>
<html>
<head>
<title>Orden de compra</title>
<link rel="stylesheet" href="css/estilo1.css" type="text/css"/>
<script type="text/javascript" language="JavaScript1.2" src="DSSCRIPT.js"></script>

</head>
<body>
<form name="frm1" id="frm1" method="post" action="">
<div id="capa1">
  <input type="hidden" name="bot"
  	<?php
 
	echo ' value="'.$_REQUEST['bot'].'" ';
	?>
  >
</div>
<table  align="center">
  <tr>
    <th colspan="6" class=\"titulo\">EMISION DE COBRO </th>
  </tr>
  <tr>
    <td>Tipo de Cobro </td>
    <td><input name="t1" type="text" id="t1" tabindex="1"
	<?php
 
	echo ' value="'.$rr['tip_cob'].'" ';
	?>
	>
       </td>
    <td>Fecha COBRO </td>
    <td><input name="fec" type="text" class="emplea" id="fec" size="20" maxlength="20" readonly
			<?php

			$fec1 = $rr['fec_cob'];
			include('DF20000.php');
			echo 'value="' .$f_f.  '"';
			?>onkeypress="return soloNumeros(event)"//solo fechas
		/>
 </td>
    <td>Folio del COBRO</td>
    <td><input name="t3" type="text" id="t3" tabindex="3" readonly 
	<?php
 
	echo ' value="'.$rr['fol_cob'].'" ';
	?>
	></td>
  </tr>
  <tr>
    <td>Cliente:</td>
    <td colspan="3"><span class="inputcodigo">
      <input name="tncli" type="text" id="tncli" size="3" readonly tabindex="4"
	<?php
 
	echo ' value="'.$rr['codigo'].'" ';
	?>
	  >
      <input name="tnom_alt" type="text" id="tnom_alt" tabindex="5" size="50"  readonly
		<?php
 
	$bus = mysqli_query($con ,"select * from dxbascps where codigo = '".$rr['codigo']."'");
	$registro = mysqli_fetch_array($bus);
	//buscar el cliente por default
	echo 'value="'.$registro['nombre']. ' ' .$registro['ap_paterno'] . ' ' .$registro['ap_materno'].'"';
	?>>
    </span></td>
    <td>Movimiento:</td>
    <td><select name="t4" id="t4" tabindex="6" disabled="disabled">
	<?php
 
	if($rr['tip_mto'] == "C"){
		echo '<option value="C" selected>CLIENTE</option>';
	}else{
		echo '<option value="C">CLIENTE</option>';
	}
	if($rr['tip_mto'] == "P"){
		echo '<option value="P" selected>PROVEEDOR</option>';
	}else{
		echo '<option value="P">PROVEEDOR</option>';
	}
	?>
    </select></td>
  </tr>
  <tr>
    <td>Documento:</td>
    <td><input name="t5" type="text" id="t5" tabindex="7"  readonly
	<?php
 
	echo ' value="'.$rr['num_doc'].'" ';
	?>
	onBlur="javascript:recibeid('DV35000_AA.php','TT='+this.value,'TT1='+tncli.value,'capa1');"></td>
    <td>Fecha del documento</td>
    <td><input name="fec2" type="text" class="emplea" id="fec2" size="20" maxlength="20" readonly
			<?php

			$fec1 = $rr['fec_mov'];
			include('DF20000.php');
			echo 'value="' .$f_f.  '"';
			?>//solo fechas
		/>

      </script></td>
    <td>Cta Contable </td>
    <td><select name="select" id="select" tabindex="8" disabled="disabled">
      <?php
 
	  @$sql=mysqli_query($con ,"select * from dycatcta");
	  while($reg = mysqli_fetch_array($sql)){
	  	if($rr['cta_ban'] == $reg['cta_con']){
			echo '<option value = "'.$reg['cta_con'].'" selected>'.$reg['cta_con']. ' ' . $reg['descripcion'].'</option>';
		}else{
			echo '<option value = "'.$reg['cta_con'].'">'.$reg['cta_con']. ' ' . $reg['descripcion'].'</option>';
		}	
	  	
	  }
	  ?>
    </select></td>
  </tr>
  <tr>
    <td>Sub-Total</td>
    <td><input name="t6" type="text" id="t6" value="0" tabindex="9" readonly
	<?php
 
	echo ' value="'.$rr['imp_cob'].'" ';
	?>
	></td>
    <td>Iva:</td>
    <td><input name="t7" type="text" id="t7"  value="0" tabindex="10" readonly
	<?php
 
	echo ' value="'.$rr['iva_cob'].'" ';
	?>
	></td>
    <td>Total</td>
    <td><input name="t8" type="text" id="t8" tabindex="11" readonly
	<?php
 
	echo ' value="'.$rr['tot_cob'].'" ';
	?>
	></td>
  </tr>
  <tr>
    <td>Generar Poliza: </td>
    <td><select name="t9" id="t9" tabindex="12" disabled="disabled">
    <?php
 
	if($rr['gen_pol'] == "S"){
		echo '<option value="S" selected>SI</option>';
	}else{
		echo '<option value="S">SI</option>';
	}
	if($rr['gen_pol'] == "N"){
		echo '<option value="N" selected>NO</option>';
	}else{
		echo '<option value="N">NO</option>';
	}
	?>
    </select></td>
    <td>Afectar Contablemente </td>
    <td><select name="t10" id="t10" tabindex="13" disabled="disabled">
     <?php
 
	if($rr['afe_con'] == "S"){
		echo '<option value="S" selected>SI</option>';
	}else{
		echo '<option value="S">SI</option>';
	}
	if($rr['afe_con'] == "N"){
		echo '<option value="N" selected>NO</option>';
	}else{
		echo '<option value="N">NO</option>';
	}
	?>
    </select></td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
  </tr>
  <tr>
		<td colspan="6">
		  <div align="center">
		     
		    <input type="submit" name="Submit3" value="Eliminar" onClick="openpage('DV35000_EC.php','_self')">
		    
		    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
		  <input type="button" name="Submit" value="Regresar" onClick="openpage('DV35000_PR.php','_self')">
		  </div>		</td>
	</tr>
  </table>
</form>
</body>
</html>
