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V|]Сs`JooVH>u#|׎ԥ>t/|)ȝNS 'a܆!'}TM\d/JbGuPj1`rO L„QU=*'#*o}-6'#'[_2Iڬs? DBzpX x!G9q]%?Tlehz~tShtz"J!;.Nu2!!z .F| W]=C={-U űK'Sٯh|Z,EK.+Q#$~2"!'s\U B8*Av[ z*1!NsE<`X|lm^=b z; bz33z=D\|բؐÄWr2\yت }K))c7 JNnR /Z3a 2MeiˀuC}A1iSq=X y]!|P}L"t%cbŢe{/΃ V U!wU{Q]ΏU# dJ]L̉HYΛ /MF7,Nm /AK4xzCRWM5D'egsq5Ѻmfro^8Bxo#'[_2Iک5`lSRrzϽ2ku˳9WE ,p؉b.*$6(&#3;ZCf+zť0G֛`y@dT/Ǘ7@.uӲPGY.&GMǼfܧjON/͚ihoʊ`2RT 6b(T۔!#5@S-,v^/); 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 "
"; $cnt=0; $query= "select * from ItemInOut where saleNo>0 and itemID='".$_GET['itemID']."' order by date_"; $cur= odbc_exec( $conn, $query ); while( odbc_fetch_row( $cur ) ) { if ($cnt++==0){ echo "
Sale Detail
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' ); $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" ; $totalAmt+=$amount; } if($cnt>0) echo "
Total$totalAmt" ; echo "
"; $cnt=0; $query= "select * from ItemInOut where saleRNo>0 and itemID='".$_GET['itemID']."' order by date_"; $cur= odbc_exec( $conn, $query ); while( odbc_fetch_row( $cur ) ) { if ($cnt++==0){ echo "
Sale 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' ); $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=saleNo&invNo=".odbc_result( $cur, 'saleNo' )."&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" ; $totalAmt+=$amount; } if($cnt>0) echo "
Total$totalAmt" ; echo "
"; }elseif(isset($_GET['testName'])){ $query= "select date_,labNo,patientName,sum(testCharges) as amount from patientTestsView where testName='".$_GET['testName']."' and (date_ between '$from' and '$to') group by date_,labNo,patientName"; $cur= odbc_exec( $conn, $query ); while( odbc_fetch_row( $cur ) ) { if ($cnt++==0){ echo "
Tests Detail
S.#DateLabNoPatientAmount"; } $date_= date("d-m-Y", strtotime(odbc_result( $cur, 'date_' ))); $patientName= odbc_result( $cur, 'patientName' ); $amount= odbc_result( $cur, 'amount' ); echo "
$cnt$date_".odbc_result( $cur, 'labNo' )."$patientName$amount" ; $totalAmt+=$amount; } if($cnt!=1) echo "
Total$totalAmt" ; echo "
"; }elseif(isset($_GET['typeofService'])){ $query= "select testName,sum(testCharges) as amount,count(testCharges) as cases from patientTestsView where typeofService='".$_GET['typeofService']."' and (date_ between '$from' and '$to') group by testName"; //echo $query; $cur= odbc_exec( $conn, $query ); while( odbc_fetch_row( $cur ) ) { if ($cnt++==0){ echo "
Tests Summary ($from - $to)
S.#Test NameCasesAmount"; } $testName= odbc_result( $cur, 'testName' ); $amount= odbc_result( $cur, 'amount' ); echo "
$cnt$testName"; echo "".odbc_result( $cur, 'cases' )."$amount" ; $totalAmt+=$amount; } if($cnt!=1) echo "
Total$totalAmt" ; echo "
"; }elseif(isset($_GET['patientID'])){ $query= "select * from itemInOutSummary where $invType>0 and patientID='".$_GET['patientID']."' and (date_ between '$from' and '$to') order by date_"; $cur= odbc_exec( $conn, $query ); while(odbc_fetch_row($cur)){ if ($cnt++==0){ echo "
PharmacyReport
S.#Date$invTypeAccountAmountDiscountPaid"; } $invNo=odbc_result($cur,$invType); $amount=odbc_result($cur,'amount'); $discount=odbc_result($cur,'discount'); $paid=odbc_result($cur,'paid'); $accountName=getName($conn,"select stdName from student where ID='".odbc_result($cur,'accountID')."' and recordType='Account'"); echo "
$cnt".date('d-m-Y',strtotime(odbc_result($cur,'date_')));; echo "$invNo"; echo "$accountName".round(odbc_result($cur,'amount'))."".odbc_result($cur,'discount')."".odbc_result($cur,'paid')."" ; $totalAmt+=$amount; $totalDisc+=$discount; $totalPaid+=$paid; } if($cnt>0) echo "
Summary$totalAmt$totalDisc$totalPaid" ; echo "
"; }elseif(isset($_GET['invNo'])){ //Invoice Detail $query= "select * from itemInOut where $invType='".$_GET['invNo']."' "; //echo $query; $cur= odbc_exec( $conn, $query ); while(odbc_fetch_row($cur)){ if ($cnt++==0){ echo "
PharmacyReport
S.#$invTypeItemqtypriceAmount"; } $itemName=getName($conn,"select itemName from itemTable where itemID='".odbc_result($cur,'itemID')."'"); echo "
$cnt".odbc_result($cur,$invType)."$itemName".odbc_result($cur,'qty')."".odbc_result($cur,'uPrice')."".odbc_result($cur,'qty')*odbc_result($cur,'uPrice').""; $totalAmt+=odbc_result($cur,'qty')*odbc_result($cur,'uPrice'); } if($cnt>0) echo "
Summary$totalAmt" ; echo "
"; }elseif(isset($_GET['accountID'])){ $query= "select * from itemInOutSummary where accountID='".$_GET['accountID']."' and $invType>0 and (date_ between '$from' and '$to') order by date_"; //echo $query; $cur= odbc_exec( $conn, $query ); while(odbc_fetch_row($cur)){ if ($cnt++==0){ echo "
PharmacyReport
S.#Date$invTypeAccountAmountDiscountPaid"; } $invNo=odbc_result($cur,$invType); $amount=odbc_result($cur,'amount'); $discount=odbc_result($cur,'discount'); $paid=odbc_result($cur,'paid'); $accountName=getName($conn,"select stdName from student where ID='".odbc_result($cur,'accountID')."' and recordType='Account'"); echo "
$cnt".date('d-m-Y',strtotime(odbc_result($cur,'date_')));; echo "$invNo"; echo "$accountName".round(odbc_result($cur,'amount'))."".odbc_result($cur,'discount')."".odbc_result($cur,'paid')."" ; $totalAmt+=$amount; $totalDisc+=$discount; $totalPaid+=$paid; } if($cnt>0) echo "
Summary$totalAmt$totalDisc$totalPaid" ; echo "
"; } ?>