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


<?php

session_start();
ob_start();
include"../css.php";
$sorumlu_kodu=$_SESSION["kullanici_adi"];
echo $_SESSION["kullanici_adi"];

?>

<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 Numune</th>
<th style="width: 120px">Toplam Kalan</th>
<th style="width: 120px">Aracımdakı Stok</th>
                </tr>


               
<!-- /      SAW PALMETTO  BASLANGIC  -->
<tr>
<td>S.Palmetto</td>
<td><?php
include"baglan.php";
$query = mysql_query("SELECT SUM(STOK_GIRIS_ADET) FROM stoklar WHERE STOK_LINK='Saw_Palmetto' and STOK_DEPRESANT='$sorumlu_kodu'");  
$row = mysql_fetch_array($query); 
$Verilen_Konsinye=$row['SUM(STOK_GIRIS_ADET)'];  
 echo $Verilen_Konsinye;
?>
</td>
<td>
<?php
include"baglan.php";
$sorumlu_kodu=$_SESSION["kullanici_adi"];
$query = mysql_query("SELECT SUM(URUN_IADE_ADET) FROM iadeler WHERE URUN_LINK='Saw_Palmetto' and SATIS_DEPRESANT='$sorumlu_kodu'");  
$row = mysql_fetch_array($query); 
$Konsinyeiade=$row['SUM(URUN_IADE_ADET)'];  
 ?>
<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)']-$Konsinyeiade;  
 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) FROM konsinyesatis WHERE SATIS_SEKLI='Numune' and   KONSINYE_URUN_ADI='Saw_Palmetto'   and SATIS_DEPRESANT='$sorumlu_kodu' ");
$satir = mysql_fetch_array($bilgi);
$Toplam_Numune= "$satir[0]";
 
 ?><?php echo $Toplam_Numune; ?></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)-($Toplam_Numune);
 ?><?php echo $Toplam_Kalan; ?></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);
$Arac_Stok= "$satir[0]";
$Arac_Stok= ($Toplam_Kalan)-($KalanKonsinye);
 ?><?php echo $Arac_Stok; ?></span></td>
</tr>
<!-- /      SAW PALMETTO BASLANGIC  -->






<!-- /      Gire_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' and STOK_DEPRESANT='$sorumlu_kodu'");  
$row = mysql_fetch_array($query); 
$Verilen_Konsinye=$row['SUM(STOK_GIRIS_ADET)'];  
 echo $Verilen_Konsinye;
?>
</td>
<td>
<?php
include"baglan.php";
$sorumlu_kodu=$_SESSION["kullanici_adi"];
$query = mysql_query("SELECT SUM(URUN_IADE_ADET) FROM iadeler WHERE URUN_LINK='Gire_Plus' and SATIS_DEPRESANT='$sorumlu_kodu'");  
$row = mysql_fetch_array($query); 
$Konsinyeiade=$row['SUM(URUN_IADE_ADET)'];  
 ?>
<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)']-$Konsinyeiade;  
 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) FROM konsinyesatis WHERE SATIS_SEKLI='Numune' and   KONSINYE_URUN_ADI='Gire_Plus'   and SATIS_DEPRESANT='$sorumlu_kodu' ");
$satir = mysql_fetch_array($bilgi);
$Toplam_Numune= "$satir[0]";
 
 ?><?php echo $Toplam_Numune; ?></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)-($Toplam_Numune);
 ?><?php echo $Toplam_Kalan; ?></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);
$Arac_Stok= "$satir[0]";
$Arac_Stok= ($Toplam_Kalan)-($KalanKonsinye);
 ?><?php echo $Arac_Stok; ?></span></td>
</tr>
<!-- /      GIREPLUS BASLANGIC  -->





 
<!-- /      İnfix Epimedium BASLANGIC  -->
<tr>
<td>İnfix E.</td>
<td><?php
include"baglan.php";
$query = mysql_query("SELECT SUM(STOK_GIRIS_ADET) FROM stoklar WHERE STOK_LINK='Infix_Epimedium' and STOK_DEPRESANT='$sorumlu_kodu'");  
$row = mysql_fetch_array($query); 
$Verilen_Konsinye=$row['SUM(STOK_GIRIS_ADET)'];  
 echo $Verilen_Konsinye;
?>
</td>
<td>
<?php
include"baglan.php";
$sorumlu_kodu=$_SESSION["kullanici_adi"];
$query = mysql_query("SELECT SUM(URUN_IADE_ADET) FROM iadeler WHERE URUN_LINK='Infix_Epimedium' and SATIS_DEPRESANT='$sorumlu_kodu'");  
$row = mysql_fetch_array($query); 
$Konsinyeiade=$row['SUM(URUN_IADE_ADET)'];  
 ?>
<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)']-$Konsinyeiade;  
 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) FROM konsinyesatis WHERE SATIS_SEKLI='Numune' and   KONSINYE_URUN_ADI='Infix_Epimedium'   and SATIS_DEPRESANT='$sorumlu_kodu' ");
