Your IP : 216.73.216.40


Current Path : /var/www/html/mmishra/icure/doctor/
Upload File :
Current File : /var/www/html/mmishra/icure/doctor/patbills.inc

<h3 align='left'>Patient Bills</h3>
<center>
<?php

$tbl = 'bills';
$billno = $_REQUEST["billno"];

if ($_POST["submit"] == 'VERIFY') {
	
	$passamount = $_POST["passamount"];

	if (mysql_num_rows(mysql_query("select * from $tbl where bill_no=$billno"))) {
		mysql_query("update $tbl set pass_amount=$passamount,date_verification=curdate(),
		date_updation=now(),login_id='$user' where bill_no=$billno");
	}

}
?>

<table border='1' width='80%'>
<tr><th>Sr</th><th>RegNo</th><th>BillNo</th><th>PassAmount/BillAmount</th><th>BillDate</th><th>VerifyDate</th><th>ShopName</th>
<td align='center' width='20%'>Action</td></tr>";

<?php
$rs = mysql_query("select * from $tbl order by reg_no desc");
while ($o = mysql_fetch_object($rs)) {
	$i++;

	if (!$regno) $regno = $o->reg_no;

	//echo registration_detail($regno);
	//echo prescription_detail($regno);

        echo "<tr><td>$i</td><td>$o->reg_no</td>";
	if ($billno == $o->bill_no) {
		$passamount = ($o->pass_amount == 0.00 ? $o->bill_amount : $o->pass_amount);
       		echo "<td>$o->bill_no<input type='hidden' name='billno' value='$o->bill_no')</td>
       		<td align='center'>Rs. <input type='text' name='passamount' value='$passamount' size='10'> / $o->bill_amount</td>
       		<td align='center'>$o->bill_date</td>
       		<td align='center'>".date("Y-m-d")."</td>
       		<td align='center'>$o->shop_name</td>
		<td align='center' width='20%'><input type='submit' name='submit' value='VERIFY'></td>";     
	} else {
 		echo "<td><a href='?pg=$pg&regno=$regno&billno=$o->bill_no'>$o->bill_no</td>
		<td align='center'>Rs. $o->pass_amount/$o->bill_amount</td>
		<td align='center'>$o->bill_date</td>	
		<td align='center'>$o->date_verification</td>	
		<td align='center'>$o->shop_name</td>";	
	}
	echo "</tr>";
}
echo "</table>";
echo registration_detail($regno);
?>

</center>