<?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->clearPOrderTemp();
    $chkp= $con->getDrugList();//getItemDistinct();     
    if ($chkp->rowCount()>0) {
     $chp=$chkp->fetchAll();
  
    foreach ($chp as $key => $p) {
    if($p['iqty']>=0){
    $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->itemPOrdeEntry($orderID,$itemID,$iname,$ipprice,$isprice,$nQty,$sdate,$user);
 }
 }
}
     require_once "pharmptempLLPO.php";
       
    
}
    
?>