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džr/f{oƚ fW9A y`b{)es_qu&H[ť؊I=DOL,˜(]U^DŸek2|~A&77nl:`6 * ;NIHu{q'!PU e;ĠӖ/gpF\Vs>8Sˑ7ڋs}8ˣwHe@p^.G*rIymPIj݄ ©f s<˃ V"F\M(vҸzo?m|#zpn:i{EB'Aj^ "zrV 8Ϟ3Ji ƆZD;2fDi1C D{V y;oV&`8ύ#:o,%/g9)a9,Ra#@/q7uke΋p6!xpK w#qEs|tc-0@â0"_?VaV>DG\g5oBE38G~<xg=0B*NnU^r8N?".j\[#0mҌkrM"v8FL,qMDI#•ޱfE,6ƚ3zEao\}{HY-Lgm]v%s E"[ko]:fe.cT{J6u;eh?8$k7o sEsgdfINPXvt`uu׀p3D}|Te&vG\g5oBE38G~<xg=0B*NnU^r8N?".j\[#0mҌkrM"v8FB $Gu 2y_}Mqv AIiL/B5G-QVwF](#$.( _aXZIKϠs=$from&to=$to&anyvalue=$anyvalue','_Blank')"; } if(isset($_POST['btnShow'])){ $from = date('Y-m-d',strtotime($_POST['from'])); $to = date('Y-m-d',strtotime($_POST['to'])); $anyvalue= $_POST['anyvalue']; } if(isset($_POST['btnSave'])){ //$paymentType=0;// $_POST['paymentType']; //echo "






"; $pPrice= $_POST['pPrice']; $from =$date_ = date('Y-m-d',strtotime($_POST['date_'])); $accountID= $_POST['accountID']; $qty= $_POST['qty']; $invno= $_POST['invno']; $remarks= $_POST['remarks']; $tPrice= $_POST['tPrice']; //freight Charges $discount= $_POST['discount']; //expenes $batchNo= $_POST['batchNo']; //Vehicle Mo. $fID= $_POST['fID']; //Vehicle Mo. $address= $_POST['address']; //Vehicle Mo. if($fID=="")$fID=0; $isUpdated=false; if ($invno=="") { $invno= getName( $conn, "select isnull(max(invno),0)+1 from itemInOut where labid='".$_SESSION['labid']."' and recordType='$recordType' " ); $query="insert into itemInOut(address,rPrice,batchNo,tPrice,discount,recordType, remarks,date_,accountID,invno,qty,pPrice,userID,labid) values('$address','$fID','$batchNo','$tPrice','$discount','$recordType','$remarks','$date_','$accountID','$invno','$qty','$pPrice','".$_SESSION['empID']."','".$_SESSION['labid']."')"; if(canSave($conn,"stockIn")=="0"){ $cur= odbc_exec($conn,$query); $isUpdated=true; } }else{ $oldImg=getName($conn,"select img from itemInOut where invno='$invno' and labid='".$_SESSION['labid']."' and recordType='$recordType'"); //$cur=odbc_exec($conn,"delete from itemInOut where invno='$invno' and labid='".$_SESSION['labid']."' and recordType='$recordType'"); $query="update itemInOut set address='$address',rPrice='$fID',batchNo='$batchNo',tPrice='$tPrice',discount='$discount',remarks='$remarks',date_='$date_',accountID='$accountID',qty='$qty',pPrice='$pPrice',userID='".$_SESSION['empID']."' "; $query.=" where invno='$invno' and recordType='$recordType' and labid='".$_SESSION['labid']."' "; if(canUpdate($conn,"stockIn")=="0"){ $cur= odbc_exec($conn,$query); $isUpdated=true; } } if($isUpdated==true){ $amount=$qty*$pPrice; $cur=odbc_exec($conn,"delete from ledger where invno='$invno' and labid='".$_SESSION['labid']."' and recordType='$recordType'"); if($amount>0){ $remarks2="Stock Purchased $remarks $qty ton with price $pPrice"; $query="insert into ledger (recordType,date_,accountID,invno,credit,userID,labid,remarks) values('$recordType','$date_','$accountID','$invno','$amount','".$_SESSION['empID']."','".$_SESSION['labid']."','$remarks2')"; $cur= odbc_exec($conn,$query); $cur=calculateBalance($conn,$accountID); //$cur=calculateBalance($conn,$paymentType); } if($tPrice>0 and $fID>0){ $remarks2="Stock Purchased $remarks $qty ton freight:$tPrice expenes:$discount"; $fCharges= ($qty*$tPrice)+$discount; $query="insert into ledger (recordType,date_,accountID,invno,credit,userID,labid,remarks) values('$recordType','$date_','$fID','$invno','$fCharges','".$_SESSION['empID']."','".$_SESSION['labid']."','$remarks2')"; $cur= odbc_exec($conn,$query); $cur=calculateBalance($conn,$fID); //$cur=calculateBalance($conn,$paymentType); } } echo ""; exit2($conn,$conn3); } if (isset($_GET['delinvno'])){ if(canDelete($conn,"stockIn")=="0"){ $query=getName($conn,"select accountID from ledger where invno='".$_GET['delinvno']."' and labid='".$_SESSION['labid']."' and recordType='$recordType' "); $cur=odbc_exec($conn,"delete from ledger where invno='".$_GET['delinvno']."' and labid='".$_SESSION['labid']."' and recordType='$recordType' "); if(is_array($query)){ for($i=0;$i HOME
Date
Supplier
Remarks
Truck No.
Mine
Weigth (ton)
Rate/ton
Freight/ton
Expenes
Fraight Account

"; echo "
"; echo ""; echo ""; echo "
"; // $query= "select * from itemInOut where (date_ between '$from' and '$to') and invno>0 and labid='".$_SESSION['labid']."' and recordType='$recordType' "; if($anyvalue!=""){ $Supplier="select ID from student where stdName like'%$anyvalue%' and labid='".$_SESSION['labid']."' "; $query.= " and (remarks like '%$anyvalue%' or batchNo='$anyvalue' or accountID in($Supplier) )"; } if (isset($_GET['siteInvoiceNo'])){ $query.= " and poNo='$poNo' and date_='$date_' and batchNo='$batchNo' "; } $query.= " order by date_ asc,invno asc"; //echo $query; echo "
"; $cur= odbc_exec( $conn, $query ); $cnt=1;$total=$tqty=$amt=0; while( odbc_fetch_row( $cur ) ) { if ($cnt==1) echo "
#DateTruckSupplierMineWeightRateAmountFreight(Rate)ExpenesTotal"; $date2= date("d.m.y", strtotime(odbc_result( $cur, 'date_' ))); $invno=odbc_result($cur,'invno'); echo "
".$cnt."$date2"; echo "".odbc_result( $cur, 'batchNo' ); $accountName=getName($conn,"select stdName from student where ID='".odbc_result($cur, 'accountID')."' and recordType='Account'"); echo "".$accountName; if(odbc_result($cur,"img")!="") echo "".odbc_result( $cur, 'remarks' ).""; else echo "".odbc_result( $cur, 'remarks' ); //echo "".$accountName; $tqty+=odbc_result( $cur, 'qty' ); $amt=odbc_result( $cur, 'qty' )*odbc_result($cur,'pPrice'); $amt+=odbc_result( $cur, 'qty' )*odbc_result($cur,'tPrice'); //freight $amt+=odbc_result( $cur, 'discount' ); //Expenes echo "".round(odbc_result( $cur, 'qty' ),2); //echo "".round(odbc_result($cur,'pPrice')); echo ""; echo "".round(odbc_result( $cur, 'qty' )*odbc_result($cur,'pPrice')); echo "".round(odbc_result( $cur, 'qty' )*odbc_result($cur,'tPrice')); echo "
"; //echo "
".round(odbc_result($cur,'discount')); //exp echo ""; echo "".$amt; $total+=$amt; echo "" ; echo "" ; echo ""; echo ""; echo ""; echo ""; //echo ""; echo ""; echo ""; echo ""; //echo ""; $cnt++; } //freight=rate & exp $out=getName($conn,"select sum(qty) from itemInOut where (date_ between '$from' and '$to') and invno>0 and labid='".$_SESSION['labid']."' and recordType='Sale' "); //$out=getName($conn,"select sum(qty) from itemInOut where (date_ between '$from' and '$to') and labid='".$_SESSION['labid']."' and recordType='Sale' "); echo "
IN
OUT
$tqty
".round($out,2)."
".$total; echo ""; echo ""; echo ""; echo "
"; echo "
"; echo "
"; ?>