<meta http-equiv="content-type" content="text/html; charset=windows-1254">
<meta http-equiv="content-type" content="text/html; charset=iso-8859-9">




<div class="row">
  <div class="nav-tabs-custom">
<ul class="nav nav-tabs">
 







<div class="box-body table-responsive">

<div class="box">
            <div class="box-header with-border">
              <h3 class="box-title">Stok Listesi</h3>
            </div>
            <!-- /.box-header -->
            <div class="box-body">
              <table class="table table-bordered">
                <tbody><tr>
                  
                  <th>Ürün Adı</th>
        
<th style="width: 120px">Ana Stok</th>
<th style="width: 120px">Verilen Konsinye </th>
<th style="width: 120px">Satılan Konsinye</th>
<th style="width: 120px">Kalan Konsinye </th>
<th style="width: 120px">Direk Satılan </th>
<th style="width: 120px">Toplam Cikis</th>
<th style="width: 120px">Toplam Satılan</th>
<th style="width: 120px">Toplam Kalan</th>
                </tr>


               
 <!-- /      SAW PALMETTO  BASLANGIC  -->
 <tr>
                
                  <td>Saw Palmetto</td>
                

<td><?php
include"baglan.php";
$query = mysql_query("SELECT SUM(STOK_GIRIS_ADET) FROM stoklar WHERE STOK_LINK='Saw_Palmetto'");  
$row = mysql_fetch_array($query); 

$Verilen_Konsinye=$row['SUM(STOK_GIRIS_ADET)'];  
 
echo $Verilen_Konsinye;

?>
</td>




<td><span class="badge bg-red">
<?php
include"baglan.php";

 $sorumlu_kodu=$_SESSION["kullanici_adi"];
$query = mysql_query("SELECT SUM(SATIS_ADET) FROM konsinyeler WHERE KONSINYE_URUN_ADI='Saw_Palmetto' and KONSINYE_DEPRESANT='$sorumlu_kodu'");  
$row = mysql_fetch_array($query); 

$Konsinyetoplam=$row['SUM(SATIS_ADET)'];  
 
echo $Konsinyetoplam;

?></span>

</td>


<td><span class="badge bg-green">
<?php
include"baglan.php";

 $sorumlu_kodu=$_SESSION["kullanici_adi"];
$query = mysql_query("SELECT SUM(SATIS_ADET) FROM konsinyesatis WHERE KONSINYE_URUN_ADI='Saw_Palmetto' and SATIS_DEPRESANT='$sorumlu_kodu' and SATIS_SEKLI='Konsinye_Satis'");  
$row = mysql_fetch_array($query); 

$KonsinyeSatistoplam=$row['SUM(SATIS_ADET)'];  
 
echo $KonsinyeSatistoplam;

?></span>

</td>



<td><span class="badge bg-red">

<?php
include"baglan.php";
 $sorumlu_kodu=$_SESSION["kullanici_adi"];
$bilgi= mysql_query("SELECT SUM(SATIS_ADET),SUM(SATIS_TOPLAM) FROM konsinyesatis WHERE KONSINYE_URUN_ADI='Saw_Palmetto' and SATIS_DEPRESANT='$sorumlu_kodu' ");
$satir = mysql_fetch_array($bilgi);

$KalanKonsinye= "$satir[0]";



$KalanKonsinye= ($Konsinyetoplam)-($KonsinyeSatistoplam);
 
?><?php echo $KalanKonsinye; ?></span></td>



<td><span class="badge bg-green">
<?php
include"baglan.php";

 $sorumlu_kodu=$_SESSION["kullanici_adi"];
$query = mysql_query("SELECT SUM(SATIS_ADET) FROM konsinyesatis WHERE KONSINYE_URUN_ADI='Saw_Palmetto' and SATIS_DEPRESANT='$sorumlu_kodu' and SATIS_SEKLI='Direk_Satis'");  
$row = mysql_fetch_array($query); 

$Satistoplam=$row['SUM(SATIS_ADET)'];  
 
echo $Satistoplam;

?></span>

</td>
 




                  <td><span class="badge bg-red">


<?php
include"baglan.php";
 $sorumlu_kodu=$_SESSION["kullanici_adi"];
$bilgi= mysql_query("SELECT SUM(SATIS_ADET),SUM(SATIS_TOPLAM) FROM konsinyesatis WHERE KONSINYE_URUN_ADI='Saw_Palmetto' and SATIS_DEPRESANT='$sorumlu_kodu' ");
$satir = mysql_fetch_array($bilgi);

$Aqualyx_satis= "$satir[0]";



$Toplam_Cikis= ($Konsinyetoplam)+($Satistoplam);
 
