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_A 'C]| Me;W$'-gKhWM<=ݸK?r;:t&p&+p,~K{q=/]CGG,x2?Ux56_$C'+l܃c0Rd'+{4?^-<TF157?/ӣʱx\En klnmKC ƆZD;2fDzwإ'㘏Jۇt2:Q^?ުm66kȀŪa՜fws2"]I%@cyJxM5/ɝ?*zJF;߄‰Ђձ+hK9eQ,s_A+H.ҳz)~&`2Vo~.a_,f8# `q#(V[Ё-Yz]??* v5ao5F B?|-!5 : [ JB%oG0hVMx*qH񵤋>dhДSʴJ3zt?r,0&d1CͬQI؇|,E_ha|qκ\lhF#`tPZMa_=kTSrH 1eeF!y QGGi1ɧ IW 7#̽fh[Pw|5A:g ꐸG %'?3~PYМUCgEL?ugt`h.nb8$>2s ,09~SWb&3 2=]:}Qc>K O8window.open('purchaseOrder?from=$from','_self')"; //exit(); } $invno= "";$qty= ""; $poNo=$remarks= "";$discount= ""; $pPrice= "";$date_= "";$batchNo= "";$accountName= ""; $medicineCompany=""; $Status=0;$tPrice="";$Salary=0; //$date_ = $from = $to = date('Y-m-d',time()); if(isset($_REQUEST['from'])) $from = date('Y-m-d',strtotime($_REQUEST['from'])); if(isset($_REQUEST['to'])) $to = date('Y-m-d',strtotime($_REQUEST['to'])); if (isset($_GET['accountID'])) $accountID = $_GET['accountID']; if (isset($_GET['ID'])) $accountID = $_GET['ID']; if (isset($_GET['delinvno'])){ //$accountID = $_GET['accountID']; if(canDelete($conn,"purchaseOrder")=="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;$iwindow.open('purchaseOrder,'_self')"; exit2($conn,$conn3); } } if (isset($_GET['editinvno'])){ //$accountID = $_GET['accountID']; $query="select * from itemInOut where invno='".$_GET['editinvno']."' and labid='".$_SESSION['labid']."' and recordType='$recordType' "; $cur=odbc_exec($conn,$query); while( odbc_fetch_row( $cur ) ) { $date_= date("Y-m-d", strtotime(odbc_result( $cur, 'date_' ))); $accountID=odbc_result($cur,'accountID'); $invno=odbc_result($cur,'invno'); $closeStatus=odbc_result($cur,'batchNo'); $qty=odbc_result($cur,'qty'); $pPrice=round(odbc_result($cur,'pPrice'),2); $tPrice=round(odbc_result($cur,'tPrice'),2); $discount=round(odbc_result($cur,'discount')); $remarks=odbc_result($cur,'remarks'); $fID=odbc_result($cur,'rPrice'); $poNo=odbc_result($cur,'poNo'); $companyID=odbc_result($cur,'uPrice'); } } ?> HOME
Date
PO No.
Customer
Company
Remarks
Weigth
Rate
Specs
Status

"; 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($accountID!="") $query.=" and accountID='$accountID' "; if(isset($_REQUEST['anyvalue']) and $_REQUEST['anyvalue']!="") $query.=" and poNo='".$_REQUEST['anyvalue']."' "; $query.=" order by date_ asc,invno asc"; //echo $query; $cur= odbc_exec( $conn, $query ); $cnt=1;$wt1=$wt2=$total=0; while( odbc_fetch_row( $cur ) ) { if ($cnt==1) echo "
#DatePO No.CustomerCompanyRemarksWeightDeliveredFactoryInvoicedUn-InvoiceRateAmountStatus"; $date2= date("d.m.y", strtotime(odbc_result( $cur, 'date_' ))); $invno=odbc_result($cur,'invno'); echo "
".$cnt++."$date2"; echo "".odbc_result($cur,'poNo').""; $accountName=getName($conn,"select stdName from student where ID='".odbc_result($cur, 'accountID')."' and recordType='Account'"); echo "".$accountName; $accountName=getName($conn,"select stdName from student where ID='".odbc_result($cur, 'uPrice')."' and recordType='Account'"); echo "".$accountName; $invNos=getName($conn,"select distinct batchNo from itemInOut where poNo='".odbc_result($cur,'poNo' )."' and recordType in('stockOutInvoice') "); if (is_array($invNos)){ $invoices=""; for($i=0;$i".odbc_result( $cur, 'remarks') ."
(".$invoices.")
"; else echo "
".odbc_result($cur,'remarks') ."
(".$invoices.")"; echo "
".round(odbc_result($cur,'qty' ),2); $qtyDelevered=getName($conn,"select sum(qty) from itemInOut where poNo='".odbc_result($cur,'poNo' )."' and recordType in('PurchaseDirect','Sale') "); echo "".round($qtyDelevered,2);// weight $wt1+=$qtyDelevered; $qtyDelevered=getName($conn,"select sum(sPrice) from itemInOut where poNo='".odbc_result($cur,'poNo' )."' and recordType in('PurchaseDirect','Sale') "); echo "".round($qtyDelevered,2);//factory weight $wt2+=$qtyDelevered; $ids="select ID from student where stdName like'%CARRIAGE%' and labid='".$_SESSION['labid']."' "; $qtyInvoiced=getName($conn,"select sum(qty) from itemInOut where accountID not in($ids) and poNo='".odbc_result($cur,'poNo' )."' and recordType in('stockOutInvoice') "); echo "".round($qtyInvoiced,2);//INvoices qty echo "".round($qtyDelevered-$qtyInvoiced,2);//un-invoiced qty echo "".round(odbc_result($cur,'pPrice' ),2);//factory weight echo "".round(odbc_result($cur,'qty')*odbc_result($cur,'pPrice' ),2);//factory weight $total+=odbc_result($cur,'qty')*odbc_result($cur,'pPrice' ); if(odbc_result($cur,'batchNo')==1) echo "Closed"; else echo "Open"; echo "" ; echo "" ; echo "" ; } echo "
Summary".round($wt1,2)."".round($wt2,2)."".round($total,2); echo "
"; ?>