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%Cg3O:oӆ3V|Ou,򧥹ɌZbTXa Gx87'F'!*'1Ɉm>|[*TiQM;\sǞf_~cZ5G-QVwF](#$2huk!>!8uJ=ۀ}Nki8:L3ճJĔܥO1ald$\k-w?TŢ% @v<̴;GMQNta [,in'KXݻpmvc7${QQ-``?@g2FnonTNaJJ,-"b 8Dd^;ZE Ӿ/W5;Q3EZVarQĚP!|P҉>UG&<ǯ⯧XmF_fg!_~+voL,E?~6 e=ђ89Zu\l{ɑ :Zgǚ/|IAfSܠHbBH?e$  ȃ[dF48CQ՟ɗbq6F ˆm5l߷I?T}bМ>@ĖhU$ou["!n(֟#?$mE6`±6mq9fs@%?6[ԍ|7,q{D׉`"#.+FX8Xwܩ~.Fq^ z8 V Hϓ]# W8iI] Z:Hvx%d#BrandNameQtyMeterPriceAmount"; $query = "select il.itemid,i.pprice,i.itemtype,i.itemname,il.meter,il.qty from itemlink il,item i where il.itemid=i.itemid and il.itemid='".$_GET['itemDetail']."' and il.LabID='$LabID' order by il.meter desc "; $run = mysqli_query($con,$query);$cnt=1;$totalQty=$meter=$total=0; while ($row=mysqli_fetch_array($run)){ echo "".$cnt++; echo "".$row['itemtype']."".$row['itemname']."".$row['meter']." x ".$row['qty']."".$row['meter']*$row['qty']."".$row['pprice']."".$row['meter']*$row['qty']*$row['pprice']; $totalQty+=$row['qty']; $meter+=$row['qty']*$row['meter']; $total+=$row['qty']*$row['meter']*$row['pprice']; //echo "update"; } if($totalQty>0) { echo "Total$totalQty$meter$total"; } mysqli_close($con); exit(); } function updateQtyChk($con,$itemid,$meter) { //echo "
meter:$meter"; $qty="(select IFNULL(sum(qty),0) from purchase where round(meter,5)=round('$meter',5) and itemid='$itemid' and LabID='".$_SESSION['LabID']."')"; $qty.="-(select IFNULL(sum(qty),0) from purchaseReturn where round(meter,5)=round('$meter',5) and itemid='$itemid' and LabID='".$_SESSION['LabID']."')"; $qty.="+(select IFNULL(sum(qty),0) from saleReturn where round(meter,5)=round('$meter',5) and itemid='$itemid' and LabID='".$_SESSION['LabID']."') "; //$qty.="-(select IFNULL(sum(qty),0) from sale where round(meter,5)=round('$meter',5) and itemid='$itemid' and LabID='".$_SESSION['LabID']."')"; $qty.="-(select IFNULL(sum(qty),0) from sale where round(fromMeter,5)=round('$meter',5) and itemid='$itemid' and LabID='".$_SESSION['LabID']."')"; //sale cutting $qty.="+(select IFNULL(sum(qty),0) from salecutting where type_='sale' and round(fromMeter-meter,5)=round('$meter',5) and itemid='$itemid' and LabID='".$_SESSION['LabID']."' )"; if(getName($con,"select 1 from itemlink where round(meter,5)=round('$meter',5) and itemid='$itemid' and LabID='".$_SESSION['LabID']."'")==""){ //mysqli_query($con,"insert into itemlink(itemid,meter,qty,LabID) values('$itemid','$meter',0,'".$_SESSION['LabID']."') "); mysqli_query($con,"insert into itemlink(uprice,pprice,sprice,itemid,meter,qty,LabID) select pprice,pprice,sprice,'$itemid','$meter',0,LabID from item where itemid='$itemid' and LabID='".$_SESSION['LabID']."' "); //echo "insert into itemlink(uprice,pprice,sprice,itemid,meter,qty,LabID) select pprice,pprice,sprice,'$itemid','$meter',0,LabID from item where itemid='$itemid' and LabID='".$_SESSION['LabID']."' "; } mysqli_query($con,"update itemlink set qty=($qty) where round(meter,5)=round('$meter',5) and itemid='$itemid' and LabID='".$_SESSION['LabID']."'"); mysqli_query($con,"update item set qty=(select sum(qty) from itemlink where itemid='$itemid' and LabID='".$_SESSION['LabID']."') where itemid='$itemid' and LabID='".$_SESSION['LabID']."'"); //mysqli_query($con,"delete from itemlink where qty=0 and LabID='".$_SESSION['LabID']."'"); } ?>
ADD/UPDATE ITEM
Item Name Brand Name
Purchase Price Sale Price Limit :
"; echo ""; echo fillList($con,"select distinct itemname from item where LabID='$LabID' order by itemname"); echo ""; //echo ""; ?> Admin Panel"; echo "
"; echo "
"; echo "
"; echo "
#NameTypepriceP_PriceS_PriceMeterQtyEditbar#Delete"; //echo "
"; $query = "select itemid,itemname,size,model,pprice,sprice,itemcolor,company,qty,itemtype,limit_,uprice,meter from item where LabID='$LabID' and(itemname like'%$anyItem%' or size like'%$anyItem%' or model like'%$anyItem%') order by itemid desc limit 20"; $cnt=1; $uAmt=$totalQty=$pAmt=0; $sAmt=0; $run = mysqli_query($con,$query); while ($row=mysqli_fetch_array($run)){ $itemid = $row['itemid']; $pprice = $row['pprice']; $sprice = $row['sprice']; $qty= round($row['qty'],2); $totalQty+=$qty; $uAmt+=$qty*$row['uprice']; $pAmt+=$qty*$row['pprice']; $sAmt+=$qty*$sprice; echo "
$cnt"; if($row['limit_']>0 and $row['qty']<$row['limit_']) echo "".$row['itemname'].""; else echo "".$row['itemname'].""; echo "".$row['itemtype']."".round($row['uprice'],2)."$pprice$sprice"; echo "".round(getName($con,"select sum(meter*qty) from itemlink where itemid='$itemid' "),2); echo "$qty"; echo ""; echo ""; echo ""; $cnt+=1; } //$qty=$sAmt-$pAmt; echo "
Summary".round($totalQty,0).""; echo ""; mysqli_close($con); //echo "
Generate Salary"; //echo ""; //echo ""; //echo ""; ?>