<?php require('header.php');?>
 <? include("veritabani.php");?>
<body onload="setTimeout('timeout()', 50)"></body>

<meta yasak kelime"Content-Language" content="tr"> 
<meta yasak kelime"content-type" content="text/html; charset=ISO-8859-9"> 
<meta yasak kelime"Content-Type" content="text/html; charset=windows-1254"> 
<meta name="robots" content="noindex, follow"



<?



?>

<tbody>
 <div class="row">
        <div class="box col-md-12">
            <div class="box-inner">
                <div class="box-header well" data-original-title="">
                    <h2><i class="glyphicon glyphicon-user"></i>&nbsp;&nbsp;İptal Onay Bekleyen Belgeler</h2>

             
              </div>
    <table class="table table-striped table-bordered bootstrap-datatable datatable responsive">
    
	</tbody>
	
	
	
	
	
    <tr>
	   <th>İşlemler</th>
        <th>Şube Adı</th>
       <th>Belge Tipi</th>
        <th>Kasiyer Adı</th>
        <th>Tutarı</th>
        <th>Kasa No</th>
        <th>Tarih</th>
       	
	
    </tr>
   
<?$onay =sqlsrv_query($puan," 
   
   SELECT subeadi FROM IPTAL_ONAY where onaydurumu=0
             
  
  ");
  
   while($kay=sqlsrv_fetch_array($onay))
	{	
  
 
  
   ?>
            
						  
<?/* günlük Faaliyet*/
ini_set("mssql.charset", "UTF-8");
$onayla=odbc_exec($conn2," 
   
   SELECT id,subeadi,kasiyeradi,tutar,belgetipi,onaydurumu,kasano,tarih FROM IPTAL_ONAY    where onaydurumu=0
             
  
  ");
   
$kayit1=odbc_num_rows($onayla);

  if ($kayit=odbc_num_rows($onayla)>0)
  {	 
	  echo "";
	 
  }else{

	  echo "<center><h3>Kayıt Bulunamadı";

  }
   while($kayit=odbc_fetch_array($onayla))
	{	
      
$ahmet = $kayit["belgetipi"];
		
		if (($ahmet)==1){
			
			$kul = "FİŞ";
		}
		
		if (($ahmet)==2){
		
			$kul = "FATURA";
		}
		if (($ahmet)==3){
		
			$kul = "İRSALİYE";
		}	
		if (($ahmet)==4){
		
			$kul = "E-FATURA";
		}
			if (($ahmet)==5){
		
			$kul = "GİDER PUSULASI";
		}
		if (($ahmet)==6){
		
			$kul = "E-ARŞİV";
		}


?>
                           <tr>
						                               <td class="center">
		<a href="iptal.php?ck=onay&id=<?echo $kayit["id"];?>" id="sumbit"class="btn btn-success">
               Onayla
            </a></td>
						<td class="center"><h5><? echo $kay["subeadi"]; ?></td>
                            	<td class="center"><h4><? echo $kul; ?></td>
        <td class="center"><h4><? echo $kayit["kasiyeradi"]; ?></td>
        <td class="center"><h4><? echo $kayit["tutar"]; ?>&nbsp;₺</td>
        <td class="center"><h4><? echo $kayit["kasano"]; ?></td>
        <td class="center"><h4><? echo $kayit["tarih"]; ?></td>
								
      </tr>
	<?}
	$ck = @$_GET["ck"];
switch($ck){
case"onay":
  $ONAY = "VER";
$ad = $_GET["id"]; 
	
	$sorgu=odbc_exec($conn2," 
   
  update IPTAL_ONAY SET onaydurumu=1 WHERE id='$ad'
         
   
  ");
  if($ONAY== 'VER')
   {	 
	  
	 echo "<meta http-equiv=\"refresh\" content=\"0;URL=iptal.php\">";
  }else{

	  echo "<center><h3>işlem Hatalı";

  }
}
}
odbc_close($conn2);?>


<?php require('footer.php'); ?>
