<?
/*
Autor: Lic. Carlos Alberto Vaca Coronado
Version: 3.2.0
*/
session_name('portal_absa');
session_start();
if(!isset($_SESSION['usuario_p_prov_absa']) || trim($_SESSION['usuario_p_prov_absa']) == "" || trim(strtoupper($_SESSION["URL_PORTAL"]."admin.php")) != trim(strtoupper($_SERVER['HTTP_REFERER']))){
	?><script>window.location.href="<?=$_SESSION["URL_PORTAL"]."index.php"?>"</script><?
	exit;
}
require('conexion/conectar.php');

$conexion = new CONDB();
$conexion->conectar();

$query="update recibedoce set status='C' where rfcemisor='".$_POST['rfc']."' and tipodocto='".$_POST['docto']."' and serie='".$_POST['serie']."' and folio='".$_POST['folio']."' and uuid='".$_POST['uuid']."'";
if(!$rquery = mysqli_query($conexion->CONEXION,$query)){
	?><script>$j_6.messager.alert("Error.","Ocurrio un error al cancelar. Error <?=mysqli_error($conexion->CONEXION)?>","error");</script><?exit;
}

	?><script>$j_6.messager.alert("Aviso.","Documento cancelado.","info");</script><?exit;?>
	<script>$j_6("#buscarRecibe").click(); return false;</script>