<?php
if($_POST["orderID"] && $_POST["sdate"] && $_POST["user"])
{ 
 require_once"labClass.php";
  $con=new labClass();
  
    $sdate= $_POST['sdate'];
    $orderID= $_POST['orderID'];
    $user= $_POST['user'];
    
    $chkp= $con->getThisPOrderQByID($orderID);//getThisPOrderQ();//getDrugList();//getItemDistinct();     
    if ($chkp->rowCount()>0) {
     $chp=$chkp->fetchAll();
  
    foreach ($chp as $key => $p) {
    $itemID=$p['itemID'];
    $nQty= $p['eQty'];
    $iname= $p['iname'];
    $c= $con->getThisItem($iname)->fetch();
   
    
    $isprice= $c['isprice'];
    $ipprice= $c['ipprice']; 
   
   $rQ= $con->itemPOrdeEntry($orderID,$itemID,$iname,$ipprice,$isprice,$nQty,$sdate,$user);
 
 }
}
//$r= $con->clearPItemListQ();
require_once "pharmptempLLPO.php";
       
    
}
    
?>