?><?php echo $Toplam_Cikis; ?></span></td>
 




<td><span class="badge bg-green">


<?php
include"baglan.php";
 $sorumlu_kodu=$_SESSION["kullanici_adi"];
$bilgi= mysql_query("SELECT SUM(SATIS_ADET),SUM(SATIS_TOPLAM) FROM konsinyesatis WHERE KONSINYE_URUN_ADI='Saw_Palmetto' and SATIS_DEPRESANT='$sorumlu_kodu' ");
$satir = mysql_fetch_array($bilgi);

$Aqualyx_satis= "$satir[0]";



$Toplam_Satilan= ($KonsinyeSatistoplam)+($Satistoplam);
 
?><?php echo $Toplam_Satilan; ?></span></td>

 






<td><span class="badge bg-green">


<?php
include"baglan.php";
 $sorumlu_kodu=$_SESSION["kullanici_adi"];
$bilgi= mysql_query("SELECT SUM(SATIS_ADET),SUM(SATIS_TOPLAM) FROM konsinyesatis WHERE KONSINYE_URUN_ADI='Saw_Palmetto' and SATIS_DEPRESANT='$sorumlu_kodu' ");
$satir = mysql_fetch_array($bilgi);

$Toplam_Kalan= "$satir[0]";



$Toplam_Kalan= ($Verilen_Konsinye)-($Toplam_Satilan);
 
?><?php echo $Toplam_Kalan; ?></span></td>


                </tr>
              
<!-- /      SAW PALMETTO BASLANGIC  -->





<!-- /      GİRE PLUS BASLANGIC  -->
 <tr>
                
                  <td>Gire Plus</td>
                

<td><?php
include"baglan.php";
$query = mysql_query("SELECT SUM(STOK_GIRIS_ADET) FROM stoklar WHERE STOK_LINK='Gire_Plus'");  
$row = mysql_fetch_array($query); 

$Verilen_Konsinye=$row['SUM(STOK_GIRIS_ADET)'];  
 
echo $Verilen_Konsinye;

?>
</td>




<td><span class="badge bg-red">
<?php
include"baglan.php";

 $sorumlu_kodu=$_SESSION["kullanici_adi"];
$query = mysql_query("SELECT SUM(SATIS_ADET) FROM konsinyeler WHERE KONSINYE_URUN_ADI='Gire_Plus' and KONSINYE_DEPRESANT='$sorumlu_kodu'");  
$row = mysql_fetch_array($query); 

$Konsinyetoplam=$row['SUM(SATIS_ADET)'];  
 
echo $Konsinyetoplam;

?></span>

</td>


<td><span class="badge bg-green">
<?php
include"baglan.php";

 $sorumlu_kodu=$_SESSION["kullanici_adi"];
$query = mysql_query("SELECT SUM(SATIS_ADET) FROM konsinyesatis WHERE KONSINYE_URUN_ADI='Gire_Plus' and SATIS_DEPRESANT='$sorumlu_kodu' and SATIS_SEKLI='Konsinye_Satis'");  
$row = mysql_fetch_array($query); 

$KonsinyeSatistoplam=$row['SUM(SATIS_ADET)'];  
 
echo $KonsinyeSatistoplam;

?></span>

</td>



<td><span class="badge bg-red">

<?php
include"baglan.php";
 $sorumlu_kodu=$_SESSION["kullanici_adi"];
$bilgi= mysql_query("SELECT SUM(SATIS_ADET),SUM(SATIS_TOPLAM) FROM konsinyesatis WHERE KONSINYE_URUN_ADI='Gire_Plus' and SATIS_DEPRESANT='$sorumlu_kodu' ");
$satir = mysql_fetch_array($bilgi);

$KalanKonsinye= "$satir[0]";



$KalanKonsinye= ($Konsinyetoplam)-($KonsinyeSatistoplam);
 
?><?php echo $KalanKonsinye; ?></span></td>



<td><span class="badge bg-green">
<?php
include"baglan.php";

 $sorumlu_kodu=$_SESSION["kullanici_adi"];
$query = mysql_query("SELECT SUM(SATIS_ADET) FROM konsinyesatis WHERE KONSINYE_URUN_ADI='Gire_Plus' and SATIS_DEPRESANT='$sorumlu_kodu' and SATIS_SEKLI='Direk_Satis'");  
$row = mysql_fetch_array($query); 

$Satistoplam=$row['SUM(SATIS_ADET)'];  
 
echo $Satistoplam;

?></span>

</td>
 




                  <td><span class="badge bg-red">


<?php
include"baglan.php";
 $sorumlu_kodu=$_SESSION["kullanici_adi"];
