<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">



<a  href="admin.php?target=depostok"> <button  class="btn btn-primary btn-sm bg-red">Orthowest Stok</button></a>
 <a  href="admin.php?target=urunkisi&?&PERSONEL_MAIL=info@parkmed.com.tr"> <button  class="btn btn-primary btn-sm">Parkmed Merkez</button></a>
 <a  href="admin.php?target=urunkisi&?&PERSONEL_MAIL=besevler@parkmed.com.tr"> <button  class="btn btn-primary btn-sm">Parkmed Beşevler</button></a>
<br><br>

 <a  href="admin.php?target=urunkisi&?&PERSONEL_MAIL=sedasanal@orthowest.com.tr"> <button  class="btn btn-primary btn-sm">Seda Sanal</button></a>
<a  href="admin.php?target=urunkisi&?&PERSONEL_MAIL=umutavci@orthowest.com.tr"> <button  class="btn btn-primary btn-sm">Umut Avcı</button></a>
<a  href="admin.php?target=urunkisi&?&PERSONEL_MAIL=emrahavci@orthowest.com.tr"> <button  class="btn btn-primary btn-sm">Emrah Avcı</button></a>
<a  href="admin.php?target=urunkisi&?&PERSONEL_MAIL=gozdesire@orthowest.com.tr"> <button  class="btn btn-primary btn-sm">Gözde Şire</button></a>
<a  href="admin.php?target=urunkisi&?&PERSONEL_MAIL=selmaakdogan@orthowest.com.tr"> <button  class="btn btn-primary btn-sm">Selma Akdoğan</button></a>
<a  href="admin.php?target=urunkisi&?&PERSONEL_MAIL=gultenbasaran@orthowest.com.tr"> <button  class="btn btn-primary btn-sm">Gülten Başaran</button></a>
<a  href="admin.php?target=urunkisi&?&PERSONEL_MAIL=suatdemirok@orthowest.com.tr"> <button  class="btn btn-primary btn-sm">Suat Demirok</button></a>
<a  href="admin.php?target=urunkisi&?&PERSONEL_MAIL=oguzhankartaltepe@orthowest.com.tr"> <button  class="btn btn-primary btn-sm">Oğuzhan Kartaltepe</button></a>
<a  href="admin.php?target=urunkisi&?&PERSONEL_MAIL=hayrikes@orthowest.com.tr"> <button  class="btn btn-primary btn-sm">Hayri Keş</button></a>
<a  href="admin.php?target=urunkisi&?&PERSONEL_MAIL=tolunayoztosun@orthowest.com.tr"> <button  class="btn btn-primary btn-sm">Tolunay Öztosun</button></a>
<br>
 

 
              <table class="table table-bordered">
                <tbody><tr>
                  
                  <th>Ürün Adı</th>

 <th style="width: 120px">Depo Giriş Stok</th>       
<th style="width: 120px">Depodan Verilen</th>
 <th style="width: 120px">Depoda Kalan 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 Satılan</th>
<th style="width: 120px">Bayi+Şube Verilen</th>
<th style="width: 120px">Araçlardaki Stok</th>
<th style="width: 120px">Toplam Sahada 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 anastoklar WHERE STOK_LINK='Saw_Palmetto'");  
$row = mysql_fetch_array($query); 
$Depo_Giris=$row['SUM(STOK_GIRIS_ADET)'];  
echo $Depo_Giris;
?>
</td>



<td><span class="badge bg-red"><?php
include"baglan.php";
$query = mysql_query("SELECT SUM(STOK_GIRIS_ADET) FROM stoklar WHERE STOK_LINK='Saw_Palmetto' ");  
$row = mysql_fetch_array($query); 
 
$Depodan_Verilen=$row['SUM(STOK_GIRIS_ADET)'];  
echo $Depodan_Verilen;
?>
</span>
</td>




<td><span class="badge bg-green" style="font-size:16px;">
<?php
include"baglan.php";

$bilgi= mysql_query("SELECT SUM(STOK_GIRIS_ADET) FROM stoklar WHERE STOK_LINK='Saw_Palmetto'");
$satir = mysql_fetch_array($bilgi);

$Guncel_Depo= "$satir[0]";

$Guncel_Depo= ($Depo_Giris)-($Depodan_Verilen);
 
?><?php echo $Guncel_Depo; ?></span></td>




<td>

<span class="badge bg-yellow">
<?php
include"baglan.php";
$sorumlu_kodu=$_SESSION["kullanici_adi"];
$query = mysql_query("SELECT SUM(SATIS_ADET) FROM konsinyeler WHERE KONSINYE_URUN_ADI='Saw_Palmetto' ");  
$row = mysql_fetch_array($query); 
$Konsinyetoplam=$row['SUM(SATIS_ADET)'];  
echo $Konsinyetoplam;
?></span>
</td>


<td><span class="badge bg-red">
<?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_SEKLI='Konsinye_Satis'");  
$row = mysql_fetch_array($query); 
$KonsinyeSatistoplam=$row['SUM(SATIS_ADET)'];  
 echo $KonsinyeSatistoplam;
?></span>
</td>



<td><span class="badge bg-blue" style="font-size:16px;">
<?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'  ");
$satir = mysql_fetch_array($bilgi);
$KalanKonsinye= "$satir[0]";
$KalanKonsinye= ($Konsinyetoplam)-($KonsinyeSatistoplam);
 ?><?php echo $KalanKonsinye; ?></span></td>



<td><span class="badge bg-red">
<?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_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'  ");
$satir = mysql_fetch_array($bilgi);
$Aqualyx_satis= "$satir[0]";
$Toplam_Satilan= ($KonsinyeSatistoplam)+($Satistoplam);
 ?><?php echo $Toplam_Satilan; ?></span></td>

 


<td><span class="badge bg-red" style="font-size:16px;"><?php
include"baglan.php";
$query = mysql_query("SELECT SUM(STOK_GIRIS_ADET) FROM stoklar WHERE  STOK_LINK='Saw_Palmetto' and STOK_TURU='Sube' ");  
$row = mysql_fetch_array($query); 
$Sube_Verilen=$row['SUM(STOK_GIRIS_ADET)'];  

$query = mysql_query("SELECT SUM(STOK_GIRIS_ADET) FROM stoklar WHERE  STOK_LINK='Saw_Palmetto' and STOK_TURU='Bayi' ");  
$row = mysql_fetch_array($query); 
$Bayi_Verilen=$row['SUM(STOK_GIRIS_ADET)'];  
$Bayi_Sube_Toplam=($Bayi_Verilen)+($Sube_Verilen);

echo $Bayi_Sube_Toplam;
?> 
</span>
</td>
 
 

<td><span class="badge bg-green" style="font-size:16px;">
<?php

$bilgi= mysql_query("SELECT SUM(SATIS_ADET),SUM(SATIS_TOPLAM) FROM konsinyesatis WHERE KONSINYE_URUN_ADI='Saw_Palmetto'  ");
$satir = mysql_fetch_array($bilgi);
$Arac_Stok= "$satir[0]";
$Arac_Stok= ($Depodan_Verilen)-($Konsinyetoplam)-($Bayi_Sube_Toplam)-($Satistoplam);
 ?><?php echo $Arac_Stok; ?></span></td>


<td><span class="badge bg-green" style="font-size:16px;">
<?php
include"baglan.php";

$bilgi= mysql_query("SELECT SUM(SATIS_ADET),SUM(SATIS_TOPLAM) FROM konsinyesatis WHERE KONSINYE_URUN_ADI='Saw_Palmetto'  ");
$satir = mysql_fetch_array($bilgi);

$Toplam_Kalan=($KalanKonsinye)+($Arac_Stok);
 ?><?php echo $Toplam_Kalan; ?></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 anastoklar WHERE STOK_LINK='Gire_Plus'");  
$row = mysql_fetch_array($query); 

$Depo_Giris=$row['SUM(STOK_GIRIS_ADET)'];  
echo $Depo_Giris;
?>
</td>



<td><span class="badge bg-red"><?php
include"baglan.php";
$query = mysql_query("SELECT SUM(STOK_GIRIS_ADET) FROM stoklar WHERE STOK_LINK='Gire_Plus' ");  
$row = mysql_fetch_array($query); 
$Depodan_Verilen=$row['SUM(STOK_GIRIS_ADET)'];  
echo $Depodan_Verilen;
?>
</span>
</td>




<td><span class="badge bg-green" style="font-size:16px;">
<?php
include"baglan.php";

$bilgi= mysql_query("SELECT SUM(STOK_GIRIS_ADET) FROM stoklar WHERE STOK_LINK='Gire_Plus'");
$satir = mysql_fetch_array($bilgi);

$Guncel_Depo= "$satir[0]";



$Guncel_Depo= ($Depo_Giris)-($Depodan_Verilen);
 
?><?php echo $Guncel_Depo; ?></span></td>




<td>

<span class="badge bg-yellow">
<?php
include"baglan.php";
$sorumlu_kodu=$_SESSION["kullanici_adi"];
$query = mysql_query("SELECT SUM(SATIS_ADET) FROM konsinyeler WHERE KONSINYE_URUN_ADI='Gire_Plus' ");  
$row = mysql_fetch_array($query); 
$Konsinyetoplam=$row['SUM(SATIS_ADET)'];  
echo $Konsinyetoplam;
?></span>
</td>


<td><span class="badge bg-red">
<?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_SEKLI='Konsinye_Satis'");  
$row = mysql_fetch_array($query); 
$KonsinyeSatistoplam=$row['SUM(SATIS_ADET)'];  
 echo $KonsinyeSatistoplam;
?></span>
</td>



<td><span class="badge bg-blue" style="font-size:16px;">
<?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'  ");
$satir = mysql_fetch_array($bilgi);
$KalanKonsinye= "$satir[0]";
$KalanKonsinye= ($Konsinyetoplam)-($KonsinyeSatistoplam);
 ?><?php echo $KalanKonsinye; ?></span></td>



<td><span class="badge bg-red">
<?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_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'  ");
$satir = mysql_fetch_array($bilgi);
$Aqualyx_satis= "$satir[0]";
$Toplam_Satilan= ($KonsinyeSatistoplam)+($Satistoplam);
 ?><?php echo $Toplam_Satilan; ?></span></td>

 


<td><span class="badge bg-red" style="font-size:16px;"><?php
include"baglan.php";
$query = mysql_query("SELECT SUM(STOK_GIRIS_ADET) FROM stoklar WHERE  STOK_LINK='Gire_Plus' and STOK_TURU='Sube' ");  
$row = mysql_fetch_array($query); 
$Sube_Verilen=$row['SUM(STOK_GIRIS_ADET)'];  

$query = mysql_query("SELECT SUM(STOK_GIRIS_ADET) FROM stoklar WHERE  STOK_LINK='Gire_Plus' and STOK_TURU='Bayi' ");  
$row = mysql_fetch_array($query); 
$Bayi_Verilen=$row['SUM(STOK_GIRIS_ADET)'];  
$Bayi_Sube_Toplam=($Bayi_Verilen)+($Sube_Verilen);

echo $Bayi_Sube_Toplam;
?> 
</span>
</td>
 
 

<td><span class="badge bg-green" style="font-size:16px;">
<?php

$bilgi= mysql_query("SELECT SUM(SATIS_ADET),SUM(SATIS_TOPLAM) FROM konsinyesatis WHERE KONSINYE_URUN_ADI='Gire_Plus'  ");
$satir = mysql_fetch_array($bilgi);
$Arac_Stok= "$satir[0]";
$Arac_Stok= ($Depodan_Verilen)-($Konsinyetoplam)-($Bayi_Sube_Toplam)-($Satistoplam);
 ?><?php echo $Arac_Stok; ?></span></td>


