
<?php 
include'../css.php';
?>
 
 <?php
header ("Content-Type: text/html; charset=iso-8859-9");
session_start();
ob_start();

 

?>
<?php
include('../baglan.php');

if(isset($_GET['KONSINYE_ID'])) $KONSINYE_ID = $_GET['KONSINYE_ID'];
$baglan = mysql_query("select * from konsinyeler where KONSINYE_ID='$KONSINYE_ID'"); 


$yaz = mysql_fetch_assoc($baglan); // while dongsu icine almadim tek veri cekecegimiz icin. burda get methodunu da kullandık

?>

<div class="box box-success"><h3 class="box-title">Konsinye Sat</h3> </div>
<div class="box-body">
<form name="form1" method="post" action="konsinyesat_islem.php">


  <div id='tab-menu'>
  <div class='tab-menu'>
	<a href='#'>Konsinye Sat</a></div>
		<div class='tabmenuContent'>  


 <?php
$_SESSION["konsinye_id"] = $yaz["KONSINYE_ID"];
?>
<? echo $_SESSION["konsinye_id"] ;?>


<? echo $_SESSION["kullanici_adi"];?>
 <table border="0"  cellpadding="0" cellspacing="3">
    


          <tr>
      <td ><strong>Satış Tarih</strong>  

<input name="KONSINYE_ISLEM_ID" type="hidden" id="KONSINYE_ISLEM_ID"  size="20" />
<input name="SATIS_DEPRESANT" type="hidden" id="SATIS_DEPRESANT" value="<? echo $_SESSION["kullanici_adi"];?>" size="20" />
<input name="KONSINYE_ID" type="hidden" id="KONSINYE_ID" size="20"  value="<? echo $yaz["KONSINYE_ID"];?>"  />
  <input name="SATIS_SEKLI" type="hidden" id="SATIS_SEKLI" size="20"  value="Konsinye_Satis"  />

</td>
      <td ><div class="input-group">
<input name="KONSINYE_TARIH" id="KONSINYE_TARIH" type="date" class="form-control"    size="63"  min="2022-01-01" max="2022-12-31" required />    </tr>

      </span></td>
    </tr>
    <tr>
      <td class="size12"><strong>Satılan Ürün Adı  </strong></td>
      <td><input name="KONSINYE_URUN_ADI" type="text" class="form-control"  id="KONSINYE_URUN_ADI" size="63"  value="<? echo $yaz["KONSINYE_URUN_ADI"];?>"  /></td>
    </tr>


     
    <tr>
      <td class="size12"><strong>Reçete Eden Dr</strong></td>
      <td><select name="KONSINYE_ECZANE" id="KONSINYE_ECZANE"  class="form-control   select2-hidden-accessible">
        <?php include('baglan.php'); 

 $sorumlu_kodu=$_SESSION["kullanici_adi"];
$sql = mysql_query("SELECT * FROM doktorlar WHERE DOKTOR_SORUMLU_KODU='$sorumlu_kodu' "); 
while ($a = mysql_fetch_array($sql)) {
if ($yaz[KONSINYE_ECZANE] == $a[DOKTOR_ADI]){ $durum=  'selected="selected"'; } else { $durum =''; }?>
      
<option value="<?php echo $a[DOKTOR_ADI];?>" <?php echo $durum; ?> ><?php echo $a[DOKTOR_ADI];?></option>

<?php } ?>
          </select></td>
    </tr>

  <tr>
 <td class="size12"><strong>Ürün Kullanımı</strong></td>
<td>
<select name="SATIS_URUN_KULLANIM" id="SATIS_URUN_KULLANIM" class="form-control   select2-hidden-accessible"   aria-hidden="true" required>
<option value="Oral">Oral</option>
<option value="Enjeksiyon">Enjeksiyon</option>
</select>
 </td>
</tr>
 <tr>
      <td class="size12"><strong>Satış Tutarı</strong></td>
      <td><input name="SATIS_TUTARI" type="text" class="form-control"  id="SATIS_TUTARI" size="63" value="<? echo $yaz["SATIS_TUTARI"];?>"   /></td>
    </tr>


 <tr>
      <td class="size12"><strong>Satış Adet</strong></td>
      <td><input name="SATIS_ADET" type="text" class="form-control"  id="SATIS_ADET" size="63"    /></td>
    </tr>
    <tr>
      <td valign="top" class="size12">&nbsp;</td>
      <td><input name="button" type="submit" class="button_gri" id="button" value="Satış Tamamla" /></td>
    </tr>
    <tr>
      <td valign="top" class="size12">&nbsp;</td>
      <td>&nbsp;</td>
    </tr>
    <tr>
      <td valign="top" class="size12">&nbsp;</td>
      <td>&nbsp;</td>
    </tr>
    <tr>
      <td valign="top" class="size12">&nbsp;</td>
      <td>&nbsp;</td>
    </tr>
  </table>














  </div>






</form>
  </div>


	