<?/*
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;
}
?>
<script>
	$j_6('#loading').hide();
</script>
De doble click al status para cambiarlo.<br/>
<table class="td_general" cellspacing="0" cellpadding="0">
	<tr <?if($_POST['id7'] == 'R'){?>class="trStatusSelect"<?}else{?>class="trStatusD"<?}?>>
		<!--<tr class="trStatusD">-->
		<td width="50">
			<img src="Imagenes/circulo_0.png"/>
		</td>
		<td width="150">
			No Valido
		</td>
	</tr>
	<tr <?if($_POST['id7'] != 'R' && ($_SESSION['esAdmin_p_prov_absa'] == "SI" || ($_SESSION['tipo_usuario_ABSA'] == "CONTABILIDAD" && $_POST['id5'] != '3' && $_POST['id5'] != '4')) ){?>ondblClick="changeStatusABSA('<?=$_POST['id']?>','<?=$_POST['id2']?>','<?=$_POST['id3']?>','<?=$_POST['id4']?>','<?=$_POST['id6']?>','1','<?=$_POST['id8']?>');" <?if($_POST['id5'] == '1'){?>class="trStatusSelect"<?}else{?>class="trStatus"<?}}else if($_POST['id5'] == '1' && $_POST['id7'] != 'R'){?>class="trStatusSelect"<?}else{?>class="trStatusD"<?}?>>
	<!--<tr class="trStatusD">-->
		<td width="50">
			<img src="Imagenes/circulo_1.png"/>
		</td>
		<td width="200">
			Esperando validacion de Compras
		</td>
	</tr>
	
	<tr <?if($_POST['id7'] != 'R' && (($_SESSION['tipo_usuario_ABSA'] == "COMPRAS" && ($_POST['id5'] == "2" || $_POST['id5'] == "3"  || $_POST['id5'] == "1" || $_POST['id5'] == "0")) || $_SESSION['esAdmin_p_prov_absa'] == "SI")){?>ondblClick="changeStatusABSA('<?=$_POST['id']?>','<?=$_POST['id2']?>','<?=$_POST['id3']?>','<?=$_POST['id4']?>','<?=$_POST['id6']?>','2','<?=$_POST['id8']?>');" <?if($_POST['id5'] == '2'){?>class="trStatusSelect"<?}else{?>class="trStatus"<?}}else if($_POST['id5'] == '2' && $_POST['id7'] != 'R'){?>class="trStatusSelect"<?}else{?>class="trStatusD"<?}?>>
		<td>
			<img src="Imagenes/circulo_2.png"/>
		</td>
		<td width="150">
			Valido por Compras
		</td>
	</tr>
	<tr <?if($_POST['id7'] != 'R' && (($_SESSION['tipo_usuario_ABSA'] == "COMPRAS" && ($_POST['id5'] == "2" || $_POST['id5'] == "3"  || $_POST['id5'] == "1" || $_POST['id5'] == "0")) || $_SESSION['esAdmin_p_prov_absa'] == "SI")){?>ondblClick="changeStatusABSA('<?=$_POST['id']?>','<?=$_POST['id2']?>','<?=$_POST['id3']?>','<?=$_POST['id4']?>','<?=$_POST['id6']?>','3','<?=$_POST['id8']?>');" <?if($_POST['id5'] == '3'){?>class="trStatusSelect"<?}else{?>class="trStatus"<?}}else if($_POST['id5'] == '3' && $_POST['id7'] != 'R'){?>class="trStatusSelect"<?}else{?>class="trStatusD"<?}?>>
		<td>
			<img src="Imagenes/circulo_3.png"/>
		</td>
		<td width="150">
			Detenido
		</td>
	</tr>
	<tr <?if($_POST['id7'] != 'R' && (($_SESSION['tipo_usuario_ABSA'] == "CONTABILIDAD" && ($_POST['id5'] == "2" || $_POST['id5'] == "4")) || $_SESSION['esAdmin_p_prov_absa'] == "SI")){?>ondblClick="$j_6.messager.confirm('Confirmaci&oacute;n','&iquest;Esta seguro de validar el documento? Esta acci&oacute;n es irreversible.',function(r){if(r){changeStatusABSA('<?=$_POST['id']?>','<?=$_POST['id2']?>','<?=$_POST['id3']?>','<?=$_POST['id4']?>','<?=$_POST['id6']?>','4','<?=$_POST['id8']?>');}});" <?if($_POST['id5'] == '4'){?>class="trStatusSelect"<?}else{?>class="trStatus"<?}}else if($_POST['id5'] == '4'  && $_POST['id7'] != 'R'){?>class="trStatusSelect"<?}else{?>class="trStatusD"<?}?>>
		<td>
			<img src="Imagenes/circulo_4.png"/>
		</td>
		<td width="150">
			Valido por Contabilidad
		</td>
	</tr>
        
</table>