<td><span class="badge bg-green" style="font-size:16px;">
<?php
include"baglan.php";

$bilgi= mysql_query("SELECT SUM(SATIS_ADET),SUM(SATIS_TOPLAM) FROM konsinyesatis WHERE KONSINYE_URUN_ADI='Gire_Plus'  ");
$satir = mysql_fetch_array($bilgi);

$Toplam_Kalan=($KalanKonsinye)+($Arac_Stok);
 ?><?php echo $Toplam_Kalan; ?></span></td>
</tr>
<!-- /      Gire_Plus BASLANGIC  -->







    
<!-- /      Infix_Epimedium  BASLANGIC  -->

<tr>

<td>Infix_Epimedium</td>

<td><?php
include"baglan.php";
$query = mysql_query("SELECT SUM(STOK_GIRIS_ADET) FROM anastoklar WHERE STOK_LINK='Infix_Epimedium'");  
$row = mysql_fetch_array($query); 
$Depo_Giris=$row['SUM(STOK_GIRIS_ADET)'];  
echo $Depo_Giris;
?>
</td>



<td><span class="badge bg-red"><?php
include"baglan.php";
$query = mysql_query("SELECT SUM(STOK_GIRIS_ADET) FROM stoklar WHERE STOK_LINK='Infix_Epimedium' ");  
$row = mysql_fetch_array($query); 
 
$Depodan_Verilen=$row['SUM(STOK_GIRIS_ADET)'];  
echo $Depodan_Verilen;
?>
</span>
</td>




<td><span class="badge bg-green" style="font-size:16px;">
<?php
include"baglan.php";

$bilgi= mysql_query("SELECT SUM(STOK_GIRIS_ADET) FROM stoklar WHERE STOK_LINK='Infix_Epimedium'");
$satir = mysql_fetch_array($bilgi);

$Guncel_Depo= "$satir[0]";

$Guncel_Depo= ($Depo_Giris)-($Depodan_Verilen);
 
?><?php echo $Guncel_Depo; ?></span></td>




<td>

<span class="badge bg-yellow">
<?php
include"baglan.php";
$sorumlu_kodu=$_SESSION["kullanici_adi"];
$query = mysql_query("SELECT SUM(SATIS_ADET) FROM konsinyeler WHERE KONSINYE_URUN_ADI='Infix_Epimedium' ");  
$row = mysql_fetch_array($query); 
$Konsinyetoplam=$row['SUM(SATIS_ADET)'];  
echo $Konsinyetoplam;
?></span>
</td>


<td><span class="badge bg-red">
<?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_SEKLI='Konsinye_Satis'");  
$row = mysql_fetch_array($query); 
$KonsinyeSatistoplam=$row['SUM(SATIS_ADET)'];  
 echo $KonsinyeSatistoplam;
?></span>
</td>



<td><span class="badge bg-blue" style="font-size:16px;">
<?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'  ");
$satir = mysql_fetch_array($bilgi);
$KalanKonsinye= "$satir[0]";
$KalanKonsinye= ($Konsinyetoplam)-($KonsinyeSatistoplam);
 ?><?php echo $KalanKonsinye; ?></span></td>



<td><span class="badge bg-red">
<?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_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'  ");
$satir = mysql_fetch_array($bilgi);
$Aqualyx_satis= "$satir[0]";
$Toplam_Satilan= ($KonsinyeSatistoplam)+($Satistoplam);
 ?><?php echo $Toplam_Satilan; ?></span></td>

 


<td><span class="badge bg-red" style="font-size:16px;"><?php
include"baglan.php";
$query = mysql_query("SELECT SUM(STOK_GIRIS_ADET) FROM stoklar WHERE  STOK_LINK='Infix_Epimedium' and STOK_TURU='Sube' ");  
$row = mysql_fetch_array($query); 
$Sube_Verilen=$row['SUM(STOK_GIRIS_ADET)'];  

$query = mysql_query("SELECT SUM(STOK_GIRIS_ADET) FROM stoklar WHERE  STOK_LINK='Infix_Epimedium' and STOK_TURU='Bayi' ");  
$row = mysql_fetch_array($query); 
$Bayi_Verilen=$row['SUM(STOK_GIRIS_ADET)'];  
$Bayi_Sube_Toplam=($Bayi_Verilen)+($Sube_Verilen);

echo $Bayi_Sube_Toplam;
?> 
</span>
</td>
 
 

<td><span class="badge bg-green" style="font-size:16px;">
<?php

$bilgi= mysql_query("SELECT SUM(SATIS_ADET),SUM(SATIS_TOPLAM) FROM konsinyesatis WHERE KONSINYE_URUN_ADI='Infix_Epimedium'  ");
$satir = mysql_fetch_array($bilgi);
$Arac_Stok= "$satir[0]";
$Arac_Stok= ($Depodan_Verilen)-($Konsinyetoplam)-($Bayi_Sube_Toplam)-($Satistoplam);
 ?><?php echo $Arac_Stok; ?></span></td>


<td><span class="badge bg-green" style="font-size:16px;">
<?php
include"baglan.php";

$bilgi= mysql_query("SELECT SUM(SATIS_ADET),SUM(SATIS_TOPLAM) FROM konsinyesatis WHERE KONSINYE_URUN_ADI='Infix_Epimedium'  ");
$satir = mysql_fetch_array($bilgi);

$Toplam_Kalan=($KalanKonsinye)+($Arac_Stok);
 ?><?php echo $Toplam_Kalan; ?></span></td>
</tr>
<!-- /      Infix_Epimedium BASLANGIC  -->









   
<!-- /      Ap_Ronks  BASLANGIC  -->

<tr>

<td>Ap_Ronks</td>

<td><?php
include"baglan.php";
$query = mysql_query("SELECT SUM(STOK_GIRIS_ADET) FROM anastoklar WHERE STOK_LINK='Ap_Ronks'");  
$row = mysql_fetch_array($query); 
$Depo_Giris=$row['SUM(STOK_GIRIS_ADET)'];  
echo $Depo_Giris;
?>
</td>



<td><span class="badge bg-red"><?php
include"baglan.php";
$query = mysql_query("SELECT SUM(STOK_GIRIS_ADET) FROM stoklar WHERE STOK_LINK='Ap_Ronks' ");  
$row = mysql_fetch_array($query); 
 
$Depodan_Verilen=$row['SUM(STOK_GIRIS_ADET)'];  
echo $Depodan_Verilen;
?>
</span>
</td>




<td><span class="badge bg-green" style="font-size:16px;">
<?php
include"baglan.php";

$bilgi= mysql_query("SELECT SUM(STOK_GIRIS_ADET) FROM stoklar WHERE STOK_LINK='Ap_Ronks'");
$satir = mysql_fetch_array($bilgi);

$Guncel_Depo= "$satir[0]";

$Guncel_Depo= ($Depo_Giris)-($Depodan_Verilen);
 
?><?php echo $Guncel_Depo; ?></span></td>




<td>

<span class="badge bg-yellow">
<?php
include"baglan.php";
$sorumlu_kodu=$_SESSION["kullanici_adi"];
$query = mysql_query("SELECT SUM(SATIS_ADET) FROM konsinyeler WHERE KONSINYE_URUN_ADI='Ap_Ronks' ");  
$row = mysql_fetch_array($query); 
$Konsinyetoplam=$row['SUM(SATIS_ADET)'];  
echo $Konsinyetoplam;
?></span>
</td>


<td><span class="badge bg-red">
<?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_SEKLI='Konsinye_Satis'");  
$row = mysql_fetch_array($query); 
$KonsinyeSatistoplam=$row['SUM(SATIS_ADET)'];  
 echo $KonsinyeSatistoplam;
?></span>
</td>



<td><span class="badge bg-blue" style="font-size:16px;">
<?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'  ");
$satir = mysql_fetch_array($bilgi);
$KalanKonsinye= "$satir[0]";
$KalanKonsinye= ($Konsinyetoplam)-($KonsinyeSatistoplam);
 ?><?php echo $KalanKonsinye; ?></span></td>



<td><span class="badge bg-red">
<?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_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'  ");
$satir = mysql_fetch_array($bilgi);
$Aqualyx_satis= "$satir[0]";
$Toplam_Satilan= ($KonsinyeSatistoplam)+($Satistoplam);
 ?><?php echo $Toplam_Satilan; ?></span></td>

 


<td><span class="badge bg-red" style="font-size:16px;"><?php
include"baglan.php";
$query = mysql_query("SELECT SUM(STOK_GIRIS_ADET) FROM stoklar WHERE  STOK_LINK='Ap_Ronks' and STOK_TURU='Sube' ");  
$row = mysql_fetch_array($query); 
$Sube_Verilen=$row['SUM(STOK_GIRIS_ADET)'];  

$query = mysql_query("SELECT SUM(STOK_GIRIS_ADET) FROM stoklar WHERE  STOK_LINK='Ap_Ronks' and STOK_TURU='Bayi' ");  
$row = mysql_fetch_array($query); 
$Bayi_Verilen=$row['SUM(STOK_GIRIS_ADET)'];  
$Bayi_Sube_Toplam=($Bayi_Verilen)+($Sube_Verilen);

echo $Bayi_Sube_Toplam;
?> 
</span>
</td>
 
 

<td><span class="badge bg-green" style="font-size:16px;">
<?php

$bilgi= mysql_query("SELECT SUM(SATIS_ADET),SUM(SATIS_TOPLAM) FROM konsinyesatis WHERE KONSINYE_URUN_ADI='Ap_Ronks'  ");
$satir = mysql_fetch_array($bilgi);
$Arac_Stok= "$satir[0]";
$Arac_Stok= ($Depodan_Verilen)-($Konsinyetoplam)-($Bayi_Sube_Toplam)-($Satistoplam);
 ?><?php echo $Arac_Stok; ?></span></td>


<td><span class="badge bg-green" style="font-size:16px;">
<?php
include"baglan.php";

$bilgi= mysql_query("SELECT SUM(SATIS_ADET),SUM(SATIS_TOPLAM) FROM konsinyesatis WHERE KONSINYE_URUN_ADI='Ap_Ronks'  ");
$satir = mysql_fetch_array($bilgi);

$Toplam_Kalan=($KalanKonsinye)+($Arac_Stok);
 ?><?php echo $Toplam_Kalan; ?></span></td>
</tr>
<!-- /      Ap_Ronks BASLANGIC  -->










   
<!-- /      Ossk_Tablet  BASLANGIC  -->

<tr>

<td>Ossk_Tablet</td>

<td><?php
include"baglan.php";
$query = mysql_query("SELECT SUM(STOK_GIRIS_ADET) FROM anastoklar WHERE STOK_LINK='Ossk_Tablet'");  
$row = mysql_fetch_array($query); 
$Depo_Giris=$row['SUM(STOK_GIRIS_ADET)'];  
echo $Depo_Giris;
?>
</td>



<td><span class="badge bg-red"><?php
include"baglan.php";
$query = mysql_query("SELECT SUM(STOK_GIRIS_ADET) FROM stoklar WHERE STOK_LINK='Ossk_Tablet' ");  
$row = mysql_fetch_array($query); 
 
$Depodan_Verilen=$row['SUM(STOK_GIRIS_ADET)'];  
echo $Depodan_Verilen;
?>
</span>
</td>




