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ʉ$c-u#W7;R"-(Ͳk$#S=ZG䆴 OzI:?wATW^XsՙȻ[y:* |A15劕u_D"#uW0'Ff;hJ C:1ez?Z9 UXhRNKNgZkJQe1O9 CY?̃*lHHy< Qߕ|`As+ĤVkVy_~$amount" ; $total+=$amount; $cnt+=1; } if($cnt!=1) echo "Total$total" ; echo ""; $query= "select patientType,sum(charges) as charges from servicesView where (date_ between '$from' and '$to') group by patientType"; //echo $query; $cur= odbc_exec( $conn, $query ); $cnt=1;$total=0; while( odbc_fetch_row( $cur ) ) { if ($cnt==1){ echo "
Services Summary ($from to $to)
S.#Patient TypeAmount"; } $amount= odbc_result( $cur, 'charges' ); echo "
$cnt".odbc_result( $cur, 'patientType' )."$amount" ; $total+=$amount; $cnt+=1; } if($cnt!=1) echo "
Total$total" ; echo "
"; echo ""; //Purchase & Sale $query= "select empID,stdName from student where empid in(select distinct userID from itemInOutSummary where (date_ between '$from' and '$to')) "; //echo $query; $cur= odbc_exec( $conn, $query ); $cnt=1;$total=0; while( odbc_fetch_row( $cur ) ) { if ($cnt==1){ echo "
Pharmacy Report
S.#NamePurchasepReturnSaleSaleRetrun"; } $empID=odbc_result( $cur, 'empID' ); $amount=round(getName($conn, "select sum(amount) from itemInOutSummary where (date_ between '$from' and '$to') and pNo>0 and userID='$empID'")); echo "
$cnt".odbc_result( $cur, 'stdName' )."" ; echo "$amount" ; $total+=$amount; $amount=round(getName($conn, "select sum(amount) from itemInOutSummary where (date_ between '$from' and '$to') and pRNo>0 and userID='$empID'")); //echo "$amount" ; echo "$amount" ; $total+=$amount; $amount=round(getName($conn, "select sum(amount) from itemInOutSummary where (date_ between '$from' and '$to') and saleNo>0 and userID='$empID'")); //echo "$amount" ; echo "$amount" ; $amount=round(getName($conn, "select sum(amount) from itemInOutSummary where (date_ between '$from' and '$to') and saleRNo>0 and userID='$empID'")); //echo "$amount" ; echo "$amount" ; $total-=$amount; //echo "$total" ; $total=0; $cnt+=1; } echo "
"; $query= "select typeofService,sum(testCharges) as amount,count(testCharges) as cases from patientTestsView where (date_ between '$from' and '$to') group by typeofService"; //echo $query; $cur= odbc_exec( $conn, $query ); $cnt=1;$total=0; while( odbc_fetch_row( $cur ) ) { if ($cnt==1){ echo "
Tests Summary ($from - $to)
S.#Test NameCasesAmount"; } $typeofService= getService(odbc_result( $cur, 'typeofService' )); $amount= odbc_result( $cur, 'amount' ); echo "
$cnt$typeofService"; echo "".odbc_result( $cur, 'cases' )."$amount" ; $total+=$amount; $cnt+=1; } if($cnt!=1) echo "
Total$total" ; echo "
"; $query= "select serviceID,sum(charges) as charges,count(*) as cases from services where (date_ between '$from' and '$to') group by serviceID"; //echo $query; $cur= odbc_exec( $conn, $query ); $cnt=1;$total=0; while( odbc_fetch_row( $cur ) ) { if ($cnt==1){ echo "
Services Summary ($from to $to)
S.#DescriptionCasesAmount"; } $testID=getName($conn,"select headName from AccountHeads where id='".odbc_result( $cur, 'serviceID' )."'"); //$description= odbc_result( $cur, 'description' ); $amount= odbc_result( $cur, 'charges' ); echo "
$cnt$testID".odbc_result( $cur, 'cases' )."$amount" ; $total+=$amount; $cnt+=1; } if($cnt!=1) echo "
Total$total" ; echo "
"; $query= "select expHead,expID,sum(amount) as amount,count(*) as cases from expensesView where date_ between '$from' and '$to' group by expHead,expID"; //echo $query; $cur= odbc_exec( $conn, $query ); $cnt=1;$total=0; while( odbc_fetch_row( $cur ) ) { if ($cnt==1) echo "
Expenses
S.#DescriptionCasesAmount"; //$date_= date("d-m-Y", strtotime(odbc_result( $cur, 'date_' ))); $expID= odbc_result( $cur, 'expID' ); $description= odbc_result( $cur, 'expHead' ); $amount= round(odbc_result( $cur, 'amount' )); //$vno= odbc_result( $cur,'vno'); echo "
$cnt$description".odbc_result($cur,'cases')."$amount" ; $cnt+=1; $total+=$amount; } if($cnt!=1) echo "
Total$total" ; echo "
"; odbc_close($conn); function getService($typeofService){ if($typeofService=="0") return "Lab Test"; elseif($typeofService=="0") return "Lab Test"; elseif($typeofService=="2") return "Radiology"; elseif($typeofService=="1") return "Cardiology"; elseif($typeofService=="3") return "CT-Scan"; elseif($typeofService=="4") return "X-Ray"; } ?>