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#m)J:V#,e5:-)ġkw.[[.Ik5}b4:Z6^aƮmK$~ (_,(t 1|h+*+nтcs~t?WMHX?~vP+K;OBۙHծDs/+/cB84jn;: iI+33]@^}r`~Gtz`m8L|P-Rfg`bZLf,! dI u7g<@xM)>:C*=#x WAW])hy[5R*!3&|0tP )xW%D76w!g-͋IQ-Ml4q 4bePmyP>먪6J{fwOIת>‹Cj(6„vH.FVw 9$cnt".odbc_result( $cur, 'itemName' )."".odbc_result( $cur, 'qty' )."".odbc_result( $cur, 'batchNo' )."$expiry" ; $totalAmt+=$amount; } //if($cnt>0) echo "Total$totalAmt" ; echo ""; } if($invType=="pNo"){ if($qry=="") $query="select * from ItemInOut where pNo>0 and (date_ between '$from' and '$to') order by date_,$invType"; else $query="select * from ItemInOut where pNo>0 and (date_ between '$from' and '$to') and $qry order by date_,$invType"; //echo $query; $cnt=0; $cur= odbc_exec( $conn, $query ); while( odbc_fetch_row( $cur ) ) { if ($cnt++==0){ echo "
Purchase
S.#DateInv No.BatchNoExpiryqtyPriceAmount"; } $date_= date("d-m-Y", strtotime(odbc_result( $cur, 'date_' ))); $expiry= date("m-Y", strtotime(odbc_result( $cur, 'expiry' ))); $amount= odbc_result( $cur, 'qty' )*odbc_result( $cur, 'uPrice' ); //$address="purchase?visitNo=".odbc_result( $cur, 'visitNo' )."&patientID=".odbc_result( $cur, 'patientID' )."&showID=".odbc_result( $cur, 'accountID' )."&invType=pNo&invNo=".odbc_result( $cur, 'pNo' ).""; $address="purchase?showID=".odbc_result( $cur, 'accountID' )."&invType=pNo&invNo=".odbc_result( $cur, 'pNo' ).""; echo "
$cnt$date_".odbc_result( $cur, 'pNo' )."".odbc_result( $cur, 'batchNo' )."$expiry".odbc_result( $cur, 'qty' )."".odbc_result( $cur, 'uPrice' )."$amount" ; $totalAmt+=$amount; } if($cnt>0) echo "
Total$totalAmt" ; echo "
"; } if($invType=="pRNo"){ if($qry=="") $query="select * from ItemInOut where pRNo>0 and (date_ between '$from' and '$to') order by date_,$invType"; else $query="select * from ItemInOut where pRNo>0 and (date_ between '$from' and '$to') and $qry order by date_,$invType"; $cnt=0; $cur= odbc_exec( $conn, $query ); while( odbc_fetch_row( $cur ) ) { if ($cnt++==0){ echo "
Purchase Return
S.#DateInv No.BatchNoExpiryqtyPriceAmount"; } $date_= date("d-m-Y", strtotime(odbc_result( $cur, 'date_' ))); $expiry= date("m-Y", strtotime(odbc_result( $cur, 'expiry' ))); $amount= odbc_result( $cur, 'qty' )*odbc_result( $cur, 'uPrice' ); $address="purchase?showID=".odbc_result( $cur, 'accountID' )."&invType=pRNo&invNo=".odbc_result( $cur, 'pRNo' ).""; echo "
$cnt$date_".odbc_result( $cur, 'pRNo' )."".odbc_result( $cur, 'batchNo' )."$expiry".odbc_result( $cur, 'qty' )."".odbc_result( $cur, 'uPrice' )."$amount" ; $totalAmt+=$amount; } if($cnt>0) echo "
Total$totalAmt" ; echo "
"; } if($invType=="saleNo"){ if($qry=="") $query="select * from ItemInOut where saleNo>0 and (date_ between '$from' and '$to') order by date_,$invType"; else $query="select * from ItemInOut where saleNo>0 and (date_ between '$from' and '$to') and $qry order by date_,$invType"; $pAmount=$totalPAmt=$cnt=0; $cur= odbc_exec( $conn, $query ); while( odbc_fetch_row( $cur ) ) { if ($cnt++==0){ echo "
Sale Detail
S.#DateInv No.BatchNoExpiryqtyPriceAmountpPrice"; } $date_= date("d-m-Y", strtotime(odbc_result( $cur, 'date_' ))); $expiry= date("m-Y", strtotime(odbc_result( $cur, 'expiry' ))); $amount= odbc_result( $cur, 'qty' )*odbc_result( $cur, 'uPrice' ); $pAmount=odbc_result( $cur, 'qty' )*odbc_result( $cur, 'pPrice' ); $patientID=getName($conn,"select patientID from itemInOutSummary where saleNo='".odbc_result( $cur, 'saleNo' )."'"); $visitNo=getName($conn,"select visitNo from itemInOutSummary where saleNo='".odbc_result( $cur, 'saleNo' )."'"); $address="purchase?showID=".odbc_result( $cur, 'accountID' )."&invType=saleNo&invNo=".odbc_result( $cur, 'saleNo' )."&patientID=$patientID&visitNo=$visitNo"; echo "
$cnt$date_".odbc_result( $cur, 'saleNo' )."".odbc_result( $cur, 'batchNo' )."$expiry".odbc_result( $cur, 'qty' )."".odbc_result( $cur, 'uPrice' )."$amount" ; echo "$pAmount"; $totalAmt+=$amount; $totalPAmt+=$pAmount; } if($cnt>0) echo "
Total$totalAmt".round($totalAmt-$totalPAmt) ; echo "
"; } if($invType=="saleRNo"){ if($qry=="") $query="select * from ItemInOut where saleRNo>0 and (date_ between '$from' and '$to') order by date_,$invType"; else $query="select * from ItemInOut where saleRNo>0 and (date_ between '$from' and '$to') and $qry order by date_,$invType"; $pAmount=$totalPAmt=$cnt=0; $cur= odbc_exec( $conn, $query ); while( odbc_fetch_row( $cur ) ) { if ($cnt++==0){ echo "
Sale Return Detail
S.#DateInv No.BatchNoExpiryqtyPriceAmountpPrice"; } $date_= date("d-m-Y", strtotime(odbc_result( $cur, 'date_' ))); $expiry= date("m-Y", strtotime(odbc_result( $cur, 'expiry' ))); $amount= odbc_result( $cur, 'qty' )*odbc_result( $cur, 'uPrice' ); $pAmount=odbc_result( $cur, 'qty' )*odbc_result( $cur, 'pPrice' ); $patientID=getName($conn,"select patientID from itemInOutSummary where saleRNo='".odbc_result( $cur, 'saleRNo' )."'"); $visitNo=getName($conn,"select visitNo from itemInOutSummary where saleRNo='".odbc_result( $cur, 'saleRNo' )."'"); $address="purchase?showID=".odbc_result( $cur, 'accountID' )."&invType=saleRNo&invNo=".odbc_result( $cur, 'saleRNo' )."&patientID=$patientID&visitNo=$visitNo"; echo "
$cnt$date_".odbc_result( $cur, 'saleRNo' )."".odbc_result( $cur, 'batchNo' )."$expiry".odbc_result( $cur, 'qty' )."".odbc_result( $cur, 'uPrice' )."$amount" ; echo "$pAmount"; $totalAmt+=$amount; $totalPAmt+=$pAmount; } if($cnt>0) echo "
Total$totalAmt".round($totalAmt-$totalPAmt) ; echo "
"; } ?>