<?php
if($_POST["orderID"] && $_POST["sdate"] && $_POST["user"])
{ 
 require_once"labClass.php";
  $con=new labClass();
  
    $sdate= $_POST['sdate'];
    $orderID= $_POST['orderID'];
    $user= $_POST['user'];
    $r= $con->clearPOrderTempQ();
    $chkp= $con->getDrugList();//getItemDistinct();     
    if ($chkp->rowCount()>0) {
     $chp=$chkp->fetchAll();
  
    foreach ($chp as $key => $p) {
    //if($p['iqty']<=5){
    $itemID=$p['itemID'];
    $isprice= $p['isprice'];
    $ipprice= $p['ipprice']; 
    $iname= $p['iname'];
    $nQty= $p['iqty']; 
   // $isprice= $_POST['isprice'];
   // $ipprice= $_POST['ipprice'];
//	 $iname= $_POST['iname'];
    //$nQty= $_POST['nQty'];
    //$itemID= $_POST['itemID']; 
  //CHECKING ENDS HER
   $rQ= $con->itemPOrdeEntryQ($orderID,$itemID,$iname,$ipprice,$isprice,$nQty,$sdate,$user);//itemPOrdeEntry($orderID,$itemID,$iname,$ipprice,$isprice,$nQty,$sdate,$user);
// }
 }
}
     require_once "pharmptempLLPOstff.php";
       
    
}
    
?>