$satir = mysql_fetch_array($bilgi);
$Toplam_Numune= "$satir[0]";
 
 ?><?php echo $Toplam_Numune; ?></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)-($Toplam_Numune);
 ?><?php echo $Toplam_Kalan; ?></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);
$Arac_Stok= "$satir[0]";
$Arac_Stok= ($Toplam_Kalan)-($KalanKonsinye);
 ?><?php echo $Arac_Stok; ?></span></td>
</tr>
<!-- /      INFIX BASLANGIC  -->



<!-- /      Ap_Ronks BASLANGIC  -->
<tr>
<td>Ap Ronks</td>
<td><?php
include"baglan.php";
$query = mysql_query("SELECT SUM(STOK_GIRIS_ADET) FROM stoklar WHERE STOK_LINK='Ap_Ronks' and STOK_DEPRESANT='$sorumlu_kodu'");  
$row = mysql_fetch_array($query); 
$Verilen_Konsinye=$row['SUM(STOK_GIRIS_ADET)'];  
 echo $Verilen_Konsinye;
?>
</td>
<td>
<?php
include"baglan.php";
$sorumlu_kodu=$_SESSION["kullanici_adi"];
$query = mysql_query("SELECT SUM(URUN_IADE_ADET) FROM iadeler WHERE URUN_LINK='Ap_Ronks' and SATIS_DEPRESANT='$sorumlu_kodu'");  
$row = mysql_fetch_array($query); 
$Konsinyeiade=$row['SUM(URUN_IADE_ADET)'];  
 ?>
<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='Ap_Ronks' and KONSINYE_DEPRESANT='$sorumlu_kodu'");  
$row = mysql_fetch_array($query); 
$Konsinyetoplam=$row['SUM(SATIS_ADET)']-$Konsinyeiade;  
 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='Ap_Ronks' 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='Ap_Ronks' 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='Ap_Ronks' 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='Ap_Ronks' 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='Ap_Ronks' 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) FROM konsinyesatis WHERE SATIS_SEKLI='Numune' and   KONSINYE_URUN_ADI='Ap_Ronks'   and SATIS_DEPRESANT='$sorumlu_kodu' ");
$satir = mysql_fetch_array($bilgi);
$Toplam_Numune= "$satir[0]";
 
 ?><?php echo $Toplam_Numune; ?></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='Ap_Ronks'  and SATIS_DEPRESANT='$sorumlu_kodu' ");
$satir = mysql_fetch_array($bilgi);
$Toplam_Kalan= "$satir[0]";
$Toplam_Kalan= ($Verilen_Konsinye)-($Toplam_Satilan)-($Toplam_Numune);
 ?><?php echo $Toplam_Kalan; ?></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='Ap_Ronks' and SATIS_DEPRESANT='$sorumlu_kodu' ");
$satir = mysql_fetch_array($bilgi);
$Arac_Stok= "$satir[0]";
$Arac_Stok= ($Toplam_Kalan)-($KalanKonsinye);
 ?><?php echo $Arac_Stok; ?></span></td>
</tr>
<!-- /     AP RONKS BİTİŞ  -->


<!-- /      Ossk_Tablet BASLANGIC  -->
<tr>
<td>Ossk</td>
<td><?php
include"baglan.php";
$query = mysql_query("SELECT SUM(STOK_GIRIS_ADET) FROM stoklar WHERE STOK_LINK='Ossk_Tablet' and STOK_DEPRESANT='$sorumlu_kodu'");  
$row = mysql_fetch_array($query); 
$Verilen_Konsinye=$row['SUM(STOK_GIRIS_ADET)'];  
 echo $Verilen_Konsinye;
?>
</td>
<td>
<?php
include"baglan.php";
$sorumlu_kodu=$_SESSION["kullanici_adi"];
$query = mysql_query("SELECT SUM(URUN_IADE_ADET) FROM iadeler WHERE URUN_LINK='Ossk_Tablet' and SATIS_DEPRESANT='$sorumlu_kodu'");  
$row = mysql_fetch_array($query); 
$Konsinyeiade=$row['SUM(URUN_IADE_ADET)'];  
 ?>
<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='Ossk_Tablet' and KONSINYE_DEPRESANT='$sorumlu_kodu'");  
$row = mysql_fetch_array($query); 
$Konsinyetoplam=$row['SUM(SATIS_ADET)']-$Konsinyeiade;  
 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='Ossk_Tablet' 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='Ossk_Tablet' 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='Ossk_Tablet' 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='Ossk_Tablet' 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='Ossk_Tablet' 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) FROM konsinyesatis WHERE SATIS_SEKLI='Numune' and   KONSINYE_URUN_ADI='Ossk_Tablet'   and SATIS_DEPRESANT='$sorumlu_kodu' ");
$satir = mysql_fetch_array($bilgi);
$Toplam_Numune= "$satir[0]";
 
 ?><?php echo $Toplam_Numune; ?></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='Ossk_Tablet'  and SATIS_DEPRESANT='$sorumlu_kodu' ");