$bilgi= mysql_query("SELECT SUM(SATIS_ADET),SUM(SATIS_TOPLAM) FROM konsinyesatis WHERE KONSINYE_URUN_ADI='Gire_Plus' and SATIS_DEPRESANT='$sorumlu_kodu' ");
$satir = mysql_fetch_array($bilgi);

$Aqualyx_satis= "$satir[0]";



$Toplam_Cikis= ($Konsinyetoplam)+($Satistoplam);
 
?><?php echo $Toplam_Cikis; ?></span></td>
 




<td><span class="badge bg-green">


<?php
include"baglan.php";
 $sorumlu_kodu=$_SESSION["kullanici_adi"];
$bilgi= mysql_query("SELECT SUM(SATIS_ADET),SUM(SATIS_TOPLAM) FROM konsinyesatis WHERE KONSINYE_URUN_ADI='Gire_Plus' and SATIS_DEPRESANT='$sorumlu_kodu' ");
$satir = mysql_fetch_array($bilgi);

$Aqualyx_satis= "$satir[0]";



$Toplam_Satilan= ($KonsinyeSatistoplam)+($Satistoplam);
 
?><?php echo $Toplam_Satilan; ?></span></td>

 






<td><span class="badge bg-green">


<?php
include"baglan.php";
 $sorumlu_kodu=$_SESSION["kullanici_adi"];
$bilgi= mysql_query("SELECT SUM(SATIS_ADET),SUM(SATIS_TOPLAM) FROM konsinyesatis WHERE KONSINYE_URUN_ADI='Gire_Plus' and SATIS_DEPRESANT='$sorumlu_kodu' ");
$satir = mysql_fetch_array($bilgi);

$Toplam_Kalan= "$satir[0]";



$Toplam_Kalan= ($Verilen_Konsinye)-($Toplam_Satilan);
 
?><?php echo $Toplam_Kalan; ?></span></td>


                </tr>
              
<!-- /      GİRE PLUS BİTİS  -->





<!-- /      Infix_Epimedium BASLANGIC  -->
 <tr>
                
                  <td>İnfix Epimedium</td>
                

<td><?php
include"baglan.php";
$query = mysql_query("SELECT SUM(STOK_GIRIS_ADET) FROM stoklar WHERE STOK_LINK='Infix_Epimedium'");  
$row = mysql_fetch_array($query); 

$Verilen_Konsinye=$row['SUM(STOK_GIRIS_ADET)'];  
 
echo $Verilen_Konsinye;

?>
</td>




<td><span class="badge bg-red">
<?php
include"baglan.php";

 $sorumlu_kodu=$_SESSION["kullanici_adi"];
$query = mysql_query("SELECT SUM(SATIS_ADET) FROM konsinyeler WHERE KONSINYE_URUN_ADI='Infix_Epimedium' and KONSINYE_DEPRESANT='$sorumlu_kodu'");  
$row = mysql_fetch_array($query); 

$Konsinyetoplam=$row['SUM(SATIS_ADET)'];  
 
echo $Konsinyetoplam;

?></span>

</td>


<td><span class="badge bg-green">
<?php
include"baglan.php";

 $sorumlu_kodu=$_SESSION["kullanici_adi"];
$query = mysql_query("SELECT SUM(SATIS_ADET) FROM konsinyesatis WHERE KONSINYE_URUN_ADI='Infix_Epimedium' and SATIS_DEPRESANT='$sorumlu_kodu' and SATIS_SEKLI='Konsinye_Satis'");  
$row = mysql_fetch_array($query); 

$KonsinyeSatistoplam=$row['SUM(SATIS_ADET)'];  
 
echo $KonsinyeSatistoplam;

?></span>

</td>



<td><span class="badge bg-red">

<?php
include"baglan.php";
 $sorumlu_kodu=$_SESSION["kullanici_adi"];
$bilgi= mysql_query("SELECT SUM(SATIS_ADET),SUM(SATIS_TOPLAM) FROM konsinyesatis WHERE KONSINYE_URUN_ADI='Infix_Epimedium' and SATIS_DEPRESANT='$sorumlu_kodu' ");
$satir = mysql_fetch_array($bilgi);

$KalanKonsinye= "$satir[0]";



$KalanKonsinye= ($Konsinyetoplam)-($KonsinyeSatistoplam);
 
?><?php echo $KalanKonsinye; ?></span></td>



<td><span class="badge bg-green">
<?php
include"baglan.php";

 $sorumlu_kodu=$_SESSION["kullanici_adi"];
$query = mysql_query("SELECT SUM(SATIS_ADET) FROM konsinyesatis WHERE KONSINYE_URUN_ADI='Infix_Epimedium' and SATIS_DEPRESANT='$sorumlu_kodu' and SATIS_SEKLI='Direk_Satis'");  
$row = mysql_fetch_array($query); 

