<?php session_start();?>
<?php include('../_cfg/config.php'); ?>
<?php include('php_gene1.php'); ?>
<?php include('php_session.php'); ?>
<?php
echo '<br>';
echo 'TEST 9';
echo '<br>';

echo $cfg_empr;

if(mb_stristr('imcp',$cfg_empr))
{
     
// $sql_compensa='select * from comp1 left join comp2 on idnum1=idnum2 ';     
$sql_compensa='select * from vtas1 left join vtas2 on idnum1=idnum2 ';     
$sql_compensa.='where status not in ("O","X") ';     
$sql_compensa.='and compensa!=0 ';
$res_compensa=msql_query($sql_compensa,$link_vcrx);

echo $sql_compensa;
echo msql_error($link_vcrx)    ; 
     
     
while($aso_compensa=msql_fetch_assoc($res_compensa))
{
     $xdocu=$aso_compensa['docu'];
     $xidnum=$aso_compensa['idnum1'];
     echo '<br>'.$xdocu.'-'.$xidnum;
     vali_regidocu($xdocu,$xidnum);
}
     
 
}

// file_get_contents();

?>