<td><span class="badge bg-green" style="font-size:16px;">
<?php
include"baglan.php";

$bilgi= mysql_query("SELECT SUM(STOK_GIRIS_ADET) FROM stoklar WHERE STOK_LINK='Ossk_Tablet'");
$satir = mysql_fetch_array($bilgi);

$Guncel_Depo= "$satir[0]";

$Guncel_Depo= ($Depo_Giris)-($Depodan_Verilen);
 
?><?php echo $Guncel_Depo; ?></span></td>




<td>

<span class="badge bg-yellow">
<?php
include"baglan.php";
$sorumlu_kodu=$_SESSION["kullanici_adi"];
$query = mysql_query("SELECT SUM(SATIS_ADET) FROM konsinyeler WHERE KONSINYE_URUN_ADI='Ossk_Tablet' ");  
$row = mysql_fetch_array($query); 
$Konsinyetoplam=$row['SUM(SATIS_ADET)'];  
echo $Konsinyetoplam;
?></span>
</td>


<td><span class="badge bg-red">
<?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_SEKLI='Konsinye_Satis'");  
$row = mysql_fetch_array($query); 
$KonsinyeSatistoplam=$row['SUM(SATIS_ADET)'];  
 echo $KonsinyeSatistoplam;
?></span>
</td>



<td><span class="badge bg-blue" style="font-size:16px;">
<?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'  ");
$satir = mysql_fetch_array($bilgi);
$KalanKonsinye= "$satir[0]";
$KalanKonsinye= ($Konsinyetoplam)-($KonsinyeSatistoplam);
 ?><?php echo $KalanKonsinye; ?></span></td>



<td><span class="badge bg-red">
<?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_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'  ");
$satir = mysql_fetch_array($bilgi);
$Aqualyx_satis= "$satir[0]";
$Toplam_Satilan= ($KonsinyeSatistoplam)+($Satistoplam);
 ?><?php echo $Toplam_Satilan; ?></span></td>

 


<td><span class="badge bg-red" style="font-size:16px;"><?php
include"baglan.php";
$query = mysql_query("SELECT SUM(STOK_GIRIS_ADET) FROM stoklar WHERE  STOK_LINK='Ossk_Tablet' and STOK_TURU='Sube' ");  
$row = mysql_fetch_array($query); 
$Sube_Verilen=$row['SUM(STOK_GIRIS_ADET)'];  

$query = mysql_query("SELECT SUM(STOK_GIRIS_ADET) FROM stoklar WHERE  STOK_LINK='Ossk_Tablet' and STOK_TURU='Bayi' ");  
$row = mysql_fetch_array($query); 
$Bayi_Verilen=$row['SUM(STOK_GIRIS_ADET)'];  
$Bayi_Sube_Toplam=($Bayi_Verilen)+($Sube_Verilen);

echo $Bayi_Sube_Toplam;
?> 
</span>
</td>
 
 

<td><span class="badge bg-green" style="font-size:16px;">
<?php

$bilgi= mysql_query("SELECT SUM(SATIS_ADET),SUM(SATIS_TOPLAM) FROM konsinyesatis WHERE KONSINYE_URUN_ADI='Ossk_Tablet'  ");
$satir = mysql_fetch_array($bilgi);
$Arac_Stok= "$satir[0]";
$Arac_Stok= ($Depodan_Verilen)-($Konsinyetoplam)-($Bayi_Sube_Toplam)-($Satistoplam);
 ?><?php echo $Arac_Stok; ?></span></td>


<td><span class="badge bg-green" style="font-size:16px;">
<?php
include"baglan.php";

$bilgi= mysql_query("SELECT SUM(SATIS_ADET),SUM(SATIS_TOPLAM) FROM konsinyesatis WHERE KONSINYE_URUN_ADI='Ossk_Tablet'  ");
$satir = mysql_fetch_array($bilgi);

$Toplam_Kalan=($KalanKonsinye)+($Arac_Stok);
 ?><?php echo $Toplam_Kalan; ?></span></td>
</tr>
<!-- /      Ossk_Tablet BASLANGIC  -->








   
<!-- /      Hyaluronic_Acid  BASLANGIC  -->

<tr>

<td>Hyaluronic_Acid</td>

<td><?php
include"baglan.php";
$query = mysql_query("SELECT SUM(STOK_GIRIS_ADET) FROM anastoklar WHERE STOK_LINK='Hyaluronic_Acid'");  
$row = mysql_fetch_array($query); 
$Depo_Giris=$row['SUM(STOK_GIRIS_ADET)'];  
echo $Depo_Giris;
?>
</td>



<td><span class="badge bg-red"><?php
include"baglan.php";
$query = mysql_query("SELECT SUM(STOK_GIRIS_ADET) FROM stoklar WHERE STOK_LINK='Hyaluronic_Acid' ");  
$row = mysql_fetch_array($query); 
 
$Depodan_Verilen=$row['SUM(STOK_GIRIS_ADET)'];  
echo $Depodan_Verilen;
?>
</span>
</td>




<td><span class="badge bg-green" style="font-size:16px;">
<?php
include"baglan.php";

$bilgi= mysql_query("SELECT SUM(STOK_GIRIS_ADET) FROM stoklar WHERE STOK_LINK='Hyaluronic_Acid'");
$satir = mysql_fetch_array($bilgi);

$Guncel_Depo= "$satir[0]";

$Guncel_Depo= ($Depo_Giris)-($Depodan_Verilen);
 
?><?php echo $Guncel_Depo; ?></span></td>




<td>

<span class="badge bg-yellow">
<?php
include"baglan.php";
$sorumlu_kodu=$_SESSION["kullanici_adi"];
$query = mysql_query("SELECT SUM(SATIS_ADET) FROM konsinyeler WHERE KONSINYE_URUN_ADI='Hyaluronic_Acid' ");  
$row = mysql_fetch_array($query); 
$Konsinyetoplam=$row['SUM(SATIS_ADET)'];  
echo $Konsinyetoplam;
?></span>
</td>


<td><span class="badge bg-red">
<?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_SEKLI='Konsinye_Satis'");  
$row = mysql_fetch_array($query); 
$KonsinyeSatistoplam=$row['SUM(SATIS_ADET)'];  
 echo $KonsinyeSatistoplam;
?></span>
</td>



<td><span class="badge bg-blue" style="font-size:16px;">
<?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'  ");
$satir = mysql_fetch_array($bilgi);
$KalanKonsinye= "$satir[0]";
$KalanKonsinye= ($Konsinyetoplam)-($KonsinyeSatistoplam);
 ?><?php echo $KalanKonsinye; ?></span></td>



<td><span class="badge bg-red">
<?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_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'  ");
$satir = mysql_fetch_array($bilgi);
$Aqualyx_satis= "$satir[0]";
$Toplam_Satilan= ($KonsinyeSatistoplam)+($Satistoplam);
 ?><?php echo $Toplam_Satilan; ?></span></td>

 


<td><span class="badge bg-red" style="font-size:16px;"><?php
include"baglan.php";
$query = mysql_query("SELECT SUM(STOK_GIRIS_ADET) FROM stoklar WHERE  STOK_LINK='Hyaluronic_Acid' and STOK_TURU='Sube' ");  
$row = mysql_fetch_array($query); 
$Sube_Verilen=$row['SUM(STOK_GIRIS_ADET)'];  

$query = mysql_query("SELECT SUM(STOK_GIRIS_ADET) FROM stoklar WHERE  STOK_LINK='Hyaluronic_Acid' and STOK_TURU='Bayi' ");  
$row = mysql_fetch_array($query); 
$Bayi_Verilen=$row['SUM(STOK_GIRIS_ADET)'];  
$Bayi_Sube_Toplam=($Bayi_Verilen)+($Sube_Verilen);

echo $Bayi_Sube_Toplam;
?> 
</span>
</td>
 
 

<td><span class="badge bg-green" style="font-size:16px;">
<?php

$bilgi= mysql_query("SELECT SUM(SATIS_ADET),SUM(SATIS_TOPLAM) FROM konsinyesatis WHERE KONSINYE_URUN_ADI='Hyaluronic_Acid'  ");
$satir = mysql_fetch_array($bilgi);
$Arac_Stok= "$satir[0]";
$Arac_Stok= ($Depodan_Verilen)-($Konsinyetoplam)-($Bayi_Sube_Toplam)-($Satistoplam);
 ?><?php echo $Arac_Stok; ?></span></td>


<td><span class="badge bg-green" style="font-size:16px;">
<?php
include"baglan.php";

$bilgi= mysql_query("SELECT SUM(SATIS_ADET),SUM(SATIS_TOPLAM) FROM konsinyesatis WHERE KONSINYE_URUN_ADI='Hyaluronic_Acid'  ");
$satir = mysql_fetch_array($bilgi);

$Toplam_Kalan=($KalanKonsinye)+($Arac_Stok);
 ?><?php echo $Toplam_Kalan; ?></span></td>
</tr>
<!-- /      Hyaluronic_Acid BASLANGIC  -->











   
<!-- /      Ortho_Vit  BASLANGIC  -->

<tr>

<td>Ortho_Vit</td>

<td><?php
include"baglan.php";
$query = mysql_query("SELECT SUM(STOK_GIRIS_ADET) FROM anastoklar WHERE STOK_LINK='Ortho_Vit'");  
$row = mysql_fetch_array($query); 
$Depo_Giris=$row['SUM(STOK_GIRIS_ADET)'];  
echo $Depo_Giris;
?>
</td>



<td><span class="badge bg-red"><?php
include"baglan.php";
$query = mysql_query("SELECT SUM(STOK_GIRIS_ADET) FROM stoklar WHERE STOK_LINK='Ortho_Vit' ");  
$row = mysql_fetch_array($query); 
 
$Depodan_Verilen=$row['SUM(STOK_GIRIS_ADET)'];  
echo $Depodan_Verilen;
?>
</span>
</td>




<td><span class="badge bg-green" style="font-size:16px;">
<?php
include"baglan.php";

$bilgi= mysql_query("SELECT SUM(STOK_GIRIS_ADET) FROM stoklar WHERE STOK_LINK='Ortho_Vit'");
$satir = mysql_fetch_array($bilgi);

$Guncel_Depo= "$satir[0]";

$Guncel_Depo= ($Depo_Giris)-($Depodan_Verilen);
 
?><?php echo $Guncel_Depo; ?></span></td>




<td>

<span class="badge bg-yellow">
<?php
include"baglan.php";
$sorumlu_kodu=$_SESSION["kullanici_adi"];
$query = mysql_query("SELECT SUM(SATIS_ADET) FROM konsinyeler WHERE KONSINYE_URUN_ADI='Ortho_Vit' ");  
$row = mysql_fetch_array($query); 
$Konsinyetoplam=$row['SUM(SATIS_ADET)'];  
echo $Konsinyetoplam;
?></span>
</td>


<td><span class="badge bg-red">
<?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_SEKLI='Konsinye_Satis'");  
$row = mysql_fetch_array($query); 
$KonsinyeSatistoplam=$row['SUM(SATIS_ADET)'];  
 echo $KonsinyeSatistoplam;
?></span>
</td>



<td><span class="badge bg-blue" style="font-size:16px;">
<?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'  ");
$satir = mysql_fetch_array($bilgi);
$KalanKonsinye= "$satir[0]";
$KalanKonsinye= ($Konsinyetoplam)-($KonsinyeSatistoplam);
 ?><?php echo $KalanKonsinye; ?></span></td>