$satir = mysql_fetch_array($bilgi);
$Toplam_Kalan= "$satir[0]";
$Toplam_Kalan= ($Verilen_Konsinye)-($Toplam_Satilan)-($Toplam_Numune);
 ?><?php echo $Toplam_Kalan; ?></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='Ossk_Tablet' and SATIS_DEPRESANT='$sorumlu_kodu' ");
$satir = mysql_fetch_array($bilgi);
$Arac_Stok= "$satir[0]";
$Arac_Stok= ($Toplam_Kalan)-($KalanKonsinye);
 ?><?php echo $Arac_Stok; ?></span></td>
</tr>
<!-- /      OSSK BİTİŞ  -->




<!-- /      Hyaluronic_Acid BASLANGIC  -->
<tr>
<td>H. Acid</td>
<td><?php
include"baglan.php";
$query = mysql_query("SELECT SUM(STOK_GIRIS_ADET) FROM stoklar WHERE STOK_LINK='Hyaluronic_Acid' and STOK_DEPRESANT='$sorumlu_kodu'");  
$row = mysql_fetch_array($query); 
$Verilen_Konsinye=$row['SUM(STOK_GIRIS_ADET)'];  
 echo $Verilen_Konsinye;
?>
</td>
<td>
<?php
include"baglan.php";
$sorumlu_kodu=$_SESSION["kullanici_adi"];
$query = mysql_query("SELECT SUM(URUN_IADE_ADET) FROM iadeler WHERE URUN_LINK='Hyaluronic_Acid' and SATIS_DEPRESANT='$sorumlu_kodu'");  
$row = mysql_fetch_array($query); 
$Konsinyeiade=$row['SUM(URUN_IADE_ADET)'];  
 ?>
<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='Hyaluronic_Acid' and KONSINYE_DEPRESANT='$sorumlu_kodu'");  
$row = mysql_fetch_array($query); 
$Konsinyetoplam=$row['SUM(SATIS_ADET)']-$Konsinyeiade;  
 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='Hyaluronic_Acid' 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='Hyaluronic_Acid' 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='Hyaluronic_Acid' 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='Hyaluronic_Acid' 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='Hyaluronic_Acid' 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) FROM konsinyesatis WHERE SATIS_SEKLI='Numune' and   KONSINYE_URUN_ADI='Hyaluronic_Acid'   and SATIS_DEPRESANT='$sorumlu_kodu' ");
$satir = mysql_fetch_array($bilgi);
$Toplam_Numune= "$satir[0]";
 
 ?><?php echo $Toplam_Numune; ?></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='Hyaluronic_Acid'  and SATIS_DEPRESANT='$sorumlu_kodu' ");
$satir = mysql_fetch_array($bilgi);
$Toplam_Kalan= "$satir[0]";
$Toplam_Kalan= ($Verilen_Konsinye)-($Toplam_Satilan)-($Toplam_Numune);
 ?><?php echo $Toplam_Kalan; ?></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='Hyaluronic_Acid' and SATIS_DEPRESANT='$sorumlu_kodu' ");
$satir = mysql_fetch_array($bilgi);
$Arac_Stok= "$satir[0]";
$Arac_Stok= ($Toplam_Kalan)-($KalanKonsinye);
 ?><?php echo $Arac_Stok; ?></span></td>
</tr>
<!-- /      Hyaluronic_Acid BİTİŞ  -->



<!-- /     Ortho_Vit BASLANGIC  -->
<tr>
<td>Ortho Vit</td>
<td><?php
include"baglan.php";
$query = mysql_query("SELECT SUM(STOK_GIRIS_ADET) FROM stoklar WHERE STOK_LINK='Ortho_Vit' and STOK_DEPRESANT='$sorumlu_kodu'");  
$row = mysql_fetch_array($query); 
$Verilen_Konsinye=$row['SUM(STOK_GIRIS_ADET)'];  
 echo $Verilen_Konsinye;
?>
</td>
<td>
<?php
include"baglan.php";
$sorumlu_kodu=$_SESSION["kullanici_adi"];
$query = mysql_query("SELECT SUM(URUN_IADE_ADET) FROM iadeler WHERE URUN_LINK='Ortho_Vit' and SATIS_DEPRESANT='$sorumlu_kodu'");  
$row = mysql_fetch_array($query); 
$Konsinyeiade=$row['SUM(URUN_IADE_ADET)'];  
 ?>
<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='Ortho_Vit' and KONSINYE_DEPRESANT='$sorumlu_kodu'");  
$row = mysql_fetch_array($query); 
$Konsinyetoplam=$row['SUM(SATIS_ADET)']-$Konsinyeiade;  
 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='Ortho_Vit' 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='Ortho_Vit' 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='Ortho_Vit' 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='Ortho_Vit' 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='Ortho_Vit' 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) FROM konsinyesatis WHERE SATIS_SEKLI='Numune' and   KONSINYE_URUN_ADI='Ortho_Vit'   and SATIS_DEPRESANT='$sorumlu_kodu' ");
$satir = mysql_fetch_array($bilgi);
$Toplam_Numune= "$satir[0]";
 
 ?><?php echo $Toplam_Numune; ?></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='Ortho_Vit'  and SATIS_DEPRESANT='$sorumlu_kodu' ");
