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




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







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

<div class="box">
            <div class="box-header with-border">
              <h3 class="box-title">Prim Listesi</h3>
            </div>
            <!-- /.box-header -->
            <div class="box-body">
              <table class="table table-bordered">
                <tbody><tr>
                  
       
        
<th style="width: 120px">ENJEKSİYON TOPLAMI</th>
<th style="width: 120px">ENJEKSİYON PRİM TUTARI </th>
<th style="width: 120px">Satılan Konsinye</th>
<th style="width: 120px">Kalan Konsinye </th>
<th style="width: 120px">Direk Satılan </th>
<th style="width: 120px">Toplam Cikis</th>
<th style="width: 120px">Toplam Satılan</th>
<th style="width: 120px">Toplam Kalan</th>
<th style="width: 120px">Aracımdakı Stok</th>
                </tr>


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

<td><?php
include"baglan.php";

 $sorumlu_kodu=$_SESSION["kullanici_adi"];
$query = mysql_query("SELECT SUM(SATIS_TOPLAM) FROM konsinyesatis WHERE SATIS_DEPRESANT='$sorumlu_kodu' and SATIS_URUN_KULLANIM='Enjeksiyon' and MONTH(KONSINYE_TARIH) = MONTH(CURDATE())");  
$row = mysql_fetch_array($query); 

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

 


?> TL

</td>




<td><?php
include"baglan.php";

 $sorumlu_kodu=$_SESSION["kullanici_adi"];
$query = mysql_query("SELECT SUM(SATIS_TOPLAM) FROM konsinyesatis WHERE SATIS_DEPRESANT='$sorumlu_kodu' and SATIS_URUN_KULLANIM='Enjeksiyon' and MONTH(KONSINYE_TARIH) = MONTH(CURDATE())");  
$row = mysql_fetch_array($query); 

$KonsinyeSatistoplam=$row['SUM(SATIS_TOPLAM)'];  
 
 
if($KonsinyeSatistoplam >= "100"){

echo$KonsinyeSatistoplam/100*5;

}
else
{

echo "evde kal";

}

?>TL

</td>


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

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

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

?></span>

</td>



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

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

$KalanKonsinye= "$satir[0]";



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



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

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

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

?></span>

</td>
 




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


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

$Aqualyx_satis= "$satir[0]";



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




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


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

$Aqualyx_satis= "$satir[0]";



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

 






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


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

$Toplam_Kalan= "$satir[0]";



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



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



 






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



</div>
<br><br>



 
    </div>

                                            
                                        </tfoot>
                                    </table>


                                </div>
     
    </div>
               