<td><span class="badge bg-red">
<?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_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'  ");
$satir = mysql_fetch_array($bilgi);
$Aqualyx_satis= "$satir[0]";
$Toplam_Satilan= ($KonsinyeSatistoplam)+($Satistoplam);
 ?><?php echo $Toplam_Satilan; ?></span></td>

 


<td><span class="badge bg-red" style="font-size:16px;"><?php
include"baglan.php";
$query = mysql_query("SELECT SUM(STOK_GIRIS_ADET) FROM stoklar WHERE  STOK_LINK='Ortho_Vit' and STOK_TURU='Sube' ");  
$row = mysql_fetch_array($query); 
$Sube_Verilen=$row['SUM(STOK_GIRIS_ADET)'];  

$query = mysql_query("SELECT SUM(STOK_GIRIS_ADET) FROM stoklar WHERE  STOK_LINK='Ortho_Vit' and STOK_TURU='Bayi' ");  
$row = mysql_fetch_array($query); 
$Bayi_Verilen=$row['SUM(STOK_GIRIS_ADET)'];  
$Bayi_Sube_Toplam=($Bayi_Verilen)+($Sube_Verilen);

echo $Bayi_Sube_Toplam;
?> 
</span>
</td>
 
 

<td><span class="badge bg-green" style="font-size:16px;">
<?php

$bilgi= mysql_query("SELECT SUM(SATIS_ADET),SUM(SATIS_TOPLAM) FROM konsinyesatis WHERE KONSINYE_URUN_ADI='Ortho_Vit'  ");
$satir = mysql_fetch_array($bilgi);
$Arac_Stok= "$satir[0]";
$Arac_Stok= ($Depodan_Verilen)-($Konsinyetoplam)-($Bayi_Sube_Toplam)-($Satistoplam);
 ?><?php echo $Arac_Stok; ?></span></td>


<td><span class="badge bg-green" style="font-size:16px;">
<?php
include"baglan.php";

$bilgi= mysql_query("SELECT SUM(SATIS_ADET),SUM(SATIS_TOPLAM) FROM konsinyesatis WHERE KONSINYE_URUN_ADI='Ortho_Vit'  ");
$satir = mysql_fetch_array($bilgi);

$Toplam_Kalan=($KalanKonsinye)+($Arac_Stok);
 ?><?php echo $Toplam_Kalan; ?></span></td>
</tr>
<!-- /      Ortho_Vit BASLANGIC  -->



    
<!-- /      X_Factor  BASLANGIC  -->

<tr>

<td>X_Factor</td>

<td><?php
include"baglan.php";
$query = mysql_query("SELECT SUM(STOK_GIRIS_ADET) FROM anastoklar WHERE STOK_LINK='X_Factor'");  
$row = mysql_fetch_array($query); 
$Depo_Giris=$row['SUM(STOK_GIRIS_ADET)'];  
echo $Depo_Giris;
?>
</td>



<td><span class="badge bg-red"><?php
include"baglan.php";
$query = mysql_query("SELECT SUM(STOK_GIRIS_ADET) FROM stoklar WHERE STOK_LINK='X_Factor' ");  
$row = mysql_fetch_array($query); 
 
$Depodan_Verilen=$row['SUM(STOK_GIRIS_ADET)'];  
echo $Depodan_Verilen;
?>
</span>
</td>




<td><span class="badge bg-green" style="font-size:16px;">
<?php
include"baglan.php";

$bilgi= mysql_query("SELECT SUM(STOK_GIRIS_ADET) FROM stoklar WHERE STOK_LINK='X_Factor'");
$satir = mysql_fetch_array($bilgi);

$Guncel_Depo= "$satir[0]";

$Guncel_Depo= ($Depo_Giris)-($Depodan_Verilen);
 
?><?php echo $Guncel_Depo; ?></span></td>




<td>

<span class="badge bg-yellow">
<?php
include"baglan.php";
$sorumlu_kodu=$_SESSION["kullanici_adi"];
$query = mysql_query("SELECT SUM(SATIS_ADET) FROM konsinyeler WHERE KONSINYE_URUN_ADI='X_Factor' ");  
$row = mysql_fetch_array($query); 
$Konsinyetoplam=$row['SUM(SATIS_ADET)'];  
echo $Konsinyetoplam;
?></span>
</td>


<td><span class="badge bg-red">
<?php
include"baglan.php";
$sorumlu_kodu=$_SESSION["kullanici_adi"];
$query = mysql_query("SELECT SUM(SATIS_ADET) FROM konsinyesatis WHERE KONSINYE_URUN_ADI='X_Factor'  and SATIS_SEKLI='Konsinye_Satis'");  
$row = mysql_fetch_array($query); 
$KonsinyeSatistoplam=$row['SUM(SATIS_ADET)'];  
 echo $KonsinyeSatistoplam;
?></span>
</td>



<td><span class="badge bg-blue" style="font-size:16px;">
<?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='X_Factor'  ");
$satir = mysql_fetch_array($bilgi);
$KalanKonsinye= "$satir[0]";
$KalanKonsinye= ($Konsinyetoplam)-($KonsinyeSatistoplam);
 ?><?php echo $KalanKonsinye; ?></span></td>



<td><span class="badge bg-red">
<?php
include"baglan.php";
$sorumlu_kodu=$_SESSION["kullanici_adi"];
$query = mysql_query("SELECT SUM(SATIS_ADET) FROM konsinyesatis WHERE KONSINYE_URUN_ADI='X_Factor'  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='X_Factor'  ");
$satir = mysql_fetch_array($bilgi);
$Aqualyx_satis= "$satir[0]";
$Toplam_Satilan= ($KonsinyeSatistoplam)+($Satistoplam);
 ?><?php echo $Toplam_Satilan; ?></span></td>

 


<td><span class="badge bg-red" style="font-size:16px;"><?php
include"baglan.php";
$query = mysql_query("SELECT SUM(STOK_GIRIS_ADET) FROM stoklar WHERE  STOK_LINK='X_Factor' and STOK_TURU='Sube' ");  
$row = mysql_fetch_array($query); 
$Sube_Verilen=$row['SUM(STOK_GIRIS_ADET)'];  

$query = mysql_query("SELECT SUM(STOK_GIRIS_ADET) FROM stoklar WHERE  STOK_LINK='X_Factor' and STOK_TURU='Bayi' ");  
$row = mysql_fetch_array($query); 
$Bayi_Verilen=$row['SUM(STOK_GIRIS_ADET)'];  
$Bayi_Sube_Toplam=($Bayi_Verilen)+($Sube_Verilen);

echo $Bayi_Sube_Toplam;
?> 
</span>
</td>
 
 

<td><span class="badge bg-green" style="font-size:16px;">
<?php

$bilgi= mysql_query("SELECT SUM(SATIS_ADET),SUM(SATIS_TOPLAM) FROM konsinyesatis WHERE KONSINYE_URUN_ADI='X_Factor'  ");
$satir = mysql_fetch_array($bilgi);
$Arac_Stok= "$satir[0]";
$Arac_Stok= ($Depodan_Verilen)-($Konsinyetoplam)-($Bayi_Sube_Toplam)-($Satistoplam);
 ?><?php echo $Arac_Stok; ?></span></td>


<td><span class="badge bg-green" style="font-size:16px;">
<?php
include"baglan.php";

$bilgi= mysql_query("SELECT SUM(SATIS_ADET),SUM(SATIS_TOPLAM) FROM konsinyesatis WHERE KONSINYE_URUN_ADI='X_Factor'  ");
$satir = mysql_fetch_array($bilgi);

$Toplam_Kalan=($KalanKonsinye)+($Arac_Stok);
 ?><?php echo $Toplam_Kalan; ?></span></td>
</tr>
<!-- /      X_Factor BASLANGIC  -->










   
<!-- /      Orthowest_Gr_Lapis  BASLANGIC  -->

<tr>

<td>Orthowest_Gr_Lapis</td>

<td><?php
include"baglan.php";
$query = mysql_query("SELECT SUM(STOK_GIRIS_ADET) FROM anastoklar WHERE STOK_LINK='Orthowest_Gr_Lapis'");  
$row = mysql_fetch_array($query); 
$Depo_Giris=$row['SUM(STOK_GIRIS_ADET)'];  
echo $Depo_Giris;
?>
</td>



<td><span class="badge bg-red"><?php
include"baglan.php";
$query = mysql_query("SELECT SUM(STOK_GIRIS_ADET) FROM stoklar WHERE STOK_LINK='Orthowest_Gr_Lapis' ");  
$row = mysql_fetch_array($query); 
 
$Depodan_Verilen=$row['SUM(STOK_GIRIS_ADET)'];  
echo $Depodan_Verilen;
?>
</span>
</td>




<td><span class="badge bg-green" style="font-size:16px;">
<?php
include"baglan.php";

$bilgi= mysql_query("SELECT SUM(STOK_GIRIS_ADET) FROM stoklar WHERE STOK_LINK='Orthowest_Gr_Lapis'");
$satir = mysql_fetch_array($bilgi);

$Guncel_Depo= "$satir[0]";

$Guncel_Depo= ($Depo_Giris)-($Depodan_Verilen);
 
?><?php echo $Guncel_Depo; ?></span></td>




<td>

<span class="badge bg-yellow">
<?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' ");  
$row = mysql_fetch_array($query); 
$Konsinyetoplam=$row['SUM(SATIS_ADET)'];  
echo $Konsinyetoplam;
?></span>
</td>


<td><span class="badge bg-red">
<?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_SEKLI='Konsinye_Satis'");  
$row = mysql_fetch_array($query); 
$KonsinyeSatistoplam=$row['SUM(SATIS_ADET)'];  
 echo $KonsinyeSatistoplam;
?></span>
</td>



<td><span class="badge bg-blue" style="font-size:16px;">
<?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'  ");
$satir = mysql_fetch_array($bilgi);
$KalanKonsinye= "$satir[0]";
$KalanKonsinye= ($Konsinyetoplam)-($KonsinyeSatistoplam);
 ?><?php echo $KalanKonsinye; ?></span></td>



<td><span class="badge bg-red">
<?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_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'  ");
$satir = mysql_fetch_array($bilgi);
$Aqualyx_satis= "$satir[0]";
$Toplam_Satilan= ($KonsinyeSatistoplam)+($Satistoplam);
 ?><?php echo $Toplam_Satilan; ?></span></td>

 


<td><span class="badge bg-red" style="font-size:16px;"><?php
include"baglan.php";
$query = mysql_query("SELECT SUM(STOK_GIRIS_ADET) FROM stoklar WHERE  STOK_LINK='Orthowest_Gr_Lapis' and STOK_TURU='Sube' ");  
$row = mysql_fetch_array($query); 
$Sube_Verilen=$row['SUM(STOK_GIRIS_ADET)'];  

$query = mysql_query("SELECT SUM(STOK_GIRIS_ADET) FROM stoklar WHERE  STOK_LINK='Orthowest_Gr_Lapis' and STOK_TURU='Bayi' ");  
$row = mysql_fetch_array($query); 
$Bayi_Verilen=$row['SUM(STOK_GIRIS_ADET)'];  
$Bayi_Sube_Toplam=($Bayi_Verilen)+($Sube_Verilen);

echo $Bayi_Sube_Toplam;
?> 
</span>
</td>
 
 

<td><span class="badge bg-green" style="font-size:16px;">
<?php

$bilgi= mysql_query("SELECT SUM(SATIS_ADET),SUM(SATIS_TOPLAM) FROM konsinyesatis WHERE KONSINYE_URUN_ADI='Orthowest_Gr_Lapis'  ");
$satir = mysql_fetch_array($bilgi);
$Arac_Stok= "$satir[0]";
$Arac_Stok= ($Depodan_Verilen)-($Konsinyetoplam)-($Bayi_Sube_Toplam)-($Satistoplam);
 ?><?php echo $Arac_Stok; ?></span></td>


<td><span class="badge bg-green" style="font-size:16px;">
<?php
include"baglan.php";

$bilgi= mysql_query("SELECT SUM(SATIS_ADET),SUM(SATIS_TOPLAM) FROM konsinyesatis WHERE KONSINYE_URUN_ADI='Orthowest_Gr_Lapis'  ");
$satir = mysql_fetch_array($bilgi);

$Toplam_Kalan=($KalanKonsinye)+($Arac_Stok);
 ?><?php echo $Toplam_Kalan; ?></span></td>
</tr>
<!-- /      Orthowest_Gr_Lapis BASLANGIC  -->





   
<!-- /      Orthowest_Inf_Fort  BASLANGIC  -->

<tr>

<td>Orthowest_Inf_Fort</td>

<td><?php
include"baglan.php";
$query = mysql_query("SELECT SUM(STOK_GIRIS_ADET) FROM anastoklar WHERE STOK_LINK='Orthowest_Inf_Fort'");  
$row = mysql_fetch_array($query); 
$Depo_Giris=$row['SUM(STOK_GIRIS_ADET)'];  
echo $Depo_Giris;
?>
</td>



<td><span class="badge bg-red"><?php
include"baglan.php";
$query = mysql_query("SELECT SUM(STOK_GIRIS_ADET) FROM stoklar WHERE STOK_LINK='Orthowest_Inf_Fort' ");  
$row = mysql_fetch_array($query); 
 
$Depodan_Verilen=$row['SUM(STOK_GIRIS_ADET)'];  
echo $Depodan_Verilen;
?>
</span>
</td>




<td><span class="badge bg-green" style="font-size:16px;">
<?php
include"baglan.php";

$bilgi= mysql_query("SELECT SUM(STOK_GIRIS_ADET) FROM stoklar WHERE STOK_LINK='Orthowest_Inf_Fort'");
$satir = mysql_fetch_array($bilgi);

$Guncel_Depo= "$satir[0]";

$Guncel_Depo= ($Depo_Giris)-($Depodan_Verilen);
 
?><?php echo $Guncel_Depo; ?></span></td>




<td>

<span class="badge bg-yellow">
<?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' ");  
$row = mysql_fetch_array($query); 
$Konsinyetoplam=$row['SUM(SATIS_ADET)'];  
echo $Konsinyetoplam;
?></span>
</td>


<td><span class="badge bg-red">
<?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_SEKLI='Konsinye_Satis'");  
$row = mysql_fetch_array($query); 
$KonsinyeSatistoplam=$row['SUM(SATIS_ADET)'];  
 echo $KonsinyeSatistoplam;
?></span>
</td>



<td><span class="badge bg-blue" style="font-size:16px;">
<?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'  ");
$satir = mysql_fetch_array($bilgi);
$KalanKonsinye= "$satir[0]";
$KalanKonsinye= ($Konsinyetoplam)-($KonsinyeSatistoplam);
 ?><?php echo $KalanKonsinye; ?></span></td>



<td><span class="badge bg-red">
<?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_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'  ");
$satir = mysql_fetch_array($bilgi);
$Aqualyx_satis= "$satir[0]";
$Toplam_Satilan= ($KonsinyeSatistoplam)+($Satistoplam);
 ?><?php echo $Toplam_Satilan; ?></span></td>

 


<td><span class="badge bg-red" style="font-size:16px;"><?php
include"baglan.php";
$query = mysql_query("SELECT SUM(STOK_GIRIS_ADET) FROM stoklar WHERE  STOK_LINK='Orthowest_Inf_Fort' and STOK_TURU='Sube' ");  
$row = mysql_fetch_array($query); 
$Sube_Verilen=$row['SUM(STOK_GIRIS_ADET)'];  

$query = mysql_query("SELECT SUM(STOK_GIRIS_ADET) FROM stoklar WHERE  STOK_LINK='Orthowest_Inf_Fort' and STOK_TURU='Bayi' ");  
$row = mysql_fetch_array($query); 
$Bayi_Verilen=$row['SUM(STOK_GIRIS_ADET)'];  
$Bayi_Sube_Toplam=($Bayi_Verilen)+($Sube_Verilen);

echo $Bayi_Sube_Toplam;
?> 
</span>
</td>
 
 

<td><span class="badge bg-green" style="font-size:16px;">
<?php

$bilgi= mysql_query("SELECT SUM(SATIS_ADET),SUM(SATIS_TOPLAM) FROM konsinyesatis WHERE KONSINYE_URUN_ADI='Orthowest_Inf_Fort'  ");
$satir = mysql_fetch_array($bilgi);
$Arac_Stok= "$satir[0]";
$Arac_Stok= ($Depodan_Verilen)-($Konsinyetoplam)-($Bayi_Sube_Toplam)-($Satistoplam);
 ?><?php echo $Arac_Stok; ?></span></td>


<td><span class="badge bg-green" style="font-size:16px;">
<?php
include"baglan.php";

$bilgi= mysql_query("SELECT SUM(SATIS_ADET),SUM(SATIS_TOPLAM) FROM konsinyesatis WHERE KONSINYE_URUN_ADI='Orthowest_Inf_Fort'  ");
$satir = mysql_fetch_array($bilgi);

$Toplam_Kalan=($KalanKonsinye)+($Arac_Stok);
 ?><?php echo $Toplam_Kalan; ?></span></td>
</tr>
<!-- /      Orthowest_Inf_Fort BASLANGIC  -->









   
<!-- /      Orthowest_Hypersaw  BASLANGIC  -->

<tr>

<td>Orthowest_Hypersaw</td>

<td><?php
include"baglan.php";
$query = mysql_query("SELECT SUM(STOK_GIRIS_ADET) FROM anastoklar WHERE STOK_LINK='Orthowest_Hypersaw'");  
$row = mysql_fetch_array($query); 
$Depo_Giris=$row['SUM(STOK_GIRIS_ADET)'];  
echo $Depo_Giris;
?>
</td>



<td><span class="badge bg-red"><?php
include"baglan.php";
$query = mysql_query("SELECT SUM(STOK_GIRIS_ADET) FROM stoklar WHERE STOK_LINK='Orthowest_Hypersaw' ");  
$row = mysql_fetch_array($query); 
 
$Depodan_Verilen=$row['SUM(STOK_GIRIS_ADET)'];  
echo $Depodan_Verilen;
?>
</span>
</td>




<td><span class="badge bg-green" style="font-size:16px;">
<?php
include"baglan.php";

$bilgi= mysql_query("SELECT SUM(STOK_GIRIS_ADET) FROM stoklar WHERE STOK_LINK='Orthowest_Hypersaw'");
$satir = mysql_fetch_array($bilgi);

$Guncel_Depo= "$satir[0]";

$Guncel_Depo= ($Depo_Giris)-($Depodan_Verilen);
 
?><?php echo $Guncel_Depo; ?></span></td>




<td>

<span class="badge bg-yellow">
<?php
include"baglan.php";
$sorumlu_kodu=$_SESSION["kullanici_adi"];
$query = mysql_query("SELECT SUM(SATIS_ADET) FROM konsinyeler WHERE KONSINYE_URUN_ADI='Orthowest_Hypersaw' ");  
$row = mysql_fetch_array($query); 
$Konsinyetoplam=$row['SUM(SATIS_ADET)'];  
echo $Konsinyetoplam;
?></span>
</td>


<td><span class="badge bg-red">
<?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_SEKLI='Konsinye_Satis'");  
$row = mysql_fetch_array($query); 
$KonsinyeSatistoplam=$row['SUM(SATIS_ADET)'];  
 echo $KonsinyeSatistoplam;
?></span>
</td>



<td><span class="badge bg-blue" style="font-size:16px;">
<?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'  ");
$satir = mysql_fetch_array($bilgi);
$KalanKonsinye= "$satir[0]";
$KalanKonsinye= ($Konsinyetoplam)-($KonsinyeSatistoplam);
 ?><?php echo $KalanKonsinye; ?></span></td>



<td><span class="badge bg-red">
<?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_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'  ");
$satir = mysql_fetch_array($bilgi);
$Aqualyx_satis= "$satir[0]";
$Toplam_Satilan= ($KonsinyeSatistoplam)+($Satistoplam);
 ?><?php echo $Toplam_Satilan; ?></span></td>

 


<td><span class="badge bg-red" style="font-size:16px;"><?php
include"baglan.php";
$query = mysql_query("SELECT SUM(STOK_GIRIS_ADET) FROM stoklar WHERE  STOK_LINK='Orthowest_Hypersaw' and STOK_TURU='Sube' ");  
$row = mysql_fetch_array($query); 
$Sube_Verilen=$row['SUM(STOK_GIRIS_ADET)'];  

$query = mysql_query("SELECT SUM(STOK_GIRIS_ADET) FROM stoklar WHERE  STOK_LINK='Orthowest_Hypersaw' and STOK_TURU='Bayi' ");  
$row = mysql_fetch_array($query); 
$Bayi_Verilen=$row['SUM(STOK_GIRIS_ADET)'];  
$Bayi_Sube_Toplam=($Bayi_Verilen)+($Sube_Verilen);

echo $Bayi_Sube_Toplam;
?> 
</span>
</td>
 
 

<td><span class="badge bg-green" style="font-size:16px;">
<?php

$bilgi= mysql_query("SELECT SUM(SATIS_ADET),SUM(SATIS_TOPLAM) FROM konsinyesatis WHERE KONSINYE_URUN_ADI='Orthowest_Hypersaw'  ");
$satir = mysql_fetch_array($bilgi);
$Arac_Stok= "$satir[0]";
$Arac_Stok= ($Depodan_Verilen)-($Konsinyetoplam)-($Bayi_Sube_Toplam)-($Satistoplam);
 ?><?php echo $Arac_Stok; ?></span></td>


<td><span class="badge bg-green" style="font-size:16px;">
<?php
include"baglan.php";

$bilgi= mysql_query("SELECT SUM(SATIS_ADET),SUM(SATIS_TOPLAM) FROM konsinyesatis WHERE KONSINYE_URUN_ADI='Orthowest_Hypersaw'  ");
$satir = mysql_fetch_array($bilgi);

$Toplam_Kalan=($KalanKonsinye)+($Arac_Stok);
 ?><?php echo $Toplam_Kalan; ?></span></td>
</tr>
<!-- /      Orthowest_Hypersaw BASLANGIC  -->






   
<!-- /      Orthowest_Maca  BASLANGIC  -->

<tr>

<td>Orthowest_Maca</td>

<td><?php
include"baglan.php";
$query = mysql_query("SELECT SUM(STOK_GIRIS_ADET) FROM anastoklar WHERE STOK_LINK='Orthowest_Maca'");  
$row = mysql_fetch_array($query); 
$Depo_Giris=$row['SUM(STOK_GIRIS_ADET)'];  
echo $Depo_Giris;
?>
</td>



<td><span class="badge bg-red"><?php
include"baglan.php";
$query = mysql_query("SELECT SUM(STOK_GIRIS_ADET) FROM stoklar WHERE STOK_LINK='Orthowest_Maca' ");  
$row = mysql_fetch_array($query); 
 
$Depodan_Verilen=$row['SUM(STOK_GIRIS_ADET)'];  
echo $Depodan_Verilen;
?>
</span>
</td>




<td><span class="badge bg-green" style="font-size:16px;">
<?php
include"baglan.php";

$bilgi= mysql_query("SELECT SUM(STOK_GIRIS_ADET) FROM stoklar WHERE STOK_LINK='Orthowest_Maca'");
$satir = mysql_fetch_array($bilgi);

$Guncel_Depo= "$satir[0]";

$Guncel_Depo= ($Depo_Giris)-($Depodan_Verilen);
 
?><?php echo $Guncel_Depo; ?></span></td>




<td>

<span class="badge bg-yellow">
<?php
include"baglan.php";
$sorumlu_kodu=$_SESSION["kullanici_adi"];
$query = mysql_query("SELECT SUM(SATIS_ADET) FROM konsinyeler WHERE KONSINYE_URUN_ADI='Orthowest_Maca' ");  
$row = mysql_fetch_array($query); 
$Konsinyetoplam=$row['SUM(SATIS_ADET)'];  
echo $Konsinyetoplam;
?></span>
</td>


<td><span class="badge bg-red">
<?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_SEKLI='Konsinye_Satis'");  
$row = mysql_fetch_array($query); 
$KonsinyeSatistoplam=$row['SUM(SATIS_ADET)'];  
 echo $KonsinyeSatistoplam;
?></span>
</td>



<td><span class="badge bg-blue" style="font-size:16px;">
<?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'  ");
$satir = mysql_fetch_array($bilgi);
$KalanKonsinye= "$satir[0]";
$KalanKonsinye= ($Konsinyetoplam)-($KonsinyeSatistoplam);
 ?><?php echo $KalanKonsinye; ?></span></td>



<td><span class="badge bg-red">
<?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_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'  ");
$satir = mysql_fetch_array($bilgi);
$Aqualyx_satis= "$satir[0]";
$Toplam_Satilan= ($KonsinyeSatistoplam)+($Satistoplam);
 ?><?php echo $Toplam_Satilan; ?></span></td>

 


<td><span class="badge bg-red" style="font-size:16px;"><?php
include"baglan.php";
$query = mysql_query("SELECT SUM(STOK_GIRIS_ADET) FROM stoklar WHERE  STOK_LINK='Orthowest_Maca' and STOK_TURU='Sube' ");  
$row = mysql_fetch_array($query); 
$Sube_Verilen=$row['SUM(STOK_GIRIS_ADET)'];  

$query = mysql_query("SELECT SUM(STOK_GIRIS_ADET) FROM stoklar WHERE  STOK_LINK='Orthowest_Maca' and STOK_TURU='Bayi' ");  
$row = mysql_fetch_array($query); 
$Bayi_Verilen=$row['SUM(STOK_GIRIS_ADET)'];  
$Bayi_Sube_Toplam=($Bayi_Verilen)+($Sube_Verilen);

echo $Bayi_Sube_Toplam;
?> 
</span>
</td>
 
 

<td><span class="badge bg-green" style="font-size:16px;">
<?php

$bilgi= mysql_query("SELECT SUM(SATIS_ADET),SUM(SATIS_TOPLAM) FROM konsinyesatis WHERE KONSINYE_URUN_ADI='Orthowest_Maca'  ");
$satir = mysql_fetch_array($bilgi);
$Arac_Stok= "$satir[0]";
$Arac_Stok= ($Depodan_Verilen)-($Konsinyetoplam)-($Bayi_Sube_Toplam)-($Satistoplam);
 ?><?php echo $Arac_Stok; ?></span></td>


<td><span class="badge bg-green" style="font-size:16px;">
<?php
include"baglan.php";

$bilgi= mysql_query("SELECT SUM(SATIS_ADET),SUM(SATIS_TOPLAM) FROM konsinyesatis WHERE KONSINYE_URUN_ADI='Orthowest_Maca'  ");
$satir = mysql_fetch_array($bilgi);

$Toplam_Kalan=($KalanKonsinye)+($Arac_Stok);
 ?><?php echo $Toplam_Kalan; ?></span></td>
</tr>
<!-- /      Orthowest_Maca BASLANGIC  -->









   
<!-- /      Orthowest_At_Ronex  BASLANGIC  -->

<tr>

<td>Orthowest_At_Ronex</td>

<td><?php
include"baglan.php";
$query = mysql_query("SELECT SUM(STOK_GIRIS_ADET) FROM anastoklar WHERE STOK_LINK='Orthowest_At_Ronex'");  
$row = mysql_fetch_array($query); 
$Depo_Giris=$row['SUM(STOK_GIRIS_ADET)'];  
echo $Depo_Giris;
?>
</td>



<td><span class="badge bg-red"><?php
include"baglan.php";
$query = mysql_query("SELECT SUM(STOK_GIRIS_ADET) FROM stoklar WHERE STOK_LINK='Orthowest_At_Ronex' ");  
$row = mysql_fetch_array($query); 
 
$Depodan_Verilen=$row['SUM(STOK_GIRIS_ADET)'];  
echo $Depodan_Verilen;
?>
</span>
</td>




<td><span class="badge bg-green" style="font-size:16px;">
<?php
include"baglan.php";

$bilgi= mysql_query("SELECT SUM(STOK_GIRIS_ADET) FROM stoklar WHERE STOK_LINK='Orthowest_At_Ronex'");
$satir = mysql_fetch_array($bilgi);

$Guncel_Depo= "$satir[0]";

$Guncel_Depo= ($Depo_Giris)-($Depodan_Verilen);
 
?><?php echo $Guncel_Depo; ?></span></td>




<td>

<span class="badge bg-yellow">
<?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' ");  
$row = mysql_fetch_array($query); 
$Konsinyetoplam=$row['SUM(SATIS_ADET)'];  
echo $Konsinyetoplam;
?></span>
</td>


<td><span class="badge bg-red">
<?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_SEKLI='Konsinye_Satis'");  
$row = mysql_fetch_array($query); 
$KonsinyeSatistoplam=$row['SUM(SATIS_ADET)'];  
 echo $KonsinyeSatistoplam;
?></span>
</td>



<td><span class="badge bg-blue" style="font-size:16px;">
<?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'  ");
$satir = mysql_fetch_array($bilgi);
$KalanKonsinye= "$satir[0]";
$KalanKonsinye= ($Konsinyetoplam)-($KonsinyeSatistoplam);
 ?><?php echo $KalanKonsinye; ?></span></td>



<td><span class="badge bg-red">
<?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_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'  ");
$satir = mysql_fetch_array($bilgi);
$Aqualyx_satis= "$satir[0]";
$Toplam_Satilan= ($KonsinyeSatistoplam)+($Satistoplam);
 ?><?php echo $Toplam_Satilan; ?></span></td>

 


<td><span class="badge bg-red" style="font-size:16px;"><?php
include"baglan.php";
$query = mysql_query("SELECT SUM(STOK_GIRIS_ADET) FROM stoklar WHERE  STOK_LINK='Orthowest_At_Ronex' and STOK_TURU='Sube' ");  
$row = mysql_fetch_array($query); 
$Sube_Verilen=$row['SUM(STOK_GIRIS_ADET)'];  

$query = mysql_query("SELECT SUM(STOK_GIRIS_ADET) FROM stoklar WHERE  STOK_LINK='Orthowest_At_Ronex' and STOK_TURU='Bayi' ");  
$row = mysql_fetch_array($query); 
$Bayi_Verilen=$row['SUM(STOK_GIRIS_ADET)'];  
$Bayi_Sube_Toplam=($Bayi_Verilen)+($Sube_Verilen);

echo $Bayi_Sube_Toplam;
?> 
</span>
</td>
 
 

<td><span class="badge bg-green" style="font-size:16px;">
<?php

$bilgi= mysql_query("SELECT SUM(SATIS_ADET),SUM(SATIS_TOPLAM) FROM konsinyesatis WHERE KONSINYE_URUN_ADI='Orthowest_At_Ronex'  ");
$satir = mysql_fetch_array($bilgi);
$Arac_Stok= "$satir[0]";
$Arac_Stok= ($Depodan_Verilen)-($Konsinyetoplam)-($Bayi_Sube_Toplam)-($Satistoplam);
 ?><?php echo $Arac_Stok; ?></span></td>


<td><span class="badge bg-green" style="font-size:16px;">
<?php
include"baglan.php";

$bilgi= mysql_query("SELECT SUM(SATIS_ADET),SUM(SATIS_TOPLAM) FROM konsinyesatis WHERE KONSINYE_URUN_ADI='Orthowest_At_Ronex'  ");
$satir = mysql_fetch_array($bilgi);

$Toplam_Kalan=($KalanKonsinye)+($Arac_Stok);
 ?><?php echo $Toplam_Kalan; ?></span></td>
</tr>
<!-- /      Orthowest_At_Ronex BASLANGIC  -->



   
<!-- /      Orthowest_Hyaluronik_Asit  BASLANGIC  -->

<tr>

<td>Orthowest_Hyaluronik_Asit</td>

<td><?php
include"baglan.php";
$query = mysql_query("SELECT SUM(STOK_GIRIS_ADET) FROM anastoklar WHERE STOK_LINK='Orthowest_Hyaluronik_Asit'");  
$row = mysql_fetch_array($query); 
$Depo_Giris=$row['SUM(STOK_GIRIS_ADET)'];  
echo $Depo_Giris;
?>
</td>



<td><span class="badge bg-red"><?php
include"baglan.php";
$query = mysql_query("SELECT SUM(STOK_GIRIS_ADET) FROM stoklar WHERE STOK_LINK='Orthowest_Hyaluronik_Asit' ");  
$row = mysql_fetch_array($query); 
 
$Depodan_Verilen=$row['SUM(STOK_GIRIS_ADET)'];  
echo $Depodan_Verilen;
?>
</span>
</td>




<td><span class="badge bg-green" style="font-size:16px;">
<?php
include"baglan.php";

$bilgi= mysql_query("SELECT SUM(STOK_GIRIS_ADET) FROM stoklar WHERE STOK_LINK='Orthowest_Hyaluronik_Asit'");
$satir = mysql_fetch_array($bilgi);

$Guncel_Depo= "$satir[0]";

$Guncel_Depo= ($Depo_Giris)-($Depodan_Verilen);
 
?><?php echo $Guncel_Depo; ?></span></td>




<td>

<span class="badge bg-yellow">
<?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' ");  
$row = mysql_fetch_array($query); 
$Konsinyetoplam=$row['SUM(SATIS_ADET)'];  
echo $Konsinyetoplam;
?></span>
</td>


<td><span class="badge bg-red">
<?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_SEKLI='Konsinye_Satis'");  
$row = mysql_fetch_array($query); 
$KonsinyeSatistoplam=$row['SUM(SATIS_ADET)'];  
 echo $KonsinyeSatistoplam;
?></span>
</td>



<td><span class="badge bg-blue" style="font-size:16px;">
<?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'  ");
$satir = mysql_fetch_array($bilgi);
$KalanKonsinye= "$satir[0]";
$KalanKonsinye= ($Konsinyetoplam)-($KonsinyeSatistoplam);
 ?><?php echo $KalanKonsinye; ?></span></td>



<td><span class="badge bg-red">
<?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_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'  ");
$satir = mysql_fetch_array($bilgi);
$Aqualyx_satis= "$satir[0]";
$Toplam_Satilan= ($KonsinyeSatistoplam)+($Satistoplam);
 ?><?php echo $Toplam_Satilan; ?></span></td>

 


<td><span class="badge bg-red" style="font-size:16px;"><?php
include"baglan.php";
$query = mysql_query("SELECT SUM(STOK_GIRIS_ADET) FROM stoklar WHERE  STOK_LINK='Orthowest_Hyaluronik_Asit' and STOK_TURU='Sube' ");  
$row = mysql_fetch_array($query); 
$Sube_Verilen=$row['SUM(STOK_GIRIS_ADET)'];  

$query = mysql_query("SELECT SUM(STOK_GIRIS_ADET) FROM stoklar WHERE  STOK_LINK='Orthowest_Hyaluronik_Asit' and STOK_TURU='Bayi' ");  
$row = mysql_fetch_array($query); 
$Bayi_Verilen=$row['SUM(STOK_GIRIS_ADET)'];  
$Bayi_Sube_Toplam=($Bayi_Verilen)+($Sube_Verilen);

echo $Bayi_Sube_Toplam;
?> 
</span>
</td>
 
 

<td><span class="badge bg-green" style="font-size:16px;">
<?php

$bilgi= mysql_query("SELECT SUM(SATIS_ADET),SUM(SATIS_TOPLAM) FROM konsinyesatis WHERE KONSINYE_URUN_ADI='Orthowest_Hyaluronik_Asit'  ");
$satir = mysql_fetch_array($bilgi);
$Arac_Stok= "$satir[0]";
$Arac_Stok= ($Depodan_Verilen)-($Konsinyetoplam)-($Bayi_Sube_Toplam)-($Satistoplam);
 ?><?php echo $Arac_Stok; ?></span></td>


<td><span class="badge bg-green" style="font-size:16px;">
<?php
include"baglan.php";

$bilgi= mysql_query("SELECT SUM(SATIS_ADET),SUM(SATIS_TOPLAM) FROM konsinyesatis WHERE KONSINYE_URUN_ADI='Orthowest_Hyaluronik_Asit'  ");
$satir = mysql_fetch_array($bilgi);

$Toplam_Kalan=($KalanKonsinye)+($Arac_Stok);
 ?><?php echo $Toplam_Kalan; ?></span></td>
</tr>
<!-- /      Orthowest_Hyaluronik_Asit BASLANGIC  -->





,

   
<!-- /      Maca_Max  BASLANGIC  -->

<tr>

<td>Maca_Max</td>

<td><?php
include"baglan.php";
$query = mysql_query("SELECT SUM(STOK_GIRIS_ADET) FROM anastoklar WHERE STOK_LINK='Maca_Max'");  
$row = mysql_fetch_array($query); 
$Depo_Giris=$row['SUM(STOK_GIRIS_ADET)'];  
echo $Depo_Giris;
?>
</td>



<td><span class="badge bg-red"><?php
include"baglan.php";
$query = mysql_query("SELECT SUM(STOK_GIRIS_ADET) FROM stoklar WHERE STOK_LINK='Maca_Max' ");  
$row = mysql_fetch_array($query); 
 
$Depodan_Verilen=$row['SUM(STOK_GIRIS_ADET)'];  
echo $Depodan_Verilen;
?>
</span>
</td>




<td><span class="badge bg-green" style="font-size:16px;">
<?php
include"baglan.php";

$bilgi= mysql_query("SELECT SUM(STOK_GIRIS_ADET) FROM stoklar WHERE STOK_LINK='Maca_Max'");
$satir = mysql_fetch_array($bilgi);

$Guncel_Depo= "$satir[0]";

$Guncel_Depo= ($Depo_Giris)-($Depodan_Verilen);
 
?><?php echo $Guncel_Depo; ?></span></td>




<td>

<span class="badge bg-yellow">
<?php
include"baglan.php";
$sorumlu_kodu=$_SESSION["kullanici_adi"];
$query = mysql_query("SELECT SUM(SATIS_ADET) FROM konsinyeler WHERE KONSINYE_URUN_ADI='Maca_Max' ");  
$row = mysql_fetch_array($query); 
$Konsinyetoplam=$row['SUM(SATIS_ADET)'];  
echo $Konsinyetoplam;
?></span>
</td>


<td><span class="badge bg-red">
<?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_SEKLI='Konsinye_Satis'");  
$row = mysql_fetch_array($query); 
$KonsinyeSatistoplam=$row['SUM(SATIS_ADET)'];  
 echo $KonsinyeSatistoplam;
?></span>
</td>



<td><span class="badge bg-blue" style="font-size:16px;">
<?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'  ");
$satir = mysql_fetch_array($bilgi);
$KalanKonsinye= "$satir[0]";
$KalanKonsinye= ($Konsinyetoplam)-($KonsinyeSatistoplam);
 ?><?php echo $KalanKonsinye; ?></span></td>



<td><span class="badge bg-red">
<?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_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'  ");
$satir = mysql_fetch_array($bilgi);
$Aqualyx_satis= "$satir[0]";
$Toplam_Satilan= ($KonsinyeSatistoplam)+($Satistoplam);
 ?><?php echo $Toplam_Satilan; ?></span></td>

 


<td><span class="badge bg-red" style="font-size:16px;"><?php
include"baglan.php";
$query = mysql_query("SELECT SUM(STOK_GIRIS_ADET) FROM stoklar WHERE  STOK_LINK='Maca_Max' and STOK_TURU='Sube' ");  
$row = mysql_fetch_array($query); 
$Sube_Verilen=$row['SUM(STOK_GIRIS_ADET)'];  

$query = mysql_query("SELECT SUM(STOK_GIRIS_ADET) FROM stoklar WHERE  STOK_LINK='Maca_Max' and STOK_TURU='Bayi' ");  
$row = mysql_fetch_array($query); 
$Bayi_Verilen=$row['SUM(STOK_GIRIS_ADET)'];  
$Bayi_Sube_Toplam=($Bayi_Verilen)+($Sube_Verilen);

echo $Bayi_Sube_Toplam;
?> 
</span>
</td>
 
 

<td><span class="badge bg-green" style="font-size:16px;">
<?php

$bilgi= mysql_query("SELECT SUM(SATIS_ADET),SUM(SATIS_TOPLAM) FROM konsinyesatis WHERE KONSINYE_URUN_ADI='Maca_Max'  ");
$satir = mysql_fetch_array($bilgi);
$Arac_Stok= "$satir[0]";
$Arac_Stok= ($Depodan_Verilen)-($Konsinyetoplam)-($Bayi_Sube_Toplam)-($Satistoplam);
 ?><?php echo $Arac_Stok; ?></span></td>


<td><span class="badge bg-green" style="font-size:16px;">
<?php
include"baglan.php";

$bilgi= mysql_query("SELECT SUM(SATIS_ADET),SUM(SATIS_TOPLAM) FROM konsinyesatis WHERE KONSINYE_URUN_ADI='Maca_Max'  ");
$satir = mysql_fetch_array($bilgi);

$Toplam_Kalan=($KalanKonsinye)+($Arac_Stok);
 ?><?php echo $Toplam_Kalan; ?></span></td>
</tr>
<!-- /      Maca_Max BASLANGIC  -->






   
<!-- /      Proyal_40mg  BASLANGIC  -->

<tr>

<td>Proyal_40mg</td>

<td><?php
include"baglan.php";
$query = mysql_query("SELECT SUM(STOK_GIRIS_ADET) FROM anastoklar WHERE STOK_LINK='Proyal_40mg'");  
$row = mysql_fetch_array($query); 
$Depo_Giris=$row['SUM(STOK_GIRIS_ADET)'];  
echo $Depo_Giris;
?>
</td>



<td><span class="badge bg-red"><?php
include"baglan.php";
$query = mysql_query("SELECT SUM(STOK_GIRIS_ADET) FROM stoklar WHERE STOK_LINK='Proyal_40mg' ");  
$row = mysql_fetch_array($query); 
 
$Depodan_Verilen=$row['SUM(STOK_GIRIS_ADET)'];  
echo $Depodan_Verilen;
?>
</span>
</td>




<td><span class="badge bg-green" style="font-size:16px;">
<?php
include"baglan.php";

$bilgi= mysql_query("SELECT SUM(STOK_GIRIS_ADET) FROM stoklar WHERE STOK_LINK='Proyal_40mg'");
$satir = mysql_fetch_array($bilgi);

$Guncel_Depo= "$satir[0]";

$Guncel_Depo= ($Depo_Giris)-($Depodan_Verilen);
 
?><?php echo $Guncel_Depo; ?></span></td>




<td>

<span class="badge bg-yellow">
<?php
include"baglan.php";
$sorumlu_kodu=$_SESSION["kullanici_adi"];
$query = mysql_query("SELECT SUM(SATIS_ADET) FROM konsinyeler WHERE KONSINYE_URUN_ADI='Proyal_40mg' ");  
$row = mysql_fetch_array($query); 
$Konsinyetoplam=$row['SUM(SATIS_ADET)'];  
echo $Konsinyetoplam;
?></span>
</td>


<td><span class="badge bg-red">
<?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_SEKLI='Konsinye_Satis'");  
$row = mysql_fetch_array($query); 
$KonsinyeSatistoplam=$row['SUM(SATIS_ADET)'];  
 echo $KonsinyeSatistoplam;
?></span>
</td>



<td><span class="badge bg-blue" style="font-size:16px;">
<?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'  ");
$satir = mysql_fetch_array($bilgi);
$KalanKonsinye= "$satir[0]";
$KalanKonsinye= ($Konsinyetoplam)-($KonsinyeSatistoplam);
 ?><?php echo $KalanKonsinye; ?></span></td>



<td><span class="badge bg-red">
<?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_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'  ");
$satir = mysql_fetch_array($bilgi);
$Aqualyx_satis= "$satir[0]";
$Toplam_Satilan= ($KonsinyeSatistoplam)+($Satistoplam);
 ?><?php echo $Toplam_Satilan; ?></span></td>

 


<td><span class="badge bg-red" style="font-size:16px;"><?php
include"baglan.php";
$query = mysql_query("SELECT SUM(STOK_GIRIS_ADET) FROM stoklar WHERE  STOK_LINK='Proyal_40mg' and STOK_TURU='Sube' ");  
$row = mysql_fetch_array($query); 
$Sube_Verilen=$row['SUM(STOK_GIRIS_ADET)'];  

$query = mysql_query("SELECT SUM(STOK_GIRIS_ADET) FROM stoklar WHERE  STOK_LINK='Proyal_40mg' and STOK_TURU='Bayi' ");  
$row = mysql_fetch_array($query); 
$Bayi_Verilen=$row['SUM(STOK_GIRIS_ADET)'];  
$Bayi_Sube_Toplam=($Bayi_Verilen)+($Sube_Verilen);

echo $Bayi_Sube_Toplam;
?> 
</span>
</td>
 
 

<td><span class="badge bg-green" style="font-size:16px;">
<?php

$bilgi= mysql_query("SELECT SUM(SATIS_ADET),SUM(SATIS_TOPLAM) FROM konsinyesatis WHERE KONSINYE_URUN_ADI='Proyal_40mg'  ");
$satir = mysql_fetch_array($bilgi);
$Arac_Stok= "$satir[0]";
$Arac_Stok= ($Depodan_Verilen)-($Konsinyetoplam)-($Bayi_Sube_Toplam)-($Satistoplam);
 ?><?php echo $Arac_Stok; ?></span></td>


<td><span class="badge bg-green" style="font-size:16px;">
<?php
include"baglan.php";

$bilgi= mysql_query("SELECT SUM(SATIS_ADET),SUM(SATIS_TOPLAM) FROM konsinyesatis WHERE KONSINYE_URUN_ADI='Proyal_40mg'  ");
$satir = mysql_fetch_array($bilgi);

$Toplam_Kalan=($KalanKonsinye)+($Arac_Stok);
 ?><?php echo $Toplam_Kalan; ?></span></td>
</tr>
<!-- /      Proyal_40mg BASLANGIC  -->





, 
   
<!-- /      Neochondro_40  BASLANGIC  -->

<tr>

<td>Neochondro_40</td>

<td><?php
include"baglan.php";
$query = mysql_query("SELECT SUM(STOK_GIRIS_ADET) FROM anastoklar WHERE STOK_LINK='Neochondro_40'");  
$row = mysql_fetch_array($query); 
$Depo_Giris=$row['SUM(STOK_GIRIS_ADET)'];  
echo $Depo_Giris;
?>
</td>



<td><span class="badge bg-red"><?php
include"baglan.php";
$query = mysql_query("SELECT SUM(STOK_GIRIS_ADET) FROM stoklar WHERE STOK_LINK='Neochondro_40' ");  
$row = mysql_fetch_array($query); 
 
$Depodan_Verilen=$row['SUM(STOK_GIRIS_ADET)'];  
echo $Depodan_Verilen;
?>
</span>
</td>




<td><span class="badge bg-green" style="font-size:16px;">
<?php
include"baglan.php";

$bilgi= mysql_query("SELECT SUM(STOK_GIRIS_ADET) FROM stoklar WHERE STOK_LINK='Neochondro_40'");
$satir = mysql_fetch_array($bilgi);

$Guncel_Depo= "$satir[0]";

$Guncel_Depo= ($Depo_Giris)-($Depodan_Verilen);
 
?><?php echo $Guncel_Depo; ?></span></td>




<td>

<span class="badge bg-yellow">
<?php
include"baglan.php";
$sorumlu_kodu=$_SESSION["kullanici_adi"];
$query = mysql_query("SELECT SUM(SATIS_ADET) FROM konsinyeler WHERE KONSINYE_URUN_ADI='Neochondro_40' ");  
$row = mysql_fetch_array($query); 
$Konsinyetoplam=$row['SUM(SATIS_ADET)'];  
echo $Konsinyetoplam;
?></span>
</td>


<td><span class="badge bg-red">
<?php
include"baglan.php";
$sorumlu_kodu=$_SESSION["kullanici_adi"];
$query = mysql_query("SELECT SUM(SATIS_ADET) FROM konsinyesatis WHERE KONSINYE_URUN_ADI='Neochondro_40'  and SATIS_SEKLI='Konsinye_Satis'");  
$row = mysql_fetch_array($query); 
$KonsinyeSatistoplam=$row['SUM(SATIS_ADET)'];  
 echo $KonsinyeSatistoplam;
?></span>
</td>



<td><span class="badge bg-blue" style="font-size:16px;">
<?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='Neochondro_40'  ");
$satir = mysql_fetch_array($bilgi);
$KalanKonsinye= "$satir[0]";
$KalanKonsinye= ($Konsinyetoplam)-($KonsinyeSatistoplam);
 ?><?php echo $KalanKonsinye; ?></span></td>



<td><span class="badge bg-red">
<?php
include"baglan.php";
$sorumlu_kodu=$_SESSION["kullanici_adi"];
$query = mysql_query("SELECT SUM(SATIS_ADET) FROM konsinyesatis WHERE KONSINYE_URUN_ADI='Neochondro_40'  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='Neochondro_40'  ");
$satir = mysql_fetch_array($bilgi);
$Aqualyx_satis= "$satir[0]";
$Toplam_Satilan= ($KonsinyeSatistoplam)+($Satistoplam);
 ?><?php echo $Toplam_Satilan; ?></span></td>

 


<td><span class="badge bg-red" style="font-size:16px;"><?php
include"baglan.php";
$query = mysql_query("SELECT SUM(STOK_GIRIS_ADET) FROM stoklar WHERE  STOK_LINK='Neochondro_40' and STOK_TURU='Sube' ");  
$row = mysql_fetch_array($query); 
$Sube_Verilen=$row['SUM(STOK_GIRIS_ADET)'];  

$query = mysql_query("SELECT SUM(STOK_GIRIS_ADET) FROM stoklar WHERE  STOK_LINK='Neochondro_40' and STOK_TURU='Bayi' ");  
$row = mysql_fetch_array($query); 
$Bayi_Verilen=$row['SUM(STOK_GIRIS_ADET)'];  
$Bayi_Sube_Toplam=($Bayi_Verilen)+($Sube_Verilen);

echo $Bayi_Sube_Toplam;
?> 
</span>
</td>
 
 

<td><span class="badge bg-green" style="font-size:16px;">
<?php

$bilgi= mysql_query("SELECT SUM(SATIS_ADET),SUM(SATIS_TOPLAM) FROM konsinyesatis WHERE KONSINYE_URUN_ADI='Neochondro_40'  ");
$satir = mysql_fetch_array($bilgi);
$Arac_Stok= "$satir[0]";
$Arac_Stok= ($Depodan_Verilen)-($Konsinyetoplam)-($Bayi_Sube_Toplam)-($Satistoplam);
 ?><?php echo $Arac_Stok; ?></span></td>


<td><span class="badge bg-green" style="font-size:16px;">
<?php
include"baglan.php";

$bilgi= mysql_query("SELECT SUM(SATIS_ADET),SUM(SATIS_TOPLAM) FROM konsinyesatis WHERE KONSINYE_URUN_ADI='Neochondro_40'  ");
$satir = mysql_fetch_array($bilgi);

$Toplam_Kalan=($KalanKonsinye)+($Arac_Stok);
 ?><?php echo $Toplam_Kalan; ?></span></td>
</tr>
<!-- /      Neochondro_40 BASLANGIC  -->




   
<!-- /      Neochondro_60  BASLANGIC  -->

<tr>

<td>Neochondro_60</td>

<td><?php
include"baglan.php";
$query = mysql_query("SELECT SUM(STOK_GIRIS_ADET) FROM anastoklar WHERE STOK_LINK='Neochondro_60'");  
$row = mysql_fetch_array($query); 
$Depo_Giris=$row['SUM(STOK_GIRIS_ADET)'];  
echo $Depo_Giris;
?>
</td>



<td><span class="badge bg-red"><?php
include"baglan.php";
$query = mysql_query("SELECT SUM(STOK_GIRIS_ADET) FROM stoklar WHERE STOK_LINK='Neochondro_60' ");  
$row = mysql_fetch_array($query); 
 
$Depodan_Verilen=$row['SUM(STOK_GIRIS_ADET)'];  
echo $Depodan_Verilen;
?>
</span>
</td>




<td><span class="badge bg-green" style="font-size:16px;">
<?php
include"baglan.php";

$bilgi= mysql_query("SELECT SUM(STOK_GIRIS_ADET) FROM stoklar WHERE STOK_LINK='Neochondro_60'");
$satir = mysql_fetch_array($bilgi);

$Guncel_Depo= "$satir[0]";

$Guncel_Depo= ($Depo_Giris)-($Depodan_Verilen);
 
?><?php echo $Guncel_Depo; ?></span></td>




<td>

<span class="badge bg-yellow">
<?php
include"baglan.php";
$sorumlu_kodu=$_SESSION["kullanici_adi"];
$query = mysql_query("SELECT SUM(SATIS_ADET) FROM konsinyeler WHERE KONSINYE_URUN_ADI='Neochondro_60' ");  
$row = mysql_fetch_array($query); 
$Konsinyetoplam=$row['SUM(SATIS_ADET)'];  
echo $Konsinyetoplam;
?></span>
</td>


<td><span class="badge bg-red">
<?php
include"baglan.php";
$sorumlu_kodu=$_SESSION["kullanici_adi"];
$query = mysql_query("SELECT SUM(SATIS_ADET) FROM konsinyesatis WHERE KONSINYE_URUN_ADI='Neochondro_60'  and SATIS_SEKLI='Konsinye_Satis'");  
$row = mysql_fetch_array($query); 
$KonsinyeSatistoplam=$row['SUM(SATIS_ADET)'];  
 echo $KonsinyeSatistoplam;
?></span>
</td>



<td><span class="badge bg-blue" style="font-size:16px;">
<?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='Neochondro_60'  ");
$satir = mysql_fetch_array($bilgi);
$KalanKonsinye= "$satir[0]";
$KalanKonsinye= ($Konsinyetoplam)-($KonsinyeSatistoplam);
 ?><?php echo $KalanKonsinye; ?></span></td>



<td><span class="badge bg-red">
<?php
include"baglan.php";
$sorumlu_kodu=$_SESSION["kullanici_adi"];
$query = mysql_query("SELECT SUM(SATIS_ADET) FROM konsinyesatis WHERE KONSINYE_URUN_ADI='Neochondro_60'  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='Neochondro_60'  ");
$satir = mysql_fetch_array($bilgi);
$Aqualyx_satis= "$satir[0]";
$Toplam_Satilan= ($KonsinyeSatistoplam)+($Satistoplam);
 ?><?php echo $Toplam_Satilan; ?></span></td>

 


<td><span class="badge bg-red" style="font-size:16px;"><?php
include"baglan.php";
$query = mysql_query("SELECT SUM(STOK_GIRIS_ADET) FROM stoklar WHERE  STOK_LINK='Neochondro_60' and STOK_TURU='Sube' ");  
$row = mysql_fetch_array($query); 
$Sube_Verilen=$row['SUM(STOK_GIRIS_ADET)'];  

$query = mysql_query("SELECT SUM(STOK_GIRIS_ADET) FROM stoklar WHERE  STOK_LINK='Neochondro_60' and STOK_TURU='Bayi' ");  
$row = mysql_fetch_array($query); 
$Bayi_Verilen=$row['SUM(STOK_GIRIS_ADET)'];  
$Bayi_Sube_Toplam=($Bayi_Verilen)+($Sube_Verilen);

echo $Bayi_Sube_Toplam;
?> 
</span>
</td>
 
 

<td><span class="badge bg-green" style="font-size:16px;">
<?php

$bilgi= mysql_query("SELECT SUM(SATIS_ADET),SUM(SATIS_TOPLAM) FROM konsinyesatis WHERE KONSINYE_URUN_ADI='Neochondro_60'  ");
$satir = mysql_fetch_array($bilgi);
$Arac_Stok= "$satir[0]";
$Arac_Stok= ($Depodan_Verilen)-($Konsinyetoplam)-($Bayi_Sube_Toplam)-($Satistoplam);
 ?><?php echo $Arac_Stok; ?></span></td>


<td><span class="badge bg-green" style="font-size:16px;">
<?php
include"baglan.php";

$bilgi= mysql_query("SELECT SUM(SATIS_ADET),SUM(SATIS_TOPLAM) FROM konsinyesatis WHERE KONSINYE_URUN_ADI='Neochondro_60'  ");
$satir = mysql_fetch_array($bilgi);

$Toplam_Kalan=($KalanKonsinye)+($Arac_Stok);
 ?><?php echo $Toplam_Kalan; ?></span></td>
</tr>
<!-- /      Neochondro_60 BASLANGIC  -->





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

 

 
               