<?php
session_start();
foreach($_GET  as $key => $value){${$key}=trim($value);$_PARAMS[$key]=${$key};}  
foreach($_POST as $key => $value){${$key}=trim($value);$_PARAMS[$key]=${$key};}

include_once('lib_main.php');
if(!empty($empr)){$link_data=msql_connect('','','',$empr); $cfg_empr=$empr;}

$clave=gen_clacc($docu,$idnum);
$codDoc=substr($clave,8,2); 

$tabla='vtas';
if($codDoc=='03'){$tabla='comp';}
if($codDoc=='06'){$tabla='guia';}
if($codDoc=='07'){$tabla='retp';}

$sql_docu='update '.$tabla.'1 set recepfec=null, recepmsj=null where claveacc="'.$clave.'"';
$res_docu=msql_query($sql_docu,$link_data);

// echo '*/*/*/*/*'.$clave;

$cexml=gen_cexml($clave);
$firma=fir_cexml($clave);
$recep=ws_recep($clave);
$autor=ws_autor($clave);

     
?>