$satir = mysql_fetch_array($bilgi);
$Toplam_Kalan= "$satir[0]";
$Toplam_Kalan= ($Verilen_Konsinye)-($Toplam_Satilan)-($Toplam_Numune);
 ?><?php echo $Toplam_Kalan; ?></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='Ortho_Vit' and SATIS_DEPRESANT='$sorumlu_kodu' ");
$satir = mysql_fetch_array($bilgi);
$Arac_Stok= "$satir[0]";
$Arac_Stok= ($Toplam_Kalan)-($KalanKonsinye);
 ?><?php echo $Arac_Stok; ?></span></td>
</tr>
<!-- /     Ortho_Vit BİTİŞ  -->

<!-- /     X_Factor BASLANGIC  -->
<tr>
<td>X Factor</td>
<td><?php
include"baglan.php";
$query = mysql_query("SELECT SUM(STOK_GIRIS_ADET) FROM stoklar WHERE STOK_LINK LIKE 'X_Factor%' and STOK_DEPRESANT='$sorumlu_kodu'");  
$row = mysql_fetch_array($query); 
$Verilen_Konsinye=$row['SUM(STOK_GIRIS_ADET)'];  
 echo $Verilen_Konsinye;
?>
</td>
<td>
<?php
include"baglan.php";
$sorumlu_kodu=$_SESSION["kullanici_adi"];
$query = mysql_query("SELECT SUM(URUN_IADE_ADET) FROM iadeler WHERE STOK_LINK LIKE 'X_Factor%' and SATIS_DEPRESANT='$sorumlu_kodu'");  
$row = mysql_fetch_array($query); 
$Konsinyeiade=$row['SUM(URUN_IADE_ADET)'];  
 ?>
<span class="badge bg-red">
<?php
include"baglan.php";
$sorumlu_kodu=$_SESSION["kullanici_adi"];
$query = mysql_query("SELECT SUM(SATIS_ADET) FROM konsinyeler WHERE STOK_LINK LIKE 'X_Factor%' and KONSINYE_DEPRESANT='$sorumlu_kodu'");  
$row = mysql_fetch_array($query); 
$Konsinyetoplam=$row['SUM(SATIS_ADET)']-$Konsinyeiade;  
 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 LIKE 'X_Factor%' 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 LIKE 'X_Factor%' 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 LIKE 'X_Factor%' 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 LIKE 'X_Factor%' 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 LIKE 'X_Factor%' 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) FROM konsinyesatis WHERE SATIS_SEKLI='Numune' and  KONSINYE_URUN_ADI LIKE 'X_Factor%'  and SATIS_DEPRESANT='$sorumlu_kodu' ");
$satir = mysql_fetch_array($bilgi);
$Toplam_Numune= "$satir[0]";
 
 ?><?php echo $Toplam_Numune; ?></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 LIKE 'X_Factor%'  and SATIS_DEPRESANT='$sorumlu_kodu' ");
$satir = mysql_fetch_array($bilgi);
$Toplam_Kalan= "$satir[0]";
$Toplam_Kalan= ($Verilen_Konsinye)-($Toplam_Satilan)-($Toplam_Numune);
 ?><?php echo $Toplam_Kalan; ?></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 LIKE 'X_Factor%'  and SATIS_DEPRESANT='$sorumlu_kodu' ");
$satir = mysql_fetch_array($bilgi);
$Arac_Stok= "$satir[0]";
$Arac_Stok= ($Toplam_Kalan)-($KalanKonsinye);
 ?><?php echo $Arac_Stok; ?></span></td>
</tr>
<!-- /     X_Factor BİTİŞ  -->



<!-- /     Orthowest_Gr_Lapis BASLANGIC  -->
<tr>
<td>O. Lapis</td>
<td><?php
include"baglan.php";
$query = mysql_query("SELECT SUM(STOK_GIRIS_ADET) FROM stoklar WHERE STOK_LINK='Orthowest_Gr_Lapis' and STOK_DEPRESANT='$sorumlu_kodu'");  
$row = mysql_fetch_array($query); 
$Verilen_Konsinye=$row['SUM(STOK_GIRIS_ADET)'];  
 echo $Verilen_Konsinye;
?>
</td>
<td>
<?php
include"baglan.php";
$sorumlu_kodu=$_SESSION["kullanici_adi"];
$query = mysql_query("SELECT SUM(URUN_IADE_ADET) FROM iadeler WHERE URUN_LINK='Orthowest_Gr_Lapis' and SATIS_DEPRESANT='$sorumlu_kodu'");  
$row = mysql_fetch_array($query); 
$Konsinyeiade=$row['SUM(URUN_IADE_ADET)'];  
 ?>
