<?php include('../_cfg/config.php');?>
<?php include('php_gene1.php');?>
<?php $docu=$_POST['docu'];?>
<?php $ptoe=$_POST['ptoe'];?>
<?php $enti=$_POST['enti'];?>
<?php
  $sql_docu='select * from docu0 where docu_codigo like "'.$_POST['docu'].'%"';
  $res_docu=msql_query($sql_docu,$link_vcrx);
  $tabla=@msql_result($res_docu,0,'docu_tabla');  
  if($tabla=='vtas'){$ptoe=$_POST['ptov'];}
  if($tabla=='inve'){$ptoe=$_POST['bode'];}
  if($tabla=='caja'){$ptoe=$_POST['caja'];}
  if($tabla=='bcos'){$ptoe=$_POST['ctab'];}
  if(empty($ptoe)){$ptoe=$_POST['ptoe'];}
?>
<?php $xnumedocu=nume_docu($docu,$ptoe,$enti); ?>
<?php echo trim($xnumedocu); ?>