$Satistoplam=$row['SUM(SATIS_ADET)'];  
 
echo $Satistoplam;

?></span>

</td>
 




                  <td><span class="badge bg-red">


<?php
include"baglan.php";
 $sorumlu_kodu=$_SESSION["kullanici_adi"];
$bilgi= mysql_query("SELECT SUM(SATIS_ADET),SUM(SATIS_TOPLAM) FROM konsinyesatis WHERE KONSINYE_URUN_ADI='Infix_Epimedium' and SATIS_DEPRESANT='$sorumlu_kodu' ");
$satir = mysql_fetch_array($bilgi);

$Aqualyx_satis= "$satir[0]";



$Toplam_Cikis= ($Konsinyetoplam)+($Satistoplam);
 
?><?php echo $Toplam_Cikis; ?></span></td>
 




<td><span class="badge bg-green">


<?php
include"baglan.php";
 $sorumlu_kodu=$_SESSION["kullanici_adi"];
$bilgi= mysql_query("SELECT SUM(SATIS_ADET),SUM(SATIS_TOPLAM) FROM konsinyesatis WHERE KONSINYE_URUN_ADI='Infix_Epimedium' and SATIS_DEPRESANT='$sorumlu_kodu' ");
$satir = mysql_fetch_array($bilgi);

$Aqualyx_satis= "$satir[0]";



$Toplam_Satilan= ($KonsinyeSatistoplam)+($Satistoplam);
 
?><?php echo $Toplam_Satilan; ?></span></td>

 






<td><span class="badge bg-green">


<?php
include"baglan.php";
 $sorumlu_kodu=$_SESSION["kullanici_adi"];
$bilgi= mysql_query("SELECT SUM(SATIS_ADET),SUM(SATIS_TOPLAM) FROM konsinyesatis WHERE KONSINYE_URUN_ADI='Infix_Epimedium' and SATIS_DEPRESANT='$sorumlu_kodu' ");
$satir = mysql_fetch_array($bilgi);

$Toplam_Kalan= "$satir[0]";



$Toplam_Kalan= ($Verilen_Konsinye)-($Toplam_Satilan);
 
?><?php echo $Toplam_Kalan; ?></span></td>


                </tr>
              
<!-- /      Infix_Epimedium  BİTİS  -->







              </tbody></table>
            </div>
            <!-- /.box-body -->
      
          </div>



</div>
<br><br>



  <div class="nav-tabs-custom">
                                <ul class="nav nav-tabs">
                                    
<div class="box">
<div class="box-header">
<h3 class="box-title">STOK GİRİŞ TARİHLERİ</h3>
</div><!-- /.box-header -->
<div class="box-body table-responsive">
<table id="example2" class="table table-bordered table-hover">
<thead>
<tr>
<th>STOK TARİHİ</th>
<th>STOK ADI</th>
<th>STOK ADET</th>
</tr>
</thead>
<tbody>		
<tr>

<?php
  
include("baglan.php");
	
$gosterim=30;
 $sayfa=@$_GET['sayfa'];
 
if(empty($sayfa) || !is_numeric($sayfa)){$sayfa=1;}

 
$k_sayisi=mysql_num_rows(mysql_query("Select STOK_ID From stoklar"));
 
$s_sayisi=ceil($k_sayisi/$gosterim);
 
$ilk_kayit=($sayfa*$gosterim)-$gosterim;
	
	
	
  
  $sql = mysql_query("SELECT *  FROM stoklar  WHERE STOK_DEPRESANT='$sorumlu_kodu'  Order By STOK_ID desc Limit $ilk_kayit,$gosterim");
 $i = 0; 
    $sutun    = 1;  
$s    = 0; 
    
    


	while($veri = mysql_fetch_assoc($sql)) 
	
    { 
	
$i++; 

    

	
        echo ' 
      	

	<td  style="width:15%;">',$veri["STOK_GIRIS_TARIHI"],'</td>
  <td  >',$veri["STOK_BASLIK"],'</td>
	
 	 <td  >',$veri["STOK_GIRIS_ADET"],'</td>
 


			

				
				
				 </tr> 
				'; 
		
		
        if ($i % $sutun == 0) 
        { 
        echo ' 
 

<ul class="pagination">
   '; 
        } 
    } 

if($sayfa!=1){
   
}

for($i=1;$i<=$s_sayisi;$i++){
    

}

if($sayfa!=$s_sayisi){
  

} 
?></ul>

</div>
    </div>

                                            
                                        </tfoot>
                                    </table>


                                </div>
     
    </div>
               