      <?
      
	  //Supplier Base On Project
	  
	  echo "<option value='' selected>--Select Supplier--</option>";
      //$mysuppquery="Select supplier_name,supplier_pkey from settings_suppliers where supplier_status=1 //order by supplier_name"; 
 
	  
	$cmsDB=$dsn_cms['database'];
	$pmsDB=$dsn_pms['database'];
 

	  $mysuppquery="select				$cmsDB.settings_suppliers.supplier_Name,$cmsDB.settings_suppliers.supplier_pkey from $cmsDB.settings_suppliers where
	  $cmsDB.settings_suppliers.supplier_pkey in(    
      (select distinct $pmsDB.po_details.po_supplierpkey from $pmsDB.po_details)) and $cmsDB.settings_suppliers.supplier_status=1
	  order by $cmsDB.settings_suppliers.supplier_Name";
	  
	  
	  $mysuppresult =& $db->query($mysuppquery);
      $mysuppcount=$mysuppresult->numRows();
      if ($mysuppcount!=0) {
        while($mysupprow=$mysuppresult->fetchRow()) {
          echo "<option value='".$mysupprow['supplier_pkey']."' ";
          if ($mysupprow['supplier_pkey']==$objsupplierpkey) { echo "selected"; }
          echo ">";
          echo $mysupprow['supplier_name'];
          echo "</option>";
        }
      }
      ?>
