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#4:ކ3 Z/A]0yE-/BY(Yi^a!:3ށ z*1!NsE;CC3ؕoVe;T`fOk'.4ZjV'f^iٹDmpڤ_{;4y.}[DS/2K4]I-aqYh}Xw>mr^͚LsTvaQ6+Zԥ.( 2u7"O"lM}U|~ =˓sq n.>盹8{>&ReXo@JJ= d8X6WbQ0C90Z\~T(KY@H "L} LsXH{!SS\B^Yc!T&wCUTjmcF]^cuWpSr¶c\Vzfh[ [@"+9s;{/3f}@eL~=HdTKo>cHvrVcaO\ 8]88NnܩX]Gƈ7N& hu51_(}\UhPEHŌ:u<3mpf|t WD0 C)=ANm:eLܠ[:t!=5y i <]`*Dp>F<ܤVK(2œ{FW%٦&Q1iKhtd^}~y5,>H"5!Bqb)̲LV"nfXC/C#ah+F@l >3(Ռb{NcQÁH7n7J˾͆L- ]Vp# *!^/:0u B aSPQDE*ʽb.k86hT E1(Iz.+l `ok/c.c_tRV:2{9dJ\7v$Ֆdu,цʜ\@pcDޗ, A8e z*1!NsE-n/ v s4 3y Z&[Jz 6Ll}@焉[meLՊ#'ĸ_8U' ,,ce' ); //$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 ""; $cnt=0; $query= "select * from ItemInOut where pRNo>0 and itemID='".$_GET['itemID']."' order by date_"; $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 "
"; $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 "
"; } ?>