<?php
//# Kur Manuel (Tüm kurlarda işlem sonucu müşteri seçimine göre Hesaplanır)
//[27] Kdv (Hariç)
//[31] İndirim Var
//[33] Varyasyon
//[158] Stok
//[276] İndirim Yok
//[279] Varyasyon
//[405] Stok
//---------------------------------//
//[525] Kdv (Dahil)
//[528] İndirim Var
//[531] Varyasyon
//[674] Stok
//[771] İndirim Yok
//[773] Varyasyon
//[896] Stok
if($id2<>""){$id=$id2;}else{$id=$id;}
if($_SESSION["User_Sale"]<>""){ $indirim=$_SESSION["User_Sale"]/100; }else{ $indirim=0; }
$sqlvk = mysqli_query($conn, "select * from varyasyon where s1=".$id.""); $vkontrol = mysqli_fetch_assoc($sqlvk);
if(mysqli_num_rows($sqlvk)==0){ $varyasyon="yok"; }else{ $varyasyon="var"; }
$fkdv=(($rsu2["s4"]+100)/100);
	if($s11==0){
		$fkdv=(($rsu2["s4"]+100)/100);
//#+ Kdv/---->
		if($indirim<>0){
//#+ Kdv>İndirim Var/-->
			if(($sayfa4<>"" or $_POST["Rb_ID"]<>"")){
//#+ Kdv>İndirim Var>Varyasyon/---->
				if($_POST["Rb_ID"]<>""){
					$sqlb = mysqli_query($conn, "select * from varyasyon where id=".$_POST["Rb_ID"].""); $rsb = mysqli_fetch_assoc($sqlb);
				}else{
					$sqlb = mysqli_query($conn, "select * from varyasyon where id=".$sayfa4.""); $rsb = mysqli_fetch_assoc($sqlb);
				}
				$rb_id=$rsb["id"];
if($rsb["t2"]<>""){
				$rb="{".$rsb["t1"]."} {".$rsb["t2"]."}";
}else{
				$rb="{".$rsb["t1"]."}";
}
				$rbd=$rsb["s6"];
//#Stok Kontrol-->
				if($f7==1){ $stok=$rsb["s5"]; }else{ $stok=9999; }
//#Stok Kontrol-->
		if(trim($kpb)=="TRY"){					//Site Kuru TRY ise
			if($rsu2["t2"]=="TRY"){				//Ürün Kuru TRY ise
				$fiyat_1=($rsb["pb1"]*$fkdv)-($rsb["pb1"]*$fkdv)*$indirim;
				$fiyat_2=($rsb["pb2"]*$fkdv)-($rsb["pb2"]*$fkdv)*$indirim;
				$fiyat_3=($rsb["pb1"]*$fkdv)-($rsb["pb1"]*$fkdv)*$indirim;
				$fiyat1=$rsb["pb1"];
				$fiyat3=$rsb["pb1"];
				$spb="TRY";
			}elseif($rsu2["t2"]=="USD"){			//Ürün Kuru USD ise
				$fiyat_1=((($rsb["pb1"]*$fkdv)*$usd))-((($rsb["pb1"]*$fkdv)*$usd))*$indirim;
				$fiyat_2=((($rsb["pb2"]*$fkdv)*$usd))-((($rsb["pb2"]*$fkdv)*$usd))*$indirim;
				$fiyat_3=($rsb["pb1"]*$fkdv)-($rsb["pb1"]*$fkdv)*$indirim;
				$fiyat1=($rsb["pb1"]*$usd);
				$fiyat3=$rsb["pb1"];
				$spb="TRY";
			}elseif($rsu2["t2"]=="EUR"){			//Ürün Kuru EUR ise
				$fiyat_1=((($rsb["pb1"]*$fkdv)*$eur))-((($rsb["pb1"]*$fkdv)*$eur))*$indirim;
				$fiyat_2=((($rsb["pb2"]*$fkdv)*$eur))-((($rsb["pb2"]*$fkdv)*$eur))*$indirim;
				$fiyat_3=($rsb["pb1"]*$fkdv)-($rsb["pb1"]*$fkdv)*$indirim;
				$fiyat1=($rsb["pb1"]*$eur);
				$fiyat3=$rsb["pb1"];
				$spb="TRY";
			}elseif($rsu2["t2"]=="GBP"){			//Ürün Kuru GBP ise
				$fiyat_1=((($rsb["pb1"]*$fkdv)*$gbp))-((($rsb["pb1"]*$fkdv)*$gbp))*$indirim;
				$fiyat_2=((($rsb["pb1"]*$fkdv)*$gbp))-((($rsb["pb2"]*$fkdv)*$gbp))*$indirim;
				$fiyat_3=($rsb["pb1"]*$fkdv)-($rsb["pb1"]*$fkdv)*$indirim;
				$fiyat1=($rsb["pb1"]*$gbp);
				$fiyat3=$rsb["pb1"];
				$spb="TRY";
			}
		}elseif(trim($kpb)=="USD"){				//Site Kuru USD ise
			if($rsu2["t2"]=="TRY"){
				$fiyat_1=((($rsb["pb1"]*$fkdv)/$usd))-((($rsb["pb1"]*$fkdv)/$usd))*$indirim;
				$fiyat_2=((($rsb["pb2"]*$fkdv)/$usd))-((($rsb["pb2"]*$fkdv)/$usd))*$indirim;
				$fiyat_3=($rsb["pb1"]*$fkdv)-($rsb["pb1"]*$fkdv)*$indirim;
				$fiyat1=($rsb["pb1"]/$usd);
				$fiyat3=$rsb["pb1"];
				$spb="USD";
			}elseif($rsu2["t2"]=="USD"){
				$fiyat_1=($rsb["pb1"]*$fkdv)-($rsb["pb1"]*$fkdv)*$indirim;
				$fiyat_2=($rsb["pb2"]*$fkdv)-($rsb["pb2"]*$fkdv)*$indirim;
				$fiyat_3=($rsb["pb1"]*$fkdv)-($rsb["pb1"]*$fkdv)*$indirim;
				$fiyat1=$rsb["pb1"];
				$fiyat3=$rsb["pb1"];
				$spb="USD";
			}elseif($rsu2["t2"]=="EUR"){
				$fiyat_1=((($rsb["pb1"]*$fkdv)*$eur/$usd))-((($rsb["pb1"]*$fkdv)*$eur/$usd))*$indirim;
				$fiyat_2=((($rsb["pb2"]*$fkdv)*$eur/$usd))-((($rsb["pb2"]*$fkdv)*$eur/$usd))*$indirim;
				$fiyat_3=($rsb["pb1"]*$fkdv)-($rsb["pb1"]*$fkdv)*$indirim;
				$fiyat1=($rsb["pb1"]*$eur/$usd);
				$fiyat3=$rsb["pb1"];
				$spb="USD";
			}elseif($rsu2["t2"]=="GBP"){
				$fiyat_1=((($rsb["pb1"]*$fkdv)*$gbp/$usd))-((($rsb["pb1"]*$fkdv)*$gbp/$usd))*$indirim;
				$fiyat_2=((($rsb["pb2"]*$fkdv)*$gbp/$usd))-((($rsb["pb2"]*$fkdv)*$gbp/$usd))*$indirim;
				$fiyat_3=(($rsb["pb1"]*$fkdv)-($rsb["pb1"]*$fkdv))*$indirim;
				$fiyat1=($rsb["pb1"]*$gbp/$usd);
				$fiyat3=$rsb["pb1"];
				$spb="USD";
			}
		}elseif(trim($kpb)=="EUR"){
			if($rsu2["t2"]=="TRY"){
				$fiyat_1=((($rsb["pb1"]*$fkdv)/$eur))-((($rsb["pb1"]*$fkdv)/$eur))*$indirim;
				$fiyat_2=((($rsb["pb2"]*$fkdv)/$eur))-((($rsb["pb2"]*$fkdv)/$eur))*$indirim;
				$fiyat_3=($rsb["pb1"]*$fkdv)-($rsb["pb1"]*$fkdv)*$indirim;
				$fiyat1=($rsb["pb1"]/$eur);
				$fiyat3=$rsb["pb1"];
				$spb="EUR";
			}elseif($rsu2["t2"]=="USD"){
				$fiyat_1=((($rsb["pb1"]*$fkdv)*$usd/$eur))-((($rsb["pb1"]*$fkdv)*$usd/$eur))*$indirim;
				$fiyat_2=((($rsb["pb1"]*$fkdv)*$usd/$eur))-((($rsb["pb2"]*$fkdv)*$usd/$eur))*$indirim;
				$fiyat_3=($rsb["pb1"]*$fkdv)-($rsb["pb1"]*$fkdv)*$indirim;
				$fiyat1=($rsb["pb1"]*$usd/$eur);
				$fiyat3=$rsb["pb1"];
				$spb="EUR";
			}elseif($rsu2["t2"]=="EUR"){
				$fiyat_1=($rsb["pb1"]*$fkdv)-($rsb["pb1"]*$fkdv)*$indirim;
				$fiyat_2=($rsb["pb2"]*$fkdv)-($rsb["pb2"]*$fkdv)*$indirim;
				$fiyat_3=($rsb["pb1"]*$fkdv)-($rsb["pb1"]*$fkdv)*$indirim;
				$fiyat1=$rsb["pb1"];
				$fiyat3=$rsb["pb1"];
				$spb="EUR";
			}elseif($rsu2["t2"]=="GBP"){
				$fiyat_1=((($rsb["pb1"]*$fkdv)*$gbp/$eur))-((($rsb["pb1"]*$fkdv)*$gbp/$eur))*$indirim;
				$fiyat_2=((($rsb["pb2"]*$fkdv)*$gbp/$eur))-((($rsb["pb2"]*$fkdv)*$gbp/$eur))*$indirim;
				$fiyat_3=($rsb["pb1"]*$fkdv)-($rsb["pb1"]*$fkdv)*$indirim;
				$fiyat1=($rsb["pb1"]*$gbp/$eur);
				$fiyat3=$rsb["pb1"];
				$spb="EUR";
			}
		}elseif(trim($kpb)=="GBP"){
			if($rsu2["t2"]=="TRY"){
				$fiyat_1=((($rsb["pb1"]*$fkdv)/$gbp))-((($rsb["pb1"]*$fkdv)/$gbp))*$indirim;
				$fiyat_2=((($rsb["pb2"]*$fkdv)/$gbp))-((($rsb["pb2"]*$fkdv)/$gbp))*$indirim;
				$fiyat_3=($rsb["pb1"]*$fkdv)-($rsb["pb1"]*$fkdv)*$indirim;
				$fiyat1=($rsb["pb1"]/$gbp);
				$fiyat3=$rsb["pb1"];
				$spb="GBP";
			}elseif($rsu2["t2"]=="USD"){
				$fiyat_1=((($rsb["pb1"]*$fkdv)*$usd/$gbp))-((($rsb["pb1"]*$fkdv)*$usd/$gbp))*$indirim;
				$fiyat_2=((($rsb["pb2"]*$fkdv)*$usd/$gbp))-((($rsb["pb2"]*$fkdv)*$usd/$gbp))*$indirim;
				$fiyat_3=($rsb["pb1"]*$fkdv)-($rsb["pb1"]*$fkdv)*$indirim;
				$fiyat1=($rsb["pb1"]*$usd/$gbp);
				$fiyat3=$rsb["pb1"];
				$spb="GBP";
			}elseif($rsu2["t2"]=="EUR"){
				$fiyat_1=((($rsb["pb1"]*$fkdv)*$eur/$gbp))-((($rsb["pb1"]*$fkdv)*$eur/$gbp))*$indirim;
				$fiyat_2=((($rsb["pb2"]*$fkdv)*$eur/$gbp))-((($rsb["pb2"]*$fkdv)*$eur/$gbp))*$indirim;
				$fiyat_3=($rsb["pb1"]*$fkdv)-($rsb["pb1"]*$fkdv)*$indirim;
				$fiyat1=($rsb["pb1"]*$eur/$gbp);
				$fiyat3=$rsb["pb1"];
				$spb="GBP";
			}elseif($rsu2["t2"]=="GBP"){
				$fiyat_1=($rsb["pb1"]*$fkdv)-($rsb["pb1"]*$fkdv)*$indirim;
				$fiyat_2=($rsb["pb2"]*$fkdv)-($rsb["pb2"]*$fkdv)*$indirim;
				$fiyat_3=($rsb["pb1"]*$fkdv)-($rsb["pb1"]*$fkdv)*$indirim;
				$fiyat1=$rsb["pb1"];
				$fiyat3=$rsb["pb1"];
				$spb="GBP";
			}
		}
//#+ Kdv>İndirim Var>Varyasyon/---->
	}else{
//#Stok Kontrol-->
		if($f7==1){ $stok=$rsu2["s5"]; }else{ $stok=9999; }
//#Stok Kontrol-->
//#+ Kdv>İndirim Var>Kayıt/-------->
		if(trim($kpb)=="TRY"){					//Site Kuru TRY ise
			if($rsu2["t2"]=="TRY"){				//Ürün Kuru TRY ise
				$fiyat_1=($rsu2["pb1"]*$fkdv)-($rsu2["pb1"]*$fkdv)*$indirim;
				$fiyat_2=($rsu2["pb2"]*$fkdv)-($rsu2["pb2"]*$fkdv)*$indirim;
				$fiyat_3=($rsu2["pb1"]*$fkdv)-($rsu2["pb1"]*$fkdv)*$indirim;
				$fiyat1=$rsu2["pb1"];
				$fiyat3=$rsu2["pb1"];
				$spb="TRY";
			}elseif($rsu2["t2"]=="USD"){			//Ürün Kuru USD ise
				$fiyat_1=(($rsu2["pb1"]*$fkdv)*$usd)-((($rsu2["pb1"]*$fkdv)*$usd))*$indirim;
				$fiyat_2=(($rsu2["pb2"]*$fkdv)*$usd)-((($rsu2["pb2"]*$fkdv)*$usd))*$indirim;
				$fiyat_3=($rsu2["pb1"]*$fkdv)-($rsu2["pb1"]*$fkdv)*$indirim;
				$fiyat1=($rsu2["pb1"]*$usd);
				$fiyat3=$rsu2["pb1"];
				$spb="TRY";
			}elseif($rsu2["t2"]=="EUR"){			//Ürün Kuru EUR ise
				$fiyat_1=(($rsu2["pb1"]*$fkdv)*$eur)-((($rsu2["pb1"]*$fkdv)*$eur))*$indirim;
				$fiyat_2=(($rsu2["pb2"]*$fkdv)*$eur)-((($rsu2["pb2"]*$fkdv)*$eur))*$indirim;
				$fiyat_3=($rsu2["pb1"]*$fkdv)-($rsu2["pb1"]*$fkdv)*$indirim;
				$fiyat1=($rsu2["pb1"]*$eur);
				$fiyat3=$rsu2["pb1"];
				$spb="TRY";
			}elseif($rsu2["t2"]=="GBP"){			//Ürün Kuru GBP ise
				$fiyat_1=((($rsu2["pb1"]*$fkdv)*$gbp))-((($rsu2["pb1"]*$fkdv)*$gbp))*$indirim;
				$fiyat_2=((($rsu2["pb2"]*$fkdv)*$gbp))-((($rsu2["pb2"]*$fkdv)*$gbp))*$indirim;
				$fiyat_3=($rsu2["pb1"]*$fkdv)-($rsu2["pb1"]*$fkdv)*$indirim;
				$fiyat1=($rsu2["pb1"]*$gbp);
				$fiyat3=$rsu2["pb1"];
				$spb="TRY";
			}
		}elseif(trim($kpb)=="USD"){				//Site Kuru USD ise
			if($rsu2["t2"]=="TRY"){
				$fiyat_1=(($rsu2["pb1"]*$fkdv)/$usd)-(($rsu2["pb1"]*$fkdv)/$usd)*$indirim;
				$fiyat_2=(($rsu2["pb2"]*$fkdv)/$usd)-(($rsu2["pb2"]*$fkdv)/$usd)*$indirim;
				$fiyat_3=($rsu2["pb1"]*$fkdv)-($rsu2["pb1"]*$fkdv)*$indirim;
				$fiyat1=($rsu2["pb1"]/$usd);
				$fiyat3=$rsu2["pb1"];
				$spb="USD";
			}elseif($rsu2["t2"]=="USD"){
				$fiyat_1=($rsu2["pb1"]*$fkdv)-($rsu2["pb1"]*$fkdv)*$indirim;
				$fiyat_2=($rsu2["pb2"]*$fkdv)-($rsu2["pb2"]*$fkdv)*$indirim;
				$fiyat_3=($rsu2["pb1"]*$fkdv)-($rsu2["pb1"]*$fkdv)*$indirim;
				$fiyat1=$rsu2["pb1"];
				$fiyat3=$rsu2["pb1"];
				$spb="USD";
			}elseif($rsu2["t2"]=="EUR"){
				$fiyat_1=(($rsu2["pb1"]*$fkdv)*$eur/$usd)-(($rsu2["pb1"]*$fkdv)*$eur/$usd)*$indirim;
				$fiyat_2=(($rsu2["pb2"]*$fkdv)*$eur/$usd)-(($rsu2["pb2"]*$fkdv)*$eur/$usd)*$indirim;
				$fiyat_3=($rsu2["pb1"]*$fkdv)-($rsu2["pb1"]*$fkdv)*$indirim;
				$fiyat1=($rsu2["pb1"]*$eur/$usd);
				$fiyat3=$rsu2["pb1"];
				$spb="USD";
			}elseif($rsu2["t2"]=="GBP"){
				$fiyat_1=(($rsu2["pb1"]*$fkdv)*$gbp/$usd)-(($rsu2["pb1"]*$fkdv)*$gbp/$usd)*$indirim;
				$fiyat_2=(($rsu2["pb2"]*$fkdv)*$gbp/$usd)-(($rsu2["pb2"]*$fkdv)*$gbp/$usd)*$indirim;
				$fiyat_3=($rsu2["pb1"]*$fkdv)-($rsu2["pb1"]*$fkdv)*$indirim;
				$fiyat1=($rsu2["pb1"]*$gbp/$usd);
				$fiyat3=$rsu2["pb1"];
				$spb="USD";
				}
		}elseif(trim($kpb)=="EUR"){
			if($rsu2["t2"]=="TRY"){
				$fiyat_1=((($rsu2["pb1"]*$fkdv)/$eur))-((($rsu2["pb1"]*$fkdv)/$eur))*$indirim;
				$fiyat_2=((($rsu2["pb2"]*$fkdv)/$eur))-((($rsu2["pb2"]*$fkdv)/$eur))*$indirim;
				$fiyat_3=($rsu2["pb1"]*$fkdv)-($rsu2["pb1"]*$fkdv)*$indirim;
				$fiyat1=($rsu2["pb1"]/$eur);
				$fiyat3=$rsu2["pb1"];
				$spb="EUR";
			}elseif($rsu2["t2"]=="USD"){
				$fiyat_1=((($rsu2["pb1"]*$fkdv)*$usd/$eur))-((($rsu2["pb1"]*$fkdv)*$usd/$eur))*$indirim;
				$fiyat_2=((($rsu2["pb2"]*$fkdv)*$usd/$eur))-((($rsu2["pb2"]*$fkdv)*$usd/$eur))*$indirim;
				$fiyat_3=($rsu2["pb1"]*$fkdv)-($rsu2["pb1"]*$fkdv)*$indirim;
				$fiyat1=($rsu2["pb1"]*$usd/$eur);
				$fiyat3=$rsu2["pb1"];
				$spb="EUR";
			}elseif($rsu2["t2"]=="EUR"){
				$fiyat_1=($rsu2["pb1"]*$fkdv)-($rsu2["pb1"]*$fkdv)*$indirim;
				$fiyat_2=($rsu2["pb2"]*$fkdv)-($rsu2["pb2"]*$fkdv)*$indirim;
				$fiyat_3=($rsu2["pb1"]*$fkdv)-($rsu2["pb1"]*$fkdv)*$indirim;
				$fiyat1=$rsu2["pb1"];
				$fiyat3=$rsu2["pb1"];
				$spb="EUR";
			}elseif($rsu2["t2"]=="GBP"){
				$fiyat_1=((($rsu2["pb1"]*$fkdv)*$gbp/$eur))-((($rsu2["pb1"]*$fkdv)*$gbp/$eur))*$indirim;
				$fiyat_2=((($rsu2["pb2"]*$fkdv)*$gbp/$eur))-((($rsu2["pb2"]*$fkdv)*$gbp/$eur))*$indirim;
				$fiyat_3=($rsu2["pb1"]*$fkdv)-($rsu2["pb1"]*$fkdv)*$indirim;
				$fiyat1=($rsu2["pb1"]*$gbp/$eur);
				$fiyat3=$rsu2["pb1"];
				$spb="EUR";
			}
		}elseif(trim($kpb)=="GBP"){
			if($rsu2["t2"]=="TRY"){
				$fiyat_1=((($rsu2["pb1"]*$fkdv)/$gbp))-((($rsu2["pb1"]*$fkdv)/$gbp))*$indirim;
				$fiyat_2=((($rsu2["pb2"]*$fkdv)/$gbp))-((($rsu2["pb2"]*$fkdv)/$gbp))*$indirim;
				$fiyat_3=($rsu2["pb1"]*$fkdv)-($rsu2["pb1"]*$fkdv)*$indirim;
				$fiyat1=($rsu2["pb1"]/$gbp);
				$fiyat3=$rsu2["pb1"];
				$spb="GBP";
			}elseif($rsu2["t2"]=="USD"){
				$fiyat_1=((($rsu2["pb1"]*$fkdv)*$usd/$gbp))-((($rsu2["pb1"]*$fkdv)*$usd/$gbp))*$indirim;
				$fiyat_2=((($rsu2["pb2"]*$fkdv)*$usd/$gbp))-((($rsu2["pb2"]*$fkdv)*$usd/$gbp))*$indirim;
				$fiyat_3=($rsu2["pb1"]*$fkdv)-($rsu2["pb1"]*$fkdv)*$indirim;
				$fiyat1=($rsu2["pb1"]*$usd/$gbp);
				$fiyat3=$rsu2["pb1"];
				$spb="GBP";
			}elseif($rsu2["t2"]=="EUR"){
				$fiyat_1=((($rsu2["pb1"]*$fkdv)*$eur/$gbp))-((($rsu2["pb1"]*$fkdv)*$eur/$gbp))*$indirim;
				$fiyat_2=((($rsu2["pb2"]*$fkdv)*$eur/$gbp))-((($rsu2["pb2"]*$fkdv)*$eur/$gbp))*$indirim;
				$fiyat_3=($rsu2["pb1"]*$fkdv)-($rsu2["pb1"]*$fkdv)*$indirim;
				$fiyat1=($rsu2["pb1"]*$eur/$gbp);
				$fiyat3=$rsu2["pb1"];
				$spb="GBP";
			}elseif($rsu2["t2"]=="GBP"){
				$fiyat_1=($rsu2["pb1"]*$fkdv)-($rsu2["pb1"]*$fkdv)*$indirim;
				$fiyat_2=($rsu2["pb2"]*$fkdv)-($rsu2["pb2"]*$fkdv)*$indirim;
				$fiyat_3=($rsu2["pb1"]*$fkdv)-($rsu2["pb1"]*$fkdv)*$indirim;
				$fiyat1=$rsu2["pb1"];
				$fiyat3=$rsu2["pb1"];
				$spb="GBP";
			}
		}
//#+ Kdv>İndirim Var>Kayıt/-------->
	}
//#+ Kdv>İndirim Var/-->
}elseif($indirim=="0"){
//-#+ Kdv>İndirim yok/-->
	if(($sayfa4<>"" or $_POST["Rb_ID"]<>"")){
//#+ Kdv>İndirim yok>Varyasyon/---->
		if($_POST["Rb_ID"]<>""){
			$sqlb = mysqli_query($conn, "select * from varyasyon where id=".$_POST["Rb_ID"].""); $rsb = mysqli_fetch_assoc($sqlb);
		}else{
			$sqlb = mysqli_query($conn, "select * from varyasyon where id=".$sayfa4.""); $rsb = mysqli_fetch_assoc($sqlb);
		}
		$rb_id=$rsb["id"];
if($rsb["t2"]<>""){
				$rb="{".$rsb["t1"]."} {".$rsb["t2"]."}";
}else{
				$rb="{".$rsb["t1"]."}";
}
		$rbd=$rsb["s6"];
//#Stok Kontrol-->
		if($f7==1){ $stok=$rsb["s5"]; }else{ $stok=9999; }
//#Stok Kontrol-->
	if(trim($kpb)=="TRY"){					//Site Kuru TRY ise
		if($rsu2["t2"]=="TRY"){				//Ürün Kuru TRY ise
			$fiyat_1=$rsb["pb1"]*$fkdv;
			$fiyat_2=$rsb["pb2"]*$fkdv;
			$fiyat_3=$rsb["pb1"]*$fkdv;
			$fiyat1=$rsb["pb1"];
			$fiyat3=$rsb["pb1"];
			$spb="TRY";
		}elseif($rsu2["t2"]=="USD"){			//Ürün Kuru USD ise
			$fiyat_1=(($rsb["pb1"]*$fkdv)*$usd);
			$fiyat_2=(($rsb["pb2"]*$fkdv)*$usd);
			$fiyat_3=$rsb["pb1"]*$fkdv;
			$fiyat1=($rsb["pb1"]*$usd);
			$fiyat3=$rsb["pb1"];
			$spb="TRY";
		}elseif($rsu2["t2"]=="EUR"){			//Ürün Kuru EUR ise
			$fiyat_1=(($rsb["pb1"]*$fkdv)*$eur);
			$fiyat_2=(($rsb["pb2"]*$fkdv)*$eur);
			$fiyat_3=$rsb["pb1"]*$fkdv;
			$fiyat1=($rsb["pb1"]*$eur);
			$fiyat3=$rsb["pb1"];
			$spb="TRY";
		}elseif($rsu2["t2"]=="GBP"){			//Ürün Kuru GBP ise
			$fiyat_1=(($rsb["pb1"]*$fkdv)*$gbp);
			$fiyat_2=(($rsb["pb2"]*$fkdv)*$gbp);
			$fiyat_3=$rsb["pb1"]*$fkdv;
			$fiyat1=($rsb["pb1"]*$gbp);
			$fiyat3=$rsb["pb1"];
			$spb="TRY";
		}
	}elseif(trim($kpb)=="USD"){				//Site Kuru USD ise
		if($rsu2["t2"]=="TRY"){
			$fiyat_1=(($rsb["pb1"]*$fkdv)/$usd);
			$fiyat_2=(($rsb["pb2"]*$fkdv)/$usd);
			$fiyat_3=$rsb["pb1"]*$fkdv;
			$fiyat1=($rsb["pb1"]/$usd);
			$fiyat3=$rsb["pb1"];
			$spb="USD";
		}elseif($rsu2["t2"]=="USD"){
			$fiyat_1=$rsb["pb1"]*$fkdv;
			$fiyat_2=$rsb["pb2"]*$fkdv;
			$fiyat_3=$rsb["pb1"]*$fkdv;
			$fiyat1=$rsb["pb1"];
			$fiyat3=$rsb["pb1"];
			$spb="USD";
		}elseif($rsu2["t2"]=="EUR"){
			$fiyat_1=(($rsb["pb1"]*$fkdv)*$eur/$usd);
			$fiyat_2=(($rsb["pb2"]*$fkdv)*$eur/$usd);
			$fiyat_3=$rsb["pb1"]*$fkdv;
			$fiyat1=($rsb["pb1"]*$eur/$usd);
			$fiyat3=$rsb["pb1"];
			$spb="USD";
		}elseif($rsu2["t2"]=="GBP"){
			$fiyat_1=(($rsb["pb1"]*$fkdv)*$gbp/$usd);
			$fiyat_2=(($rsb["pb2"]*$fkdv)*$gbp/$usd);
			$fiyat_3=$rsb["pb1"]*$fkdv;
			$fiyat1=($rsb["pb1"]*$gbp/$usd);
			$fiyat3=$rsb["pb1"];
			$spb="USD";
		}
	}elseif(trim($kpb)=="EUR"){
		if($rsu2["t2"]=="TRY"){
			$fiyat_1=(($rsb["pb1"]*$fkdv)/$eur);
			$fiyat_2=(($rsb["pb2"]*$fkdv)/$eur);
			$fiyat_3=$rsb["pb1"]*$fkdv;
			$fiyat1=($rsb["pb1"]/$eur);
			$fiyat3=$rsb["pb1"];
			$spb="EUR";
		}elseif($rsu2["t2"]=="USD"){
			$fiyat_1=(($rsb["pb1"]*$fkdv)*$usd/$eur);
			$fiyat_2=(($rsb["pb2"]*$fkdv)*$usd/$eur);
			$fiyat_3=$rsb["pb1"]*$fkdv;
			$fiyat1=($rsb["pb1"]*$usd/$eur);
			$fiyat3=$rsb["pb1"];
			$spb="EUR";
		}elseif($rsu2["t2"]=="EUR"){
			$fiyat_1=$rsb["pb1"]*$fkdv;
			$fiyat_2=$rsb["pb2"]*$fkdv;
			$fiyat_3=$rsb["pb1"]*$fkdv;
			$fiyat1=$rsb["pb1"];
			$fiyat3=$rsb["pb1"];
			$spb="EUR";
		}elseif($rsu2["t2"]=="GBP"){
			$fiyat_1=(($rsb["pb1"]*$fkdv)*$gbp/$eur);
			$fiyat_2=(($rsb["pb2"]*$fkdv)*$gbp/$eur);
			$fiyat_3=$rsb["pb1"]*$fkdv;
			$fiyat1=($rsb["pb1"]*$gbp/$eur);
			$fiyat3=$rsb["pb1"];
			$spb="EUR";
		}
	}elseif(trim($kpb)=="GBP"){
		if($rsu2["t2"]=="TRY"){
			$fiyat_1=(($rsb["pb1"]*$fkdv)/$gbp);
			$fiyat_2=(($rsb["pb2"]*$fkdv)/$gbp);
			$fiyat_3=$rsb["pb1"]*$fkdv;
			$fiyat1=($rsb["pb1"]/$gbp);
			$fiyat3=$rsb["pb1"];
			$spb="GBP";
		}elseif($rsu2["t2"]=="USD"){
			$fiyat_1=(($rsb["pb1"]*$fkdv)*$usd/$gbp);
			$fiyat_2=(($rsb["pb2"]*$fkdv)*$usd/$gbp);
			$fiyat_3=$rsb["pb1"]*$fkdv;
			$fiyat1=($rsb["pb1"]*$usd/$gbp);
			$fiyat3=$rsb["pb1"];
			$spb="GBP";
		}elseif($rsu2["t2"]=="EUR"){
			$fiyat_1=(($rsb["pb1"]*$fkdv)*$eur/$gbp);
			$fiyat_2=(($rsb["pb2"]*$fkdv)*$eur/$gbp);
			$fiyat_3=$rsb["pb1"]*$fkdv;
			$fiyat1=($rsb["pb1"]*$eur/$gbp);
			$fiyat3=$rsb["pb1"];
			$spb="GBP";
		}elseif($rsu2["t2"]=="GBP"){
			$fiyat_1=$rsb["pb1"]*$fkdv;
			$fiyat_2=$rsb["pb2"]*$fkdv;
			$fiyat_3=$rsb["pb1"]*$fkdv;
			$fiyat1=$rsb["pb1"];
			$fiyat3=$rsb["pb1"];
			$spb="GBP";
		}
	}
//#+ Kdv>İndirim yok>Varyasyon/---->
}else{
//#Stok Kontrol-->
	if($f7==1){ $stok=$rsu2["s5"]; }else{ $stok=9999; }
//#Stok Kontrol-->
//#+ Kdv>İndirim yok>Kayıt/-------->
	if(trim($kpb)=="TRY"){					//Site Kuru TRY ise
		if($rsu2["t2"]=="TRY"){				//Ürün Kuru TRY ise
			$fiyat_1=$rsu2["pb1"]*$fkdv;
			$fiyat_2=$rsu2["pb2"]*$fkdv;
			$fiyat_3=$rsu2["pb1"]*$fkdv;
			$fiyat1=$rsu2["pb1"];
			$fiyat3=$rsu2["pb1"];
			$spb="TRY";
		}elseif($rsu2["t2"]=="USD"){			//Ürün Kuru USD ise
			$fiyat_1=(($rsu2["pb1"]*$fkdv)*$usd);
			$fiyat_2=(($rsu2["pb2"]*$fkdv)*$usd);
			$fiyat_3=$rsu2["pb1"]*$fkdv;
			$fiyat1=($rsu2["pb1"]*$usd);
			$fiyat3=$rsu2["pb1"];
			$spb="TRY";
		}elseif($rsu2["t2"]=="EUR"){			//Ürün Kuru EUR ise
			$fiyat_1=(($rsu2["pb1"]*$fkdv)*$eur);
			$fiyat_2=(($rsu2["pb2"]*$fkdv)*$eur);
			$fiyat_3=$rsu2["pb1"]*$fkdv;
			$fiyat1=($rsu2["pb1"]*$eur);
			$fiyat3=$rsu2["pb1"];
			$spb="TRY";
		}elseif($rsu2["t2"]=="GBP"){			//Ürün Kuru GBP ise
			$fiyat_1=(($rsu2["pb1"]*$fkdv)*$gbp);
			$fiyat_2=(($rsu2["pb2"]*$fkdv)*$gbp);
			$fiyat_3=$rsu2["pb1"]*$fkdv;
			$fiyat1=($rsu2["pb1"]*$gbp);
			$fiyat3=$rsu2["pb1"];
			$spb="TRY";
		}
	}elseif(trim($kpb)=="USD"){				//Site Kuru USD ise
		if($rsu2["t2"]=="TRY"){
			$fiyat_1=(($rsu2["pb1"]*$fkdv)/$usd);
			$fiyat_2=(($rsu2["pb2"]*$fkdv)/$usd);
			$fiyat_3=$rsu2["pb1"]*$fkdv;
			$fiyat1=($rsu2["pb1"]/$usd);
			$fiyat3=$rsu2["pb1"];
			$spb="USD";
		}elseif($rsu2["t2"]=="USD"){
			$fiyat_1=$rsu2["pb1"]*$fkdv;
			$fiyat_2=$rsu2["pb2"]*$fkdv;
			$fiyat_3=$rsu2["pb1"]*$fkdv;
			$fiyat1=$rsu2["pb1"];
			$fiyat3=$rsu2["pb1"];
			$spb="USD";
		}elseif($rsu2["t2"]=="EUR"){
			$fiyat_1=(($rsu2["pb1"]*$fkdv)*$eur/$usd);
			$fiyat_2=(($rsu2["pb2"]*$fkdv)*$eur/$usd);
			$fiyat_3=$rsu2["pb1"]*$fkdv;
			$fiyat1=($rsu2["pb1"]*$eur/$usd);
			$fiyat3=$rsu2["pb1"];
			$spb="USD";
		}elseif($rsu2["t2"]=="GBP"){
			$fiyat_1=(($rsu2["pb1"]*$fkdv)*$gbp/$usd);
			$fiyat_2=(($rsu2["pb2"]*$fkdv)*$gbp/$usd);
			$fiyat_3=$rsu2["pb1"]*$fkdv;
			$fiyat1=($rsu2["pb1"]*$gbp/$usd);
			$fiyat3=$rsu2["pb1"];
			$spb="USD";
		}
	}elseif(trim($kpb)=="EUR"){
		if($rsu2["t2"]=="TRY"){
			$fiyat_1=(($rsu2["pb1"]*$fkdv)/$eur);
			$fiyat_2=(($rsu2["pb2"]*$fkdv)/$eur);
			$fiyat_3=$rsu2["pb1"]*$fkdv;
			$fiyat1=($rsu2["pb1"]/$eur);
			$fiyat3=$rsu2["pb1"];
			$spb="EUR";
		}elseif($rsu2["t2"]=="USD"){
			$fiyat_1=(($rsu2["pb1"]*$fkdv)*$usd/$eur);
			$fiyat_2=(($rsu2["pb2"]*$fkdv)*$usd/$eur);
			$fiyat_3=$rsu2["pb1"]*$fkdv;
			$fiyat1=($rsu2["pb1"]*$usd/$eur);
			$fiyat3=$rsu2["pb1"];
			$spb="EUR";
		}elseif($rsu2["t2"]=="EUR"){
			$fiyat_1=$rsu2["pb1"]*$fkdv;
			$fiyat_2=$rsu2["pb2"]*$fkdv;
			$fiyat_3=$rsu2["pb1"]*$fkdv;
			$fiyat1=$rsu2["pb1"];
			$fiyat3=$rsu2["pb1"];
			$spb="EUR";
		}elseif($rsu2["t2"]=="GBP"){
			$fiyat_1=(($rsu2["pb1"]*$fkdv)*$gbp/$eur);
			$fiyat_2=(($rsu2["pb2"]*$fkdv)*$gbp/$eur);
			$fiyat_3=$rsu2["pb1"]*$fkdv;
			$fiyat1=($rsu2["pb1"]*$gbp/$eur);
			$fiyat3=$rsu2["pb1"];
			$spb="EUR";
		}
	}elseif(trim($kpb)=="GBP"){
		if($rsu2["t2"]=="TRY"){
			$fiyat_1=(($rsu2["pb1"]*$fkdv)/$gbp);
			$fiyat_2=(($rsu2["pb2"]*$fkdv)/$gbp);
			$fiyat_3=$rsu2["pb1"]*$fkdv;
			$fiyat1=($rsu2["pb1"]/$gbp);
			$fiyat3=$rsu2["pb1"];
			$spb="GBP";
		}elseif($rsu2["t2"]=="USD"){
			$fiyat_1=(($rsu2["pb1"]*$fkdv)*$usd/$gbp);
			$fiyat_2=(($rsu2["pb2"]*$fkdv)*$usd/$gbp);
			$fiyat_3=$rsu2["pb1"]*$fkdv;
			$fiyat1=($rsu2["pb1"]*$usd/$gbp);
			$fiyat3=$rsu2["pb1"];
			$spb="GBP";
		}elseif($rsu2["t2"]=="EUR"){
			$fiyat_1=(($rsu2["pb1"]*$fkdv)*$eur/$gbp);
			$fiyat_2=(($rsu2["pb2"]*$fkdv)*$eur/$gbp);
			$fiyat_3=$rsu2["pb1"]*$fkdv;
			$fiyat1=($rsu2["pb1"]*$eur/$gbp);
			$fiyat3=$rsu2["pb1"];
			$spb="GBP";
		}elseif($rsu2["t2"]=="GBP"){
			$fiyat_1=$rsu2["pb1"]*$fkdv;
			$fiyat_2=$rsu2["pb2"]*$fkdv;
			$fiyat_3=$rsu2["pb1"]*$fkdv;
			$fiyat1=$rsu2["pb1"];
			$fiyat3=$rsu2["pb1"];
			$spb="GBP";
		}
	}
//#+ Kdv>İndirim yok>Kayıt/-------->
}
//#+ Kdv>İndirim yok/-->
}
//#+ Kdv/---->
$kdv="+ Kdv";
}else{
	$kdv="Kdv Dahil";
//#Kdv Dahil/---->
	if($indirim<>0){
//#Kdv Dahil>İndirim Var/-->
		if(($sayfa4<>"" or $_POST["Rb_ID"]<>"")){
//#Kdv Dahil>İndirim Var>Varyasyon/---->
			if($_POST["Rb_ID"]<>""){
				$sqlb = mysqli_query($conn, "select * from varyasyon where id=".$_POST["Rb_ID"].""); $rsb = mysqli_fetch_assoc($sqlb);
			}else{
				$sqlb = mysqli_query($conn, "select * from varyasyon where id=".$sayfa4.""); $rsb = mysqli_fetch_assoc($sqlb);
			}
			$rb_id=$rsb["id"];
if($rsb["t2"]<>""){
				$rb="{".$rsb["t1"]."} {".$rsb["t2"]."}";
}else{
				$rb="{".$rsb["t1"]."}";
}
			$rbd=$rsb["s6"];
//#Stok Kontrol-->
			if($f7==1){ $stok=$rsb["s5"]; }else{ $stok=9999; }
//#Stok Kontrol-->
		if(trim($kpb)=="TRY"){					//Site Kuru TRY ise
			if($rsu2["t2"]=="TRY"){				//Ürün Kuru TRY ise
				$fiyat_1=($rsb["pb1"])-($rsb["pb1"])*$indirim;
				$fiyat_2=($rsb["pb2"])-($rsb["pb2"])*$indirim;
				$fiyat_3=($rsb["pb1"])-($rsb["pb1"])*$indirim;
				$fiyat1=$rsb["pb1"]/$fkdv;
				$fiyat3=$rsb["pb1"]/$fkdv;
				$spb="TRY";
			}elseif($rsu2["t2"]=="USD"){			//Ürün Kuru USD ise
				$fiyat_1=(($rsb["pb1"]*$usd))-(($rsb["pb1"]*$usd))*$indirim;
				$fiyat_2=(($rsb["pb2"]*$usd))-(($rsb["pb2"]*$usd))*$indirim;
				$fiyat_3=($rsb["pb1"])-($rsb["pb1"])*$indirim;
				$fiyat1=($rsb["pb1"]*$usd)/$fkdv;
				$fiyat3=$rsb["pb1"]/$fkdv;
				$spb="TRY";
			}elseif($rsu2["t2"]=="EUR"){			//Ürün Kuru EUR ise
				$fiyat_1=(($rsb["pb1"]*$eur))-(($rsb["pb1"]*$eur))*$indirim;
				$fiyat_2=(($rsb["pb2"]*$eur))-(($rsb["pb2"]*$eur))*$indirim;
				$fiyat_3=($rsb["pb1"])-($rsb["pb1"])*$indirim;
				$fiyat1=($rsb["pb1"]*$eur)/$fkdv;
				$fiyat3=$rsb["pb1"]/$fkdv;
				$spb="TRY";
			}elseif($rsu2["t2"]=="GBP"){			//Ürün Kuru GBP ise
				$fiyat_1=(($rsb["pb1"]*$gbp))-(($rsb["pb1"]*$gbp))*$indirim;
				$fiyat_2=(($rsb["pb2"]*$gbp))-(($rsb["pb2"]*$gbp))*$indirim;
				$fiyat_3=($rsb["pb1"])-($rsb["pb1"])*$indirim;
				$fiyat1=($rsb["pb1"]*$gbp)/$fkdv;
				$fiyat3=$rsb["pb1"]/$fkdv;
				$spb="TRY";
			}
		}elseif(trim($kpb)=="USD"){				//Site Kuru USD ise
			if($rsu2["t2"]=="TRY"){
				$fiyat_1=(($rsb["pb1"]/$usd))-(($rsb["pb1"]/$usd))*$indirim;
				$fiyat_2=(($rsb["pb2"]/$usd))-(($rsb["pb2"]/$usd))*$indirim;
				$fiyat_3=($rsb["pb1"])-($rsb["pb1"])*$indirim;
				$fiyat1=($rsb["pb1"]/$usd)/$fkdv;
				$fiyat3=$rsb["pb1"]/$fkdv;
				$spb="USD";
			}elseif($rsu2["t2"]=="USD"){
				$fiyat_1=($rsb["pb1"])-($rsb["pb1"])*$indirim;
				$fiyat_2=($rsb["pb2"])-($rsb["pb2"])*$indirim;
				$fiyat_3=($rsb["pb1"])-($rsb["pb1"])*$indirim;
				$fiyat1=$rsb["pb1"]/$fkdv;
				$fiyat3=$rsb["pb1"]/$fkdv;
				$spb="USD";
			}elseif($rsu2["t2"]=="EUR"){
				$fiyat_1=(($rsb["pb1"]*$eur/$usd))-(($rsb["pb1"]*$eur/$usd))*$indirim;
				$fiyat_2=(($rsb["pb2"]*$eur/$usd))-(($rsb["pb2"]*$eur/$usd))*$indirim;
				$fiyat_3=($rsb["pb1"])-($rsb["pb1"])*$indirim;
				$fiyat1=($rsb["pb1"]*$eur/$usd)/$fkdv;
				$fiyat3=$rsb["pb1"]/$fkdv;
				$spb="USD";
			}elseif($rsu2["t2"]=="GBP"){
				$fiyat_1=(($rsb["pb1"]*$gbp/$usd))-(($rsb["pb1"]*$gbp/$usd))*$indirim;
				$fiyat_2=(($rsb["pb2"]*$gbp/$usd))-(($rsb["pb2"]*$gbp/$usd))*$indirim;
				$fiyat_3=($rsb["pb1"]-$rsb["pb1"])*$indirim;
				$fiyat1=($rsb["pb1"]*$gbp/$usd)/$fkdv;
				$fiyat3=$rsb["pb1"]/$fkdv;
				$spb="USD";
			}
		}elseif(trim($kpb)=="EUR"){
			if($rsu2["t2"]=="TRY"){
				$fiyat_1=(($rsb["pb1"]/$eur))-(($rsb["pb1"]/$eur))*$indirim;
				$fiyat_2=(($rsb["pb2"]/$eur))-(($rsb["pb2"]/$eur))*$indirim;
				$fiyat_3=($rsb["pb1"])-($rsb["pb1"])*$indirim;
				$fiyat1=($rsb["pb1"]/$eur)/$fkdv;
				$fiyat3=$rsb["pb1"]/$fkdv;
				$spb="EUR";
			}elseif($rsu2["t2"]=="USD"){
				$fiyat_1=(($rsb["pb1"]*$usd/$eur))-(($rsb["pb1"]*$usd/$eur))*$indirim;
				$fiyat_2=(($rsb["pb2"]*$usd/$eur))-(($rsb["pb2"]*$usd/$eur))*$indirim;
				$fiyat_3=($rsb["pb1"])-($rsb["pb1"])*$indirim;
				$fiyat1=($rsb["pb1"]*$usd/$eur)/$fkdv;
				$fiyat3=$rsb["pb1"]/$fkdv;
				$spb="EUR";
			}elseif($rsu2["t2"]=="EUR"){
				$fiyat_1=($rsb["pb1"])-($rsb["pb1"])*$indirim;
				$fiyat_2=($rsb["pb2"])-($rsb["pb2"])*$indirim;
				$fiyat_3=($rsb["pb1"])-($rsb["pb1"])*$indirim;
				$fiyat1=$rsb["pb1"]/$fkdv;
				$fiyat3=$rsb["pb1"]/$fkdv;
				$spb="EUR";
			}elseif($rsu2["t2"]=="GBP"){
				$fiyat_1=(($rsb["pb1"]*$gbp/$eur))-(($rsb["pb1"]*$gbp/$eur))*$indirim;
				$fiyat_2=(($rsb["pb2"]*$gbp/$eur))-(($rsb["pb2"]*$gbp/$eur))*$indirim;
				$fiyat_3=($rsb["pb1"])-($rsb["pb1"])*$indirim;
				$fiyat1=($rsb["pb1"]*$gbp/$eur)/$fkdv;
				$fiyat3=$rsb["pb1"]/$fkdv;
				$spb="EUR";
			}
		}elseif(trim($kpb)=="GBP"){
			if($rsu2["t2"]=="TRY"){
				$fiyat_1=(($rsb["pb1"]/$gbp))-(($rsb["pb1"]/$gbp))*$indirim;
				$fiyat_2=(($rsb["pb2"]/$gbp))-(($rsb["pb2"]/$gbp))*$indirim;
				$fiyat_3=($rsb["pb1"])-($rsb["pb1"])*$indirim;
				$fiyat1=($rsb["pb1"]/$gbp)/$fkdv;
				$fiyat3=$rsb["pb1"]/$fkdv;
				$spb="GBP";
			}elseif($rsu2["t2"]=="USD"){
				$fiyat_1=(($rsb["pb1"]*$usd/$gbp))-(($rsb["pb1"]*$usd/$gbp))*$indirim;
				$fiyat_2=(($rsb["pb2"]*$usd/$gbp))-(($rsb["pb2"]*$usd/$gbp))*$indirim;
				$fiyat_3=($rsb["pb1"])-($rsb["pb1"])*$indirim;
				$fiyat1=($rsb["pb1"]*$usd/$gbp)/$fkdv;
				$fiyat3=$rsb["pb1"]/$fkdv;
				$spb="GBP";
			}elseif($rsu2["t2"]=="EUR"){
				$fiyat_1=(($rsb["pb1"]*$eur/$gbp))-(($rsb["pb1"]*$eur/$gbp))*$indirim;
				$fiyat_2=(($rsb["pb2"]*$eur/$gbp))-(($rsb["pb2"]*$eur/$gbp))*$indirim;
				$fiyat_3=($rsb["pb1"])-($rsb["pb1"])*$indirim;
				$fiyat1=($rsb["pb1"]*$eur/$gbp)/$fkdv;
				$fiyat3=$rsb["pb1"]/$fkdv;
				$spb="GBP";
			}elseif($rsu2["t2"]=="GBP"){
				$fiyat_1=($rsb["pb1"])-($rsb["pb1"])*$indirim;
				$fiyat_2=($rsb["pb2"])-($rsb["pb2"])*$indirim;
				$fiyat_3=($rsb["pb1"])-($rsb["pb1"])*$indirim;
				$fiyat1=$rsb["pb1"]/$fkdv;
				$fiyat3=$rsb["pb1"]/$fkdv;
				$spb="GBP";
			}
		}
//#Kdv Dahil>İndirim Var>Varyasyon/---->
	}else{
//#Stok Kontrol-->
		if($f7==1){ $stok=($rsu2["s5"]); }else{ $stok=9999; }
//#Stok Kontrol-->
//#Kdv Dahil>İndirim Var>Kayıt/-------->
		if(trim($kpb)=="TRY"){					//Site Kuru TRY ise
			if($rsu2["t2"]=="TRY"){				//Ürün Kuru TRY ise
				$fiyat_1=($rsu2["pb1"])-($rsu2["pb1"])*$indirim;
				$fiyat_2=($rsu2["pb2"])-($rsu2["pb2"])*$indirim;
				$fiyat_3=($rsu2["pb1"])-($rsu2["pb1"])*$indirim;
				$fiyat1=$rsu2["pb1"]/$fkdv;
				$fiyat3=$rsu2["pb1"]/$fkdv;
				$spb="TRY";
			}elseif($rsu2["t2"]=="USD"){			//Ürün Kuru USD ise
				$fiyat_1=(($rsu2["pb1"]*$usd))-(($rsu2["pb1"]*$usd))*$indirim;
				$fiyat_2=(($rsu2["pb2"]*$usd))-(($rsu2["pb2"]*$usd))*$indirim;
				$fiyat_3=($rsu2["pb1"])-($rsu2["pb1"])*$indirim;
				$fiyat1=($rsu2["pb1"]*$usd)/$fkdv;
				$fiyat3=$rsu2["pb1"]/$fkdv;
				$spb="TRY";
			}elseif($rsu2["t2"]=="EUR"){			//Ürün Kuru EUR ise
				$fiyat_1=(($rsu2["pb1"]*$eur))-(($rsu2["pb1"]*$eur))*$indirim;
				$fiyat_2=(($rsu2["pb2"]*$eur))-(($rsu2["pb2"]*$eur))*$indirim;
				$fiyat_3=($rsu2["pb1"])-($rsu2["pb1"])*$indirim;
				$fiyat1=($rsu2["pb1"]*$eur)/$fkdv;
				$fiyat3=$rsu2["pb1"]/$fkdv;
				$spb="TRY";
			}elseif($rsu2["t2"]=="GBP"){			//Ürün Kuru GBP ise
				$fiyat_1=(($rsu2["pb1"]*$gbp))-(($rsu2["pb1"]*$gbp))*$indirim;
				$fiyat_2=(($rsu2["pb2"]*$gbp))-(($rsu2["pb2"]*$gbp))*$indirim;
				$fiyat_3=($rsu2["pb1"])-($rsu2["pb1"])*$indirim;
				$fiyat1=($rsu2["pb1"]*$gbp)/$fkdv;
				$fiyat3=$rsu2["pb1"]/$fkdv;
				$spb="TRY";
			}
		}elseif(trim($kpb)=="USD"){				//Site Kuru USD ise
			if($rsu2["t2"]=="TRY"){
				$fiyat_1=(($rsu2["pb1"]/$usd))-(($rsu2["pb1"]/$usd))*$indirim;
				$fiyat_2=(($rsu2["pb2"]/$usd))-(($rsu2["pb2"]/$usd))*$indirim;
				$fiyat_3=($rsu2["pb1"])-($rsu2["pb1"])*$indirim;
				$fiyat1=($rsu2["pb1"]/$usd)/$fkdv;
				$fiyat3=$rsu2["pb1"]/$fkdv;
				$spb="USD";
			}elseif($rsu2["t2"]=="USD"){
				$fiyat_1=($rsu2["pb1"])-($rsu2["pb1"])*$indirim;
				$fiyat_2=($rsu2["pb2"])-($rsu2["pb2"])*$indirim;
				$fiyat_3=($rsu2["pb1"])-($rsu2["pb1"])*$indirim;
				$fiyat1=$rsu2["pb1"]/$fkdv;
				$fiyat3=$rsu2["pb1"]/$fkdv;
				$spb="USD";
			}elseif($rsu2["t2"]=="EUR"){
				$fiyat_1=(($rsu2["pb1"]*$eur/$usd))-(($rsu2["pb1"]*$eur/$usd))*$indirim;
				$fiyat_2=(($rsu2["pb2"]*$eur/$usd))-(($rsu2["pb2"]*$eur/$usd))*$indirim;
				$fiyat_3=($rsu2["pb1"])-($rsu2["pb1"])*$indirim;
				$fiyat1=($rsu2["pb1"]*$eur/$usd)/$fkdv;
				$fiyat3=$rsu2["pb1"]/$fkdv;
				$spb="USD";
			}elseif($rsu2["t2"]=="GBP"){
				$fiyat_1=(($rsu2["pb1"]*$gbp/$usd))-(($rsu2["pb1"]*$gbp/$usd))*$indirim;
				$fiyat_2=(($rsu2["pb1"]*$gbp/$usd))-(($rsu2["pb2"]*$gbp/$usd))*$indirim;
				$fiyat_3=($rsu2["pb1"]-$rsu2["pb1"])*$indirim;
				$fiyat1=($rsu2["pb1"]*$gbp/$usd)/$fkdv;
				$fiyat3=$rsu2["pb1"]/$fkdv;
				$spb="USD";
			}
		}elseif(trim($kpb)=="EUR"){
			if($rsu2["t2"]=="TRY"){
				$fiyat_1=(($rsu2["pb1"]/$eur))-(($rsu2["pb1"]/$eur))*$indirim;
				$fiyat_2=(($rsu2["pb2"]/$eur))-(($rsu2["pb2"]/$eur))*$indirim;
				$fiyat_3=($rsu2["pb1"])-($rsu2["pb1"])*$indirim;
				$fiyat1=($rsu2["pb1"]/$eur)/$fkdv;
				$fiyat3=$rsu2["pb1"]/$fkdv;
				$spb="EUR";
			}elseif($rsu2["t2"]=="USD"){
				$fiyat_1=(($rsu2["pb1"]*$usd/$eur))-(($rsu2["pb1"]*$usd/$eur))*$indirim;
				$fiyat_2=(($rsu2["pb2"]*$usd/$eur))-(($rsu2["pb2"]*$usd/$eur))*$indirim;
				$fiyat_3=($rsu2["pb1"])-($rsu2["pb1"])*$indirim;
				$fiyat1=($rsu2["pb1"]*$usd/$eur)/$fkdv;
				$fiyat3=$rsu2["pb1"]/$fkdv;
				$spb="EUR";
			}elseif($rsu2["t2"]=="EUR"){
				$fiyat_1=($rsu2["pb1"])-($rsu2["pb1"])*$indirim;
				$fiyat_2=($rsu2["pb2"])-($rsu2["pb2"])*$indirim;
				$fiyat_3=($rsu2["pb1"])-($rsu2["pb1"])*$indirim;
				$fiyat1=$rsu2["pb1"]/$fkdv;
				$fiyat3=$rsu2["pb1"]/$fkdv;
				$spb="EUR";
			}elseif($rsu2["t2"]=="GBP"){
				$fiyat_1=(($rsu2["pb1"]*$gbp/$eur))-(($rsu2["pb1"]*$gbp/$eur))*$indirim;
				$fiyat_2=(($rsu2["pb2"]*$gbp/$eur))-(($rsu2["pb2"]*$gbp/$eur))*$indirim;
				$fiyat_3=($rsu2["pb1"])-($rsu2["pb1"])*$indirim;
				$fiyat1=($rsu2["pb1"]*$gbp/$eur)/$fkdv;
				$fiyat3=$rsu2["pb1"]/$fkdv;
				$spb="EUR";
			}
		}elseif(trim($kpb)=="GBP"){
			if($rsu2["t2"]=="TRY"){
				$fiyat_1=(($rsu2["pb1"]/$gbp))-(($rsu2["pb1"]/$gbp))*$indirim;
				$fiyat_2=(($rsu2["pb2"]/$gbp))-(($rsu2["pb2"]/$gbp))*$indirim;
				$fiyat_3=($rsu2["pb1"])-($rsu2["pb1"])*$indirim;
				$fiyat1=($rsu2["pb1"]/$gbp)/$fkdv;
				$fiyat3=$rsu2["pb1"]/$fkdv;
				$spb="GBP";
			}elseif($rsu2["t2"]=="USD"){
				$fiyat_1=(($rsu2["pb1"]*$usd/$gbp))-(($rsu2["pb1"]*$usd/$gbp))*$indirim;
				$fiyat_2=(($rsu2["pb2"]*$usd/$gbp))-(($rsu2["pb2"]*$usd/$gbp))*$indirim;
				$fiyat_3=($rsu2["pb1"])-($rsu2["pb1"])*$indirim;
				$fiyat1=($rsu2["pb1"]*$usd/$gbp)/$fkdv;
				$fiyat3=$rsu2["pb1"]/$fkdv;
				$spb="GBP";
			}elseif($rsu2["t2"]=="EUR"){
				$fiyat_1=(($rsu2["pb1"]*$eur/$gbp))-(($rsu2["pb1"]*$eur/$gbp))*$indirim;
				$fiyat_2=(($rsu2["pb2"]*$eur/$gbp))-(($rsu2["pb2"]*$eur/$gbp))*$indirim;
				$fiyat_3=($rsu2["pb1"])-($rsu2["pb1"])*$indirim;
				$fiyat1=($rsu2["pb1"]*$eur/$gbp)/$fkdv;
				$fiyat3=$rsu2["pb1"]/$fkdv;
				$spb="GBP";
			}elseif($rsu2["t2"]=="GBP"){
				$fiyat_1=($rsu2["pb1"])-($rsu2["pb1"])*$indirim;
				$fiyat_2=($rsu2["pb2"])-($rsu2["pb2"])*$indirim;
				$fiyat_3=($rsu2["pb1"])-($rsu2["pb1"])*$indirim;
				$fiyat1=$rsu2["pb1"]/$fkdv;
				$fiyat3=$rsu2["pb1"]/$fkdv;
				$spb="GBP";
			}
		}
//#Kdv Dahil>İndirim Var>Kayıt/-------->
	}
//#Kdv Dahil>İndirim Var/-->
}elseif($indirim==0){
//#Kdv Dahil>İndirim yok/-->
	if(($sayfa4<>"" or $_POST["Rb_ID"]<>"")){
//#Kdv Dahil>İndirim yok>Varyasyon/---->
		if($_POST["Rb_ID"]<>""){
			$sqlb = mysqli_query($conn, "select * from varyasyon where id=".$_POST["Rb_ID"].""); $rsb = mysqli_fetch_assoc($sqlb);
		}else{
			$sqlb = mysqli_query($conn, "select * from varyasyon where id=".$sayfa4.""); $rsb = mysqli_fetch_assoc($sqlb);
		}
		$rb_id=$rsb["id"];
if($rsb["t2"]<>""){
				$rb="{".$rsb["t1"]."} {".$rsb["t2"]."}";
}else{
				$rb="{".$rsb["t1"]."}";
}
		$rbd=$rsb["s6"];
//#Stok Kontrol-->
		if($f7==1){ $stok=$rsb["s5"]; }else{ $stok=9999; }
//#Stok Kontrol-->
	if(trim($kpb)=="TRY"){					//Site Kuru TRY ise
		if($rsu2["t2"]=="TRY"){				//Ürün Kuru TRY ise
			$fiyat_1=$rsb["pb1"];
			$fiyat_2=$rsb["pb2"];
			$fiyat_3=$rsb["pb1"];
			$fiyat1=$rsb["pb1"]/$fkdv;
			$fiyat3=$rsb["pb1"]/$fkdv;
			$spb="TRY";
		}elseif($rsu2["t2"]=="USD"){			//Ürün Kuru USD ise
			$fiyat_1=($rsb["pb1"]*$usd);
			$fiyat_2=($rsb["pb2"]*$usd);
			$fiyat_3=$rsb["pb1"];
			$fiyat1=($rsb["pb1"]*$usd)/$fkdv;
			$fiyat3=$rsb["pb1"]/$fkdv;
			$spb="TRY";
		}elseif($rsu2["t2"]=="EUR"){			//Ürün Kuru EUR ise
			$fiyat_1=($rsb["pb1"]*$eur);
			$fiyat_2=($rsb["pb2"]*$eur);
			$fiyat_3=$rsb["pb1"];
			$fiyat1=($rsb["pb1"]*$eur)/$fkdv;
			$fiyat3=$rsb["pb1"]/$fkdv;
			$spb="TRY";
		}elseif($rsu2["t2"]=="GBP"){			//Ürün Kuru GBP ise
			$fiyat_1=($rsb["pb1"]*$gbp);
			$fiyat_2=($rsb["pb2"]*$gbp);
			$fiyat_3=$rsb["pb1"];
			$fiyat1=($rsb["pb1"]*$gbp)/$fkdv;
			$fiyat3=$rsb["pb1"]/$fkdv;
			$spb="TRY";
		}
	}elseif(trim($kpb)=="USD"){				//Site Kuru USD ise
		if($rsu2["t2"]=="TRY"){
			$fiyat_1=($rsb["pb1"]/$usd);
			$fiyat_2=($rsb["pb2"]/$usd);
			$fiyat_3=$rsb["pb1"];
			$fiyat1=($rsb["pb1"]/$usd)/$fkdv;
			$fiyat3=$rsb["pb1"]/$fkdv;
			$spb="USD";
		}elseif($rsu2["t2"]=="USD"){
			$fiyat_1=$rsb["pb1"];
			$fiyat_2=$rsb["pb2"];
			$fiyat_3=$rsb["pb1"];
			$fiyat1=$rsb["pb1"]/$fkdv;
			$fiyat3=$rsb["pb1"]/$fkdv;
			$spb="USD";
		}elseif($rsu2["t2"]=="EUR"){
			$fiyat_1=($rsb["pb1"]*$eur/$usd);
			$fiyat_2=($rsb["pb2"]*$eur/$usd);
			$fiyat_3=$rsb["pb1"];
			$fiyat1=($rsb["pb1"]*$eur/$usd)/$fkdv;
			$fiyat3=$rsb["pb1"]/$fkdv;
			$spb="USD";
		}elseif($rsu2["t2"]=="GBP"){
			$fiyat_1=($rsb["pb1"]*$gbp/$usd);
			$fiyat_2=($rsb["pb2"]*$gbp/$usd);
			$fiyat_3=$rsb["pb1"];
			$fiyat1=($rsb["pb1"]*$gbp/$usd)/$fkdv;
			$fiyat3=$rsb["pb1"]/$fkdv;
			$spb="USD";
		}
	}elseif(trim($kpb)=="EUR"){
		if($rsu2["t2"]=="TRY"){
			$fiyat_1=($rsb["pb1"]/$eur);
			$fiyat_2=($rsb["pb2"]/$eur);
			$fiyat_3=$rsb["pb1"];
			$fiyat1=($rsb["pb1"]/$eur)/$fkdv;
			$fiyat3=$rsb["pb1"]/$fkdv;
			$spb="EUR";
		}elseif($rsu2["t2"]=="USD"){
			$fiyat_1=($rsb["pb1"]*$usd/$eur);
			$fiyat_2=($rsb["pb2"]*$usd/$eur);
			$fiyat_3=$rsb["pb1"];
			$fiyat1=($rsb["pb1"]*$usd/$eur)/$fkdv;
			$fiyat3=$rsb["pb1"]/$fkdv;
			$spb="EUR";
		}elseif($rsu2["t2"]=="EUR"){
			$fiyat_1=$rsb["pb1"];
			$fiyat_2=$rsb["pb2"];
			$fiyat_3=$rsb["pb1"];
			$fiyat1=$rsb["pb1"]/$fkdv;
			$fiyat3=$rsb["pb1"]/$fkdv;
			$spb="EUR";
		}elseif($rsu2["t2"]=="GBP"){
			$fiyat_1=($rsb["pb1"]*$gbp/$eur);
			$fiyat_2=($rsb["pb2"]*$gbp/$eur);
			$fiyat_3=$rsb["pb1"];
			$fiyat1=($rsb["pb1"]*$gbp/$eur)/$fkdv;
			$fiyat3=$rsb["pb1"]/$fkdv;
			$spb="EUR";
		}
	}elseif(trim($kpb)=="GBP"){
		if($rsu2["t2"]=="TRY"){
			$fiyat_1=($rsb["pb1"]/$gbp);
			$fiyat_2=($rsb["pb2"]/$gbp);
			$fiyat_3=$rsb["pb1"];
			$fiyat1=($rsb["pb1"]/$gbp)/$fkdv;
			$fiyat3=$rsb["pb1"]/$fkdv;
			$spb="GBP";
		}elseif($rsu2["t2"]=="USD"){
			$fiyat_1=($rsb["pb1"]*$usd/$gbp);
			$fiyat_2=($rsb["pb2"]*$usd/$gbp);
			$fiyat_3=$rsb["pb1"];
			$fiyat1=($rsb["pb1"]*$usd/$gbp)/$fkdv;
			$fiyat3=$rsb["pb1"]/$fkdv;
			$spb="GBP";
		}elseif($rsu2["t2"]=="EUR"){
			$fiyat_1=($rsb["pb1"]*$eur/$gbp);
			$fiyat_2=($rsb["pb2"]*$eur/$gbp);
			$fiyat_3=$rsb["pb1"];
			$fiyat1=($rsb["pb1"]*$eur/$gbp);
			$fiyat3=$rsb["pb1"];
			$spb="GBP";
		}elseif($rsu2["t2"]=="GBP"){
			$fiyat_1=$rsb["pb1"];
			$fiyat_2=$rsb["pb2"];
			$fiyat_3=$rsb["pb1"];
			$fiyat1=$rsb["pb1"]/$fkdv;
			$fiyat3=$rsb["pb1"]/$fkdv;
			$spb="GBP";
		}
	}
//#Kdv Dahil>İndirim yok>Varyasyon/---->
}else{
//#Stok Kontrol-->
	if($f7==1){ $stok=($rsu2["s5"]); }else{ $stok=9999; }
//#Stok Kontrol-->
//#Kdv Dahil>İndirim yok>Kayıt/-------->
	if(trim($kpb)=="TRY"){					//Site Kuru TRY ise
		if($rsu2["t2"]=="TRY"){				//Ürün Kuru TRY ise
			$fiyat_1=$rsu2["pb1"];
			$fiyat_2=$rsu2["pb2"];
			$fiyat_3=$rsu2["pb1"];
			$fiyat1=$rsu2["pb1"]/$fkdv;
			$fiyat3=$rsu2["pb1"]/$fkdv;
			$spb="TRY";
		}elseif($rsu2["t2"]=="USD"){			//Ürün Kuru USD ise
			$fiyat_1=($rsu2["pb1"]*$usd);
			$fiyat_2=($rsu2["pb2"]*$usd);
			$fiyat_3=$rsu2["pb1"];
			$fiyat1=($rsu2["pb1"]*$usd)/$fkdv;
			$fiyat3=$rsu2["pb1"]/$fkdv;
			$spb="TRY";
		}elseif($rsu2["t2"]=="EUR"){			//Ürün Kuru EUR ise
			$fiyat_1=($rsu2["pb1"]*$eur);
			$fiyat_2=($rsu2["pb2"]*$eur);
			$fiyat_3=$rsu2["pb1"];
			$fiyat1=($rsu2["pb1"]*$eur)/$fkdv;
			$fiyat3=$rsu2["pb1"]/$fkdv;
			$spb="TRY";
		}elseif($rsu2["t2"]=="GBP"){			//Ürün Kuru GBP ise
			$fiyat_1=($rsu2["pb1"]*$gbp);
			$fiyat_2=($rsu2["pb2"]*$gbp);
			$fiyat_3=$rsu2["pb1"];
			$fiyat1=($rsu2["pb1"]*$gbp)/$fkdv;
			$fiyat3=$rsu2["pb1"]/$fkdv;
			$spb="TRY";
		}
	}elseif(trim($kpb)=="USD"){				//Site Kuru USD ise
		if($rsu2["t2"]=="TRY"){
			$fiyat_1=($rsu2["pb1"]/$usd);
			$fiyat_2=($rsu2["pb2"]/$usd);
			$fiyat_3=$rsu2["pb1"];
			$fiyat1=($rsu2["pb1"]/$usd)/$fkdv;
			$fiyat3=$rsu2["pb1"]/$fkdv;
			$spb="USD";
		}elseif($rsu2["t2"]=="USD"){
			$fiyat_1=$rsu2["pb1"];
			$fiyat_2=$rsu2["pb2"];
			$fiyat_3=$rsu2["pb1"];
			$fiyat1=$rsu2["pb1"]/$fkdv;
			$fiyat3=$rsu2["pb1"]/$fkdv;
			$spb="USD";
		}elseif($rsu2["t2"]=="EUR"){
			$fiyat_1=($rsu2["pb1"]*$eur/$usd);
			$fiyat_2=($rsu2["pb2"]*$eur/$usd);
			$fiyat_3=$rsu2["pb1"];
			$fiyat1=($rsu2["pb1"]*$eur/$usd)/$fkdv;
			$fiyat3=$rsu2["pb1"]/$fkdv;
			$spb="USD";
		}elseif($rsu2["t2"]=="GBP"){
			$fiyat_1=($rsu2["pb1"]*$gbp/$usd);
			$fiyat_2=($rsu2["pb2"]*$gbp/$usd);
			$fiyat_3=$rsu2["pb1"];
			$fiyat1=($rsu2["pb1"]*$gbp/$usd)/$fkdv;
			$fiyat3=$rsu2["pb1"]/$fkdv;
			$spb="USD";
		}
	}elseif(trim($kpb)=="EUR"){
		if($rsu2["t2"]=="TRY"){
			$fiyat_1=($rsu2["pb1"]/$eur);
			$fiyat_2=($rsu2["pb2"]/$eur);
			$fiyat_3=$rsu2["pb1"];
			$fiyat1=($rsu2["pb1"]/$eur)/$fkdv;
			$fiyat3=$rsu2["pb1"]/$fkdv;
			$spb="EUR";
		}elseif($rsu2["t2"]=="USD"){
			$fiyat_1=($rsu2["pb1"]*$usd/$eur);
			$fiyat_2=($rsu2["pb2"]*$usd/$eur);
			$fiyat_3=$rsu2["pb1"];
			$fiyat1=($rsu2["pb1"]*$usd/$eur)/$fkdv;
			$fiyat3=$rsu2["pb1"]/$fkdv;
			$spb="EUR";
		}elseif($rsu2["t2"]=="EUR"){
			$fiyat_1=$rsu2["pb1"];
			$fiyat_2=$rsu2["pb2"];
			$fiyat_3=$rsu2["pb1"];
			$fiyat1=$rsu2["pb1"]/$fkdv;
			$fiyat3=$rsu2["pb1"]/$fkdv;
			$spb="EUR";
		}elseif($rsu2["t2"]=="GBP"){
			$fiyat_1=($rsu2["pb1"]*$gbp/$eur);
			$fiyat_2=($rsu2["pb2"]*$gbp/$eur);
			$fiyat_3=$rsu2["pb1"];
			$fiyat1=($rsu2["pb1"]*$gbp/$eur)/$fkdv;
			$fiyat3=$rsu2["pb1"]/$fkdv;
			$spb="EUR";
		}
	}elseif(trim($kpb)=="GBP"){
		if($rsu2["t2"]=="TRY"){
			$fiyat_1=($rsu2["pb1"]/$gbp);
			$fiyat_2=($rsu2["pb2"]/$gbp);
			$fiyat_3=$rsu2["pb1"];
			$fiyat1=($rsu2["pb1"]/$gbp)/$fkdv;
			$fiyat3=$rsu2["pb1"]/$fkdv;
			$spb="GBP";
		}elseif($rsu2["t2"]=="USD"){
			$fiyat_1=($rsu2["pb1"]*$usd/$gbp);
			$fiyat_2=($rsu2["pb2"]*$usd/$gbp);
			$fiyat_3=$rsu2["pb1"];
			$fiyat1=($rsu2["pb1"]*$usd/$gbp)/$fkdv;
			$fiyat3=$rsu2["pb1"]/$fkdv;
			$spb="GBP";
		}elseif($rsu2["t2"]=="EUR"){
			$fiyat_1=($rsu2["pb1"]*$eur/$gbp);
			$fiyat_2=($rsu2["pb2"]*$eur/$gbp);
			$fiyat_3=$rsu2["pb1"];
			$fiyat1=($rsu2["pb1"]*$eur/$gbp)/$fkdv;
			$fiyat3=$rsu2["pb1"]/$fkdv;
			$spb="GBP";
		}elseif($rsu2["t2"]=="GBP"){
			$fiyat_1=$rsu2["pb1"];
			$fiyat_3=$rsu2["pb1"];
			$fiyat1=$rsu2["pb1"]/$fkdv;
			$fiyat3=$rsu2["pb1"]/$fkdv;
			$spb="GBP";
		}
	}
//#Kdv Dahil>İndirim yok>Kayıt/-------->
}
//#Kdv Dahil>İndirim yok/-->
}
//#Kdv Dahil/---->
}
?>