<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='Orthowest_Gr_Lapis' and KONSINYE_DEPRESANT='$sorumlu_kodu'");  
$row = mysql_fetch_array($query); 
$Konsinyetoplam=$row['SUM(SATIS_ADET)']-$Konsinyeiade;  
 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='Orthowest_Gr_Lapis' 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='Orthowest_Gr_Lapis' 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='Orthowest_Gr_Lapis' 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='Orthowest_Gr_Lapis' 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='Orthowest_Gr_Lapis' 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) FROM konsinyesatis WHERE SATIS_SEKLI='Numune' and   KONSINYE_URUN_ADI='Orthowest_Gr_Lapis'   and SATIS_DEPRESANT='$sorumlu_kodu' ");
$satir = mysql_fetch_array($bilgi);
$Toplam_Numune= "$satir[0]";
 
 ?><?php echo $Toplam_Numune; ?></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='Orthowest_Gr_Lapis'  and SATIS_DEPRESANT='$sorumlu_kodu' ");
$satir = mysql_fetch_array($bilgi);
$Toplam_Kalan= "$satir[0]";
$Toplam_Kalan= ($Verilen_Konsinye)-($Toplam_Satilan)-($Toplam_Numune);
 ?><?php echo $Toplam_Kalan; ?></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='Orthowest_Gr_Lapis' and SATIS_DEPRESANT='$sorumlu_kodu' ");
$satir = mysql_fetch_array($bilgi);
$Arac_Stok= "$satir[0]";
$Arac_Stok= ($Toplam_Kalan)-($KalanKonsinye);
 ?><?php echo $Arac_Stok; ?></span></td>
</tr>
<!-- /     Orthowest_Gr_Lapis BİTİŞ  -->


<!-- /     Orthowest_Inf_Fort BASLANGIC  -->
<tr>
<td>O. Inf Fort</td>
<td><?php
include"baglan.php";
$query = mysql_query("SELECT SUM(STOK_GIRIS_ADET) FROM stoklar WHERE STOK_LINK='Orthowest_Inf_Fort' and STOK_DEPRESANT='$sorumlu_kodu'");  
$row = mysql_fetch_array($query); 
$Verilen_Konsinye=$row['SUM(STOK_GIRIS_ADET)'];  
 echo $Verilen_Konsinye;
?>
</td>
<td>
<?php
include"baglan.php";
$sorumlu_kodu=$_SESSION["kullanici_adi"];
$query = mysql_query("SELECT SUM(URUN_IADE_ADET) FROM iadeler WHERE URUN_LINK='Orthowest_Inf_Fort' and SATIS_DEPRESANT='$sorumlu_kodu'");  
$row = mysql_fetch_array($query); 
$Konsinyeiade=$row['SUM(URUN_IADE_ADET)'];  
 ?>
<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='Orthowest_Inf_Fort' and KONSINYE_DEPRESANT='$sorumlu_kodu'");  
$row = mysql_fetch_array($query); 
$Konsinyetoplam=$row['SUM(SATIS_ADET)']-$Konsinyeiade;  
 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='Orthowest_Inf_Fort' 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='Orthowest_Inf_Fort' 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='Orthowest_Inf_Fort' 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='Orthowest_Inf_Fort' 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='Orthowest_Inf_Fort' 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) FROM konsinyesatis WHERE SATIS_SEKLI='Numune' and   KONSINYE_URUN_ADI='Orthowest_Inf_Fort'   and SATIS_DEPRESANT='$sorumlu_kodu' ");
$satir = mysql_fetch_array($bilgi);
$Toplam_Numune= "$satir[0]";
 
 ?><?php echo $Toplam_Numune; ?></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='Orthowest_Inf_Fort'  and SATIS_DEPRESANT='$sorumlu_kodu' ");
$satir = mysql_fetch_array($bilgi);
$Toplam_Kalan= "$satir[0]";
$Toplam_Kalan= ($Verilen_Konsinye)-($Toplam_Satilan)-($Toplam_Numune);
 ?><?php echo $Toplam_Kalan; ?></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='Orthowest_Inf_Fort' and SATIS_DEPRESANT='$sorumlu_kodu' ");
$satir = mysql_fetch_array($bilgi);
$Arac_Stok= "$satir[0]";
$Arac_Stok= ($Toplam_Kalan)-($KalanKonsinye);
 ?><?php echo $Arac_Stok; ?></span></td>
</tr>
<!-- /     Orthowest_Inf_Fort BİTİŞ  -->



<!-- /     Orthowest_Hypersaw BASLANGIC  -->
<tr>
<td>Hypersaw</td>
<td><?php
include"baglan.php";
$query = mysql_query("SELECT SUM(STOK_GIRIS_ADET) FROM stoklar WHERE STOK_LINK='Orthowest_Hypersaw' and STOK_DEPRESANT='$sorumlu_kodu'");  
$row = mysql_fetch_array($query); 
$Verilen_Konsinye=$row['SUM(STOK_GIRIS_ADET)'];  
 echo $Verilen_Konsinye;
?>
</td>
<td>
<?php
include"baglan.php";
$sorumlu_kodu=$_SESSION["kullanici_adi"];
$query = mysql_query("SELECT SUM(URUN_IADE_ADET) FROM iadeler WHERE URUN_LINK='Orthowest_Hypersaw' and SATIS_DEPRESANT='$sorumlu_kodu'");  
$row = mysql_fetch_array($query); 
$Konsinyeiade=$row['SUM(URUN_IADE_ADET)'];  
 ?>
<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='Orthowest_Hypersaw' and KONSINYE_DEPRESANT='$sorumlu_kodu'");  
$row = mysql_fetch_array($query); 
$Konsinyetoplam=$row['SUM(SATIS_ADET)']-$Konsinyeiade;  
 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='Orthowest_Hypersaw' 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='Orthowest_Hypersaw' 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='Orthowest_Hypersaw' 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='Orthowest_Hypersaw' 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='Orthowest_Hypersaw' 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) FROM konsinyesatis WHERE SATIS_SEKLI='Numune' and   KONSINYE_URUN_ADI='Orthowest_Hypersaw'   and SATIS_DEPRESANT='$sorumlu_kodu' ");
$satir = mysql_fetch_array($bilgi);
$Toplam_Numune= "$satir[0]";
 
 ?><?php echo $Toplam_Numune; ?></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='Orthowest_Hypersaw'  and SATIS_DEPRESANT='$sorumlu_kodu' ");
$satir = mysql_fetch_array($bilgi);
$Toplam_Kalan= "$satir[0]";
$Toplam_Kalan= ($Verilen_Konsinye)-($Toplam_Satilan)-($Toplam_Numune);
 ?><?php echo $Toplam_Kalan; ?></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='Orthowest_Hypersaw' and SATIS_DEPRESANT='$sorumlu_kodu' ");
$satir = mysql_fetch_array($bilgi);
$Arac_Stok= "$satir[0]";
$Arac_Stok= ($Toplam_Kalan)-($KalanKonsinye);
 ?><?php echo $Arac_Stok; ?></span></td>
</tr>
<!-- /     Orthowest_Hypersaw BİTİŞ  -->

<!-- /     Orthowest_Maca BASLANGIC  -->
<tr>
<td>O. Maca</td>
<td><?php
include"baglan.php";
$query = mysql_query("SELECT SUM(STOK_GIRIS_ADET) FROM stoklar WHERE STOK_LINK='Orthowest_Maca' and STOK_DEPRESANT='$sorumlu_kodu'");  
$row = mysql_fetch_array($query); 
$Verilen_Konsinye=$row['SUM(STOK_GIRIS_ADET)'];  
 echo $Verilen_Konsinye;
?>
</td>
<td>
<?php
include"baglan.php";
$sorumlu_kodu=$_SESSION["kullanici_adi"];
$query = mysql_query("SELECT SUM(URUN_IADE_ADET) FROM iadeler WHERE URUN_LINK='Orthowest_Maca' and SATIS_DEPRESANT='$sorumlu_kodu'");  
$row = mysql_fetch_array($query); 
$Konsinyeiade=$row['SUM(URUN_IADE_ADET)'];  
 ?>
<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='Orthowest_Maca' and KONSINYE_DEPRESANT='$sorumlu_kodu'");  
$row = mysql_fetch_array($query); 
$Konsinyetoplam=$row['SUM(SATIS_ADET)']-$Konsinyeiade;  
 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='Orthowest_Maca' 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='Orthowest_Maca' 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='Orthowest_Maca' 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='Orthowest_Maca' 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='Orthowest_Maca' 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) FROM konsinyesatis WHERE SATIS_SEKLI='Numune' and   KONSINYE_URUN_ADI='Orthowest_Maca'   and SATIS_DEPRESANT='$sorumlu_kodu' ");
$satir = mysql_fetch_array($bilgi);
$Toplam_Numune= "$satir[0]";
 
 ?><?php echo $Toplam_Numune; ?></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='Orthowest_Maca'  and SATIS_DEPRESANT='$sorumlu_kodu' ");
$satir = mysql_fetch_array($bilgi);
$Toplam_Kalan= "$satir[0]";
$Toplam_Kalan= ($Verilen_Konsinye)-($Toplam_Satilan)-($Toplam_Numune);
 ?><?php echo $Toplam_Kalan; ?></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='Orthowest_Maca' and SATIS_DEPRESANT='$sorumlu_kodu' ");
$satir = mysql_fetch_array($bilgi);
$Arac_Stok= "$satir[0]";
$Arac_Stok= ($Toplam_Kalan)-($KalanKonsinye);
 ?><?php echo $Arac_Stok; ?></span></td>
</tr>
<!-- /     Orthowest_Maca BİTİŞ  -->

<!-- /     Orthowest_At_Ronex BASLANGIC  -->
<tr>
<td>At Ronex </td>
<td><?php
include"baglan.php";
$query = mysql_query("SELECT SUM(STOK_GIRIS_ADET) FROM stoklar WHERE STOK_LINK='Orthowest_At_Ronex' and STOK_DEPRESANT='$sorumlu_kodu'");  
$row = mysql_fetch_array($query); 
$Verilen_Konsinye=$row['SUM(STOK_GIRIS_ADET)'];  




 echo $Verilen_Konsinye;


?>
</td>
<td>
<?php
include"baglan.php";
$sorumlu_kodu=$_SESSION["kullanici_adi"];
$query = mysql_query("SELECT SUM(URUN_IADE_ADET) FROM iadeler WHERE URUN_LINK='Orthowest_At_Ronex' and SATIS_DEPRESANT='$sorumlu_kodu'");  
$row = mysql_fetch_array($query); 
$Konsinyeiade=$row['SUM(URUN_IADE_ADET)'];  
 ?>
<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='Orthowest_At_Ronex' and KONSINYE_DEPRESANT='$sorumlu_kodu'");  
$row = mysql_fetch_array($query); 
$Konsinyetoplam=$row['SUM(SATIS_ADET)']-$Konsinyeiade;  
 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='Orthowest_At_Ronex' 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='Orthowest_At_Ronex' 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='Orthowest_At_Ronex' 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='Orthowest_At_Ronex' 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='Orthowest_At_Ronex' 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) FROM konsinyesatis WHERE SATIS_SEKLI='Numune' and   KONSINYE_URUN_ADI='Orthowest_At_Ronex'   and SATIS_DEPRESANT='$sorumlu_kodu' ");
$satir = mysql_fetch_array($bilgi);
$Toplam_Numune= "$satir[0]";
 
 ?><?php echo $Toplam_Numune; ?></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='Orthowest_At_Ronex'  and SATIS_DEPRESANT='$sorumlu_kodu' ");
$satir = mysql_fetch_array($bilgi);
$Toplam_Kalan= "$satir[0]";
$Toplam_Kalan= ($Verilen_Konsinye)-($Toplam_Satilan)-($Toplam_Numune);
 ?><?php echo $Toplam_Kalan; ?></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='Orthowest_At_Ronex' and SATIS_DEPRESANT='$sorumlu_kodu' ");
$satir = mysql_fetch_array($bilgi);
$Arac_Stok= "$satir[0]";
$Arac_Stok= ($Toplam_Kalan)-($KalanKonsinye);
 ?><?php echo $Arac_Stok; ?></span></td>
</tr>
<!-- /     Orthowest_At_Ronex BİTİŞ  -->



<!-- /     Orthowest_Hyaluronik_Asit BASLANGIC  -->
<tr>
<td>O. H. Asit</td>
<td><?php
include"baglan.php";
$query = mysql_query("SELECT SUM(STOK_GIRIS_ADET) FROM stoklar WHERE STOK_LINK='Orthowest_Hyaluronik_Asit' and STOK_DEPRESANT='$sorumlu_kodu'");  
$row = mysql_fetch_array($query); 
$Verilen_Konsinye=$row['SUM(STOK_GIRIS_ADET)'];  
 echo $Verilen_Konsinye;
?>
</td>
<td>
<?php
include"baglan.php";
$sorumlu_kodu=$_SESSION["kullanici_adi"];
$query = mysql_query("SELECT SUM(URUN_IADE_ADET) FROM iadeler WHERE URUN_LINK='Orthowest_Hyaluronik_Asit' and SATIS_DEPRESANT='$sorumlu_kodu'");  
$row = mysql_fetch_array($query); 
$Konsinyeiade=$row['SUM(URUN_IADE_ADET)'];  
 ?>
<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='Orthowest_Hyaluronik_Asit' and KONSINYE_DEPRESANT='$sorumlu_kodu'");  
$row = mysql_fetch_array($query); 
$Konsinyetoplam=$row['SUM(SATIS_ADET)']-$Konsinyeiade;  
 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='Orthowest_Hyaluronik_Asit' 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='Orthowest_Hyaluronik_Asit' 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='Orthowest_Hyaluronik_Asit' 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='Orthowest_Hyaluronik_Asit' 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='Orthowest_Hyaluronik_Asit' 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) FROM konsinyesatis WHERE SATIS_SEKLI='Numune' and   KONSINYE_URUN_ADI='Orthowest_Hyaluronik_Asit'   and SATIS_DEPRESANT='$sorumlu_kodu' ");
$satir = mysql_fetch_array($bilgi);
$Toplam_Numune= "$satir[0]";
 
 ?><?php echo $Toplam_Numune; ?></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='Orthowest_Hyaluronik_Asit'  and SATIS_DEPRESANT='$sorumlu_kodu' ");
$satir = mysql_fetch_array($bilgi);
$Toplam_Kalan= "$satir[0]";
$Toplam_Kalan= ($Verilen_Konsinye)-($Toplam_Satilan)-($Toplam_Numune);
 ?><?php echo $Toplam_Kalan; ?></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='Orthowest_Hyaluronik_Asit' and SATIS_DEPRESANT='$sorumlu_kodu' ");
$satir = mysql_fetch_array($bilgi);
$Arac_Stok= "$satir[0]";
$Arac_Stok= ($Toplam_Kalan)-($KalanKonsinye);
 ?><?php echo $Arac_Stok; ?></span></td>
</tr>
<!-- /     Orthowest_Hyaluronik_Asit BİTİŞ  -->



,

<!-- /     Maca_Max BASLANGIC  -->
<tr>
<td>Maca Max</td>
<td><?php
include"baglan.php";
$query = mysql_query("SELECT SUM(STOK_GIRIS_ADET) FROM stoklar WHERE STOK_LINK='Maca_Max' and STOK_DEPRESANT='$sorumlu_kodu'");  
$row = mysql_fetch_array($query); 
$Verilen_Konsinye=$row['SUM(STOK_GIRIS_ADET)'];  
 echo $Verilen_Konsinye;
?>
</td>
<td>
<?php
include"baglan.php";
$sorumlu_kodu=$_SESSION["kullanici_adi"];
$query = mysql_query("SELECT SUM(URUN_IADE_ADET) FROM iadeler WHERE URUN_LINK='Maca_Max' and SATIS_DEPRESANT='$sorumlu_kodu'");  
$row = mysql_fetch_array($query); 
$Konsinyeiade=$row['SUM(URUN_IADE_ADET)'];  
 ?>
<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='Maca_Max' and KONSINYE_DEPRESANT='$sorumlu_kodu'");  
$row = mysql_fetch_array($query); 
$Konsinyetoplam=$row['SUM(SATIS_ADET)']-$Konsinyeiade;  
 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='Maca_Max' 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='Maca_Max' 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='Maca_Max' 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='Maca_Max' 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='Maca_Max' 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) FROM konsinyesatis WHERE SATIS_SEKLI='Numune' and   KONSINYE_URUN_ADI='Maca_Max'   and SATIS_DEPRESANT='$sorumlu_kodu' ");
$satir = mysql_fetch_array($bilgi);
$Toplam_Numune= "$satir[0]";
 
 ?><?php echo $Toplam_Numune; ?></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='Maca_Max'  and SATIS_DEPRESANT='$sorumlu_kodu' ");
$satir = mysql_fetch_array($bilgi);
$Toplam_Kalan= "$satir[0]";
$Toplam_Kalan= ($Verilen_Konsinye)-($Toplam_Satilan)-($Toplam_Numune);
 ?><?php echo $Toplam_Kalan; ?></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='Maca_Max' and SATIS_DEPRESANT='$sorumlu_kodu' ");
$satir = mysql_fetch_array($bilgi);
$Arac_Stok= "$satir[0]";
$Arac_Stok= ($Toplam_Kalan)-($KalanKonsinye);
 ?><?php echo $Arac_Stok; ?></span></td>
</tr>
<!-- /     Maca_Max BİTİŞ  -->






<!-- /     Proyal_40mg BASLANGIC  -->
<tr>
<td>Proyal</td>
<td><?php
include"baglan.php";
$query = mysql_query("SELECT SUM(STOK_GIRIS_ADET) FROM stoklar WHERE STOK_LINK='Proyal_40mg' and STOK_DEPRESANT='$sorumlu_kodu'");  
$row = mysql_fetch_array($query); 
$Verilen_Konsinye=$row['SUM(STOK_GIRIS_ADET)'];  
 echo $Verilen_Konsinye;
?>
</td>
<td>
<?php
include"baglan.php";
$sorumlu_kodu=$_SESSION["kullanici_adi"];
$query = mysql_query("SELECT SUM(URUN_IADE_ADET) FROM iadeler WHERE URUN_LINK='Proyal_40mg' and SATIS_DEPRESANT='$sorumlu_kodu'");  
$row = mysql_fetch_array($query); 
$Konsinyeiade=$row['SUM(URUN_IADE_ADET)'];  
 ?>
<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='Proyal_40mg' and KONSINYE_DEPRESANT='$sorumlu_kodu'");  
$row = mysql_fetch_array($query); 
$Konsinyetoplam=$row['SUM(SATIS_ADET)']-$Konsinyeiade;  
 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='Proyal_40mg' 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='Proyal_40mg' 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='Proyal_40mg' 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='Proyal_40mg' 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='Proyal_40mg' 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) FROM konsinyesatis WHERE SATIS_SEKLI='Numune' and   KONSINYE_URUN_ADI='Proyal_40mg'   and SATIS_DEPRESANT='$sorumlu_kodu' ");
$satir = mysql_fetch_array($bilgi);
$Toplam_Numune= "$satir[0]";
 
 ?><?php echo $Toplam_Numune; ?></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='Proyal_40mg'  and SATIS_DEPRESANT='$sorumlu_kodu' ");
$satir = mysql_fetch_array($bilgi);
$Toplam_Kalan= "$satir[0]";
$Toplam_Kalan= ($Verilen_Konsinye)-($Toplam_Satilan)-($Toplam_Numune);
 ?><?php echo $Toplam_Kalan; ?></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='Proyal_40mg' and SATIS_DEPRESANT='$sorumlu_kodu' ");
$satir = mysql_fetch_array($bilgi);
$Arac_Stok= "$satir[0]";
$Arac_Stok= ($Toplam_Kalan)-($KalanKonsinye);
 ?><?php echo $Arac_Stok; ?></span></td>
</tr>
<!-- /     Proyal_40mg BİTİŞ  -->



, 







              </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_LINK"],'</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>
               