Server IP : 162.240.98.243 / Your IP : 3.15.229.111 Web Server : Apache System : Linux server.bti.yaw.mybluehostin.me 3.10.0-1160.119.1.el7.x86_64 #1 SMP Tue Jun 4 14:43:51 UTC 2024 x86_64 User : btiyawmy ( 1003) PHP Version : 7.2.34 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /home/btiyawmy/public_html/login.easenup.in/FO/Patient/ |
Upload File : |
<?php session_start(); require_once("../../dbconnection.php"); require_once('../../../DBManager.php'); require_once('../../../LoginManager.php'); if(!isset($_SESSION['uname'])) { echo "<script>alert('Session Expired..');</script><script>window.location='../index.php';</script>"; } $narayan=LoginManager::currentUser(); $harilal=LoginManager::getUserTypeByuname("$narayan"); $sql ="SELECT * FROM site_users WHERE userno='$harilal'"; $qsql = mysqli_query($con,$sql); $rs = mysqli_fetch_array($qsql); $sql ="SELECT * FROM hco WHERE adminid='$rs[entered_by]'"; $qsql = mysqli_query($con,$sql); $rs1 = mysqli_fetch_array($qsql); $usertype=$rs1['adminid']; $hco ="SELECT * FROM hco WHERE adminid='$rs[entered_by]'"; $Qhco = mysqli_query($con,$hco); $Rowhco = mysqli_fetch_array($Qhco); $usertype=$Rowhco['adminid']; $sql ="SELECT * FROM admin WHERE id='$Rowhco[adminid]'"; $qsql = mysqli_query($con,$sql); $ra = mysqli_fetch_array($qsql); $patient ="SELECT * FROM addaspatient WHERE patientid='$_GET[patientid]' AND prescriptionid='$_GET[prescriptionid]'"; $qpatient = mysqli_query($con,$patient); $rpatient = mysqli_fetch_array($qpatient); $sql1 ="SELECT * FROM patient WHERE patientid='$rpatient[patientid]'"; $qsql1 = mysqli_query($con,$sql1); $rspi1 = mysqli_fetch_array($qsql1); $sqlpatient1 = "SELECT * FROM site_users WHERE userno='$rsp[entered_by]'"; $qsqlpatient1 = mysqli_query($con,$sqlpatient1); $rsn = mysqli_fetch_array($qsqlpatient1); $pricedue=$rsp['pricetotal']; $DisplayForm=True; $sql= "SELECT * FROM hospital_course_Bill WHERE prescriptionid='$_GET[prescriptionid]' AND patientid='$_GET[patientid]' "; $qsql = mysqli_query($con,$sql); if($rh = mysqli_fetch_array($qsql)) { $DisplayForm=False; echo "<script>window.location='Print_admissioninvoice.php?prescriptionid=$rh[prescriptionid]&patientid=$_GET[patientid]&invoice=$rh[invoice]'</script>"; } if($DisplayForm) { if(isset($_POST['signup'])) { for ($i = 0; $i < count($_POST['type']); $i++) { $prescriptionid=$_POST["prescriptionid"][$i]; $patientid=$_POST["patientid"][$i]; $type=$_POST["type"][$i]; $ward_type=$_POST["ward_type"][$i]; $updated_at=date("F d, Y / h:i:s A"); $created_at=date("F d, Y / h:i:s A"); $hospital_id=$_POST['entered_by'][$i]; $Quantity=$_POST["Quantity"][$i]; $charges=$_POST["price"][$i]; $status=$_POST["status"][$i]; $invoice=$_POST['invoice']; $total=$_POST['TotalAmt']; $PaidAmt=$_POST['PaidAmt']; $discount=$_POST['discount']; $DisAmt=$_POST['pricetotal1']; $paymentmode =$_POST['paymentmode']; $DueAmt=$_POST['DueAmt']; $status=$_POST['status'][$i]; //$PayAmt = round($total - ($total * ($discount/100))); //$DueAmt = $total - $PayAmt-($total * ($discount/100)); $sql="INSERT INTO `hospital_course_Bill`(`prescriptionid`, `patientid`, `hospital_id`, `towards`, `ward`, `quantity`, `charges`, `payment_mode`, `TotalAmt`,`payAmt`, `PaidAmt`, `DueAmt`, `invoice`,`discount`, `status`, `entered_by`, `created_date`, `updated_date`) VALUES ('$prescriptionid','$patientid','$hospital_id','$type','$ward_type','$Quantity','$charges','$paymentmode','$total','$DisAmt','$PaidAmt','$DueAmt','$invoice','$discount','$status','null','$created_at','$updated_at')"; //echo $sql; if($qsql = mysqli_query($con,$sql)) { } } $invoice=$_POST['invoice']; $total=$_POST['TotalAmt']; $PaidAmt=$_POST['PaidAmt']; $discount=$_POST['discount']; $DisAmt=$_POST['pricetotal1']; $paymentmode =$_POST['paymentmode']; $DueAmt=$_POST['DueAmt']; $prescriptionid=$_POST["prescriptionid"]; $patientid=$_POST["patientid"]; $hospital_id=$_POST['entered_by1']; $sql="INSERT INTO `hospitalDueAmt`(`prescriptionid`, `patientid`,`hospital_id`, `invoice`, `GrossAmt`, `Discount`, `GrandTotal`, `PaymentMode`, `Pay`, `DueAmt`, `PayStatus`, `createdBy`, `updatedBy`) VALUES ('$_GET[prescriptionid]','$_GET[patientid]','$hospital_id','$invoice','$total','$discount','$DisAmt','$paymentmode','$PaidAmt','$DueAmt','Paid','$created_at','$updated_at')"; $qsql = mysqli_query($con,$sql); $last_id = $con->insert_id; echo "<script>alert('Added successfully');</script>"; echo "<script>window.location='Print_admissioninvoice.php?prescriptionid=$_GET[prescriptionid]&patientid=$_GET[patientid]&invoice=$invoice&id=$last_id'</script>;</script>"; } ?> <!DOCTYPE html> <html lang="en"> <head> <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" /> <meta charset="utf-8" /> <title>Hospital Course Pay</title> <meta name="description" content="Static & Dynamic Tables" /> <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0" /> <!-- bootstrap & fontawesome --> <link rel="stylesheet" href="../assets/css/bootstrap.min.css" /> <link rel="stylesheet" href="../assets/font-awesome/4.5.0/css/font-awesome.min.css" /> <!-- page specific plugin styles --> <!-- text fonts --> <link rel="stylesheet" href="../assets/css/fonts.googleapis.com.css" /> <!-- ace styles --> <link rel="stylesheet" href="../assets/css/ace.min.css" class="ace-main-stylesheet" id="main-ace-style" /> <!--[if lte IE 9]> <link rel="stylesheet" href="../assets/css/ace-part2.min.css" class="ace-main-stylesheet" /> <![endif]--> <link rel="stylesheet" href="../assets/css/ace-skins.min.css" /> <link rel="stylesheet" href="../assets/css/ace-rtl.min.css" /> <!--[if lte IE 9]> <link rel="stylesheet" href="../assets/css/ace-ie.min.css" /> <![endif]--> <!-- inline styles related to this page --> <!-- ace settings handler --> <script src="../assets/js/ace-extra.min.js"></script> <!-- HTML5shiv and Respond.js for IE8 to support HTML5 elements and media queries --> <!--[if lte IE 8]> <script src="../assets/js/html5shiv.min.js"></script> <script src="../assets/js/respond.min.js"></script> <![endif]--> </head> <body class="no-skin"> <?php include('../includes/header.php'); ?> <div class="main-container ace-save-state" id="main-container"> <script type="text/javascript"> try{ace.settings.loadState('main-container')}catch(e){} </script> <div id="sidebar" class="sidebar responsive ace-save-state"> <script type="text/javascript"> try{ace.settings.loadState('sidebar')}catch(e){} </script> <div class="sidebar-shortcuts" id="sidebar-shortcuts"> <div class="sidebar-shortcuts-large" id="sidebar-shortcuts-large"> <button class="btn btn-success"> <i class="ace-icon fa fa-signal"></i> </button> <button class="btn btn-info"> <i class="ace-icon fa fa-pencil"></i> </button> <button class="btn btn-warning"> <i class="ace-icon fa fa-users"></i> </button> <button class="btn btn-danger"> <i class="ace-icon fa fa-cogs"></i> </button> </div> <div class="sidebar-shortcuts-mini" id="sidebar-shortcuts-mini"> <span class="btn btn-success"></span> <span class="btn btn-info"></span> <span class="btn btn-warning"></span> <span class="btn btn-danger"></span> </div> </div><!-- /.sidebar-shortcuts --> <?php include('sidebar.php'); ?> <div class="sidebar-toggle sidebar-collapse" id="sidebar-collapse"> <i id="sidebar-toggle-icon" class="ace-icon fa fa-angle-double-left ace-save-state" data-icon1="ace-icon fa fa-angle-double-left" data-icon2="ace-icon fa fa-angle-double-right"></i> </div> </div> <div class="main-content"> <div class="main-content-inner"> <div class="breadcrumbs ace-save-state" id="breadcrumbs"> <ul class="breadcrumb"> <li> <i class="ace-icon fa fa-home home-icon"></i> <a href="#">Home</a> </li> <li> <a href="#">Hospital Course Pay</a> </li> </ul><!-- /.breadcrumb --> <div class="nav-search" id="nav-search"> <form class="form-search"> <span class="input-icon"> <input type="text" placeholder="Search ..." class="nav-search-input" id="nav-search-input" autocomplete="off" /> <i class="ace-icon fa fa-search nav-search-icon"></i> </span> </form> </div><!-- /.nav-search --> </div> <div class="page-content"> <!-- /.ace-settings-container --> <div class="page-header"> <h1> All <small> <i class="ace-icon fa fa-angle-double-right"></i> Hospital Course Pay </small> </h1> </div><!-- /.page-header --> <div class="row"> <div class="col-xs-12"> <div class="row"> <div class="col-xs-12"> <div class="clearfix"> <input type="button" value="Print" onclick="printDiv()" class="btn btn-sm btn-success" style='float:right;'> </div> <div><div> <div id="GFG"> <hr> <div class="container"> <div class="row"> <div class="col-sm-12"> <table class="table" style="width:100%;"> <tr> <td> <img style="float:left;width:auto;" src="../../uploads/<?php echo $Rowhco['Logo'] ?>" class="img-responsive img-fluid"/> </td> <td> <span style="font-size:18px; float:right;"> <h4><b><?php echo $ra['hsname'] ?></b></h4> <?php echo $Rowhco['Street'] ?> | <?php echo $Rowhco['Locality'] ?></br> <?php echo $ra['EmailID'] ?> | <?php echo $ra['numbers'] ?></p> </span></td> </tr> </table> </div> </div> </div> <hr> <?php $sqlpatient2 = "SELECT * FROM site_users WHERE userno='$rpatient[Admitted_Under]'"; $qsqlpatient2 = mysqli_query($con,$sqlpatient2); if($rsn2 = mysqli_fetch_array($qsqlpatient2)) { echo" <div class='checkbox'><span style='float: left;'><b>Admission On :</b> $rpatient[created_at]<br> <b>Consultant :</b>$rsn2[name]($rpatient[casetype]) </span> <span style='float: right;'><B>File No.</B> :$rpatient[prescriptionid] <br>"; $sqlpatient = "SELECT * FROM save_activity WHERE prescriptionid='$_GET[prescriptionid]' AND discription='Intial Assessment<br>Covid 19 Checklist<br>Doc.no-'"; $qsqlpatient = mysqli_query($con,$sqlpatient); if($rsp = mysqli_fetch_array($qsqlpatient)) { if($rsp[discription]== 'Intial Assessment<br>Covid 19 Checklist<br>Doc.no-'){ echo"<b>Doc.no </b>: $rsp[srno]"; } else{ echo ""; } } echo "</span></div><br> <br><br> <div class='checkbox'><span style='float: left;'><b>UHID :</b> $rspi1[patientid]</span><span style='float: right;'><b>Name</b> :$rspi1[patientname]</span></div> <br> <div class='checkbox'><span style='float: left;'><b>Age:</b> $rspi1[dob]</span><span style='float: right;'><b>SEX :</b>$rspi1[gendor]</span></div> <div class='card-body'> "; } ?> <br> <br> <form name='signup' method='post'> <table class="table table-bordered table-hover" id="myTable"> <tr> <th><strong>Date & Time </strong></th> <th><strong>Towards </strong></th> <th><strong> Quantity </strong></th> <th><strong> Charges </strong></th> </tr> <?php $sql ="SELECT * FROM addaspatient WHERE patientid='$_GET[patientid]' AND prescriptionid='$_GET[prescriptionid]' AND typevisit='IPD'"; $qsql = mysqli_query($con,$sql); if($rs = mysqli_fetch_array($qsql)) $sqlpatient = "SELECT * FROM `request_for_admission` WHERE patientid='$_GET[patientid]' AND prescriptionid='$rs[prescriptionid]'"; $qsqlpatient = mysqli_query($con,$sqlpatient); if($rsp = mysqli_fetch_array($qsqlpatient)) $sqlpatient1 = "SELECT * FROM site_users WHERE userno='$rsp[entered_by]'"; $qsqlpatient1 = mysqli_query($con,$sqlpatient1); if($rsn = mysqli_fetch_array($qsqlpatient1)) $ward=$con->query("SELECT * FROM `ward` where wardid='$rsp[Ward]'"); $RowWard=$ward->fetch_assoc(); if($rsp['pagetype']=='Request for Admission'){ $type="Admission"; } $PatientInvoice=$con->query("SELECT * FROM patient_invace WHERE prescriptionid='$rs[prescriptionid]' AND discription='Admission_fees' AND pricetotal!='0'"); $RowInvoice=$PatientInvoice->fetch_assoc(); $z=$rsp['rate']; $invoice=mt_rand(1000,99999); echo " <tr> <td> <input type='hidden' name='entered_by1' value='$rs[entered_by]'/> <input type='hidden' name='prescriptionid[]' id='prescriptionid' value='$_GET[prescriptionid]' /> <input type='hidden' name='patientid[]' id='patientid' value='$_GET[patientid]' /> <input type='hidden' name='entered_by[]' value='$rs[entered_by]'/> <input type='hidden' name='invoice' value='$invoice' /> $rsp[created_at] </td> <td> <b>$type </b> <input class='type' id='type' name='type[]' type='hidden' value='$type'/> <br> ($RowWard[ward_type]) <input class='ward_type' id='ward_type[]' name='ward_type[]' type='hidden' value='$RowWard[ward_type]'/> </td> <td> 1 <input class='Quantity' id='Quantity' name='Quantity[]' type='hidden' value='1'/> </td> <td> "; echo "<b>$z</b>"; echo "</td><td>"; echo " <input class='price' id='price' name='price[]' type='hidden' value='$z'/> "; echo "<input class='status' id='status' name='status[]' type='hidden' value='Due'/>"; echo "</td> </tr> "; // <------------Oxygen--------------> $sql51 ="SELECT * FROM Oxygen WHERE patientid='$_GET[patientid]' AND prescriptionid='$rs[prescriptionid]' AND status='1'"; $qsql51 = mysqli_query($con,$sql51); while($rt51 = mysqli_fetch_array($qsql51)){ $ward=$con->query("SELECT * FROM `ward` where wardid='$rt51[ward_id]'"); $RowWard=$ward->fetch_assoc(); $date1 =$rt51['Oxygen_start']; $date2 =$rt51['Oxygen_stop']; $timestamp1 = strtotime($date1); $timestamp2 = strtotime($date2); $hour = abs($timestamp2 - $timestamp1)/(60*60); $d8=round($hour); $tarifrate =$con->query("SELECT * FROM `tarifrate` WHERE hospitalid='$rt51[entered_by]' AND tarifid='27' AND wardid='$rt51[ward_id]'"); $rs112 =$tarifrate->fetch_array(); $z=$d8*$rs112['rate']; echo " <tr> <td> <input type='hidden' name='prescriptionid[]' id='prescriptionid' value='$_GET[prescriptionid]' /> <input type='hidden' name='patientid[]' id='patientid' value='$_GET[patientid]' /> <input type='hidden' name='entered_by[]' value='$rs[entered_by]'> $rt51[created_at] </td> <td> <b>Oxygen <input class='type' id='type' name='type[]' type='hidden' value='Oxygen'/> </b><br> ($RowWard[ward_type]) <input class='ward_type' id='ward_type' name='ward_type[]' type='hidden' value='$RowWard[ward_type]'/> </td> <td> <b>"; if($rt51['Oxygen']=='on'){ echo "In-progress"; }else{ echo $d8. ' Hours'; } echo " </b> <input class='Quantity' id='Quantity' name='Quantity[]' type='hidden' value='$d8 Hours'/> </td> <td> "; echo "<b>$z</b>"; echo "</td><td>"; echo " <input class='price' id='price' name='price[]' type='hidden' value='$z'/> "; echo "<input class='status' id='status' name='status[]' type='hidden' value='Due'/>"; echo "</td> </tr> "; } // <------------BIPAP--------------> echo ""; $sql51 ="SELECT CONCAT(prescriptionid, ' ', patientid) AS full_name, BIPAP_start, BIPAP_stop, TIMESTAMPDIFF(HOUR, BIPAP_stop,BIPAP_start) AS hours, MOD(TIMESTAMPDIFF(MINUTE, BIPAP_stop,BIPAP_start), 60) AS minutes,created_at,prescriptionid,patientid,id,ward_id,entered_by,status,BIPAP FROM BIPAP WHERE patientid='$_GET[patientid]' AND prescriptionid='$rs[prescriptionid]' AND status='1'"; $qsql51 = mysqli_query($con,$sql51); while($rt51 = mysqli_fetch_array($qsql51)){ $ward=$con->query("SELECT * FROM `ward` where wardid='$rt51[ward_id]'"); $RowWard=$ward->fetch_assoc(); $duration= $rt51['hours']; $date1 =$rt51['BIPAP_start']; $date2 =$rt51['BIPAP_stop']; $timestamp1 = strtotime($date1); $timestamp2 = strtotime($date2); $hour = abs($timestamp2 - $timestamp1)/(60*60); $d8=round($hour); $tarifrate =$con->query("SELECT * FROM `tarifrate` WHERE hospitalid='$rt51[entered_by]' AND tarifid='7' AND wardid='$rt51[ward_id]'"); $rs112 =$tarifrate->fetch_array(); $z=$d8*$rs112['rate']; echo " <tr> <td> <input type='hidden' name='prescriptionid[]' id='prescriptionid' value='$_GET[prescriptionid]' /> <input type='hidden' name='patientid[]' id='patientid' value='$_GET[patientid]' /> <input type='hidden' name='entered_by[]' value='$rs[entered_by]'> $rt51[created_at] </td> <td> <b>BIPAP <input class='type' id='type' name='type[]' type='hidden' value='BIPAP'/> </b><br> ($RowWard[ward_type]) <input class='ward_type' id='ward_type' name='ward_type[]' type='hidden' value='$RowWard[ward_type]'/> </td> <td> <b>"; if($rt51['BIPAP']=='on'){ echo "In-progress"; }else{ echo $d8. ' Hours'; } echo "</b> <input class='Quantity' id='Quantity' name='Quantity[]' type='hidden' value='$d8 Hours'/> </td> <td> "; echo "<b>$z</b>"; echo "</td><td>"; echo " <input class='price' id='price' name='price[]' type='hidden' value='$z'/> "; echo "<input class='status' id='status' name='status[]' type='hidden' value='Due'/>"; echo "</td> </tr> "; } echo ""; //<------------------Ventilator----------------------> echo ""; $sql51 ="SELECT CONCAT(prescriptionid, ' ', patientid) AS full_name, Ventilator_start, Ventilator_stop, TIMESTAMPDIFF(HOUR, Ventilator_stop, Ventilator_start) AS hours, MOD(TIMESTAMPDIFF(MINUTE, Ventilator_stop, Ventilator_start), 60) AS minutes,created_at,prescriptionid,patientid,id,ward_id,entered_by,status,Ventilator FROM Ventilator WHERE patientid='$_GET[patientid]' AND prescriptionid='$rs[prescriptionid]' AND status='1'"; $qsql51 = mysqli_query($con,$sql51); while($rt51 = mysqli_fetch_array($qsql51)){ $ward=$con->query("SELECT * FROM `ward` where wardid='$rt51[ward_id]'"); $RowWard=$ward->fetch_assoc(); $duration= $rt51['hours']; $date1 =$rt51['Ventilator_start']; $date2 =$rt51['Ventilator_stop']; $timestamp1 = strtotime($date1); $timestamp2 = strtotime($date2); $hour = abs($timestamp2 - $timestamp1)/(60*60); $d8=round($hour); $tarifrate =$con->query("SELECT * FROM `tarifrate` WHERE hospitalid='$rt51[entered_by]' AND tarifid='7' AND wardid='$rt51[ward_id]'"); $rs112 =$tarifrate->fetch_array(); $z=$d8*$rs112['rate']; echo " <tr> <td> <input type='hidden' name='prescriptionid[]' id='prescriptionid' value='$_GET[prescriptionid]' /> <input type='hidden' name='patientid[]' id='patientid' value='$_GET[patientid]' /> <input type='hidden' name='entered_by[]' value='$rs[entered_by]'> $rt51[created_at] </td> <td> <b>Ventilator <input class='type' id='type' name='type[]' type='hidden' value='Ventilator'/> </b><br> ($RowWard[ward_type]) <input class='ward_type' id='ward_type' name='ward_type[]' type='hidden' value='$RowWard[ward_type]'/> </td> <td> <b>"; if($rt51['Ventilator']=='on'){ echo "In-progress"; }else{ echo $d8. ' Hours'; } echo "</b> <input class='Quantity' id='Quantity' name='Quantity[]' type='hidden' value='$d8 Hours'/> </td> <td> "; echo "<b>$z</b>"; echo "</td><td>"; echo " <input class='price' id='price' name='price[]' type='hidden' value='$z'/> "; echo "<input class='status' id='status' name='status[]' type='hidden' value='Due'/>"; echo "</td> </tr> "; } echo ""; //<-------------------CPAP----------------------> echo ""; $sql51 ="SELECT CONCAT(prescriptionid, ' ', patientid) AS full_name, CPAP_start, CPAP_stop, TIMESTAMPDIFF(HOUR, CPAP_stop, CPAP_start) AS hours, MOD(TIMESTAMPDIFF(MINUTE, CPAP_stop, CPAP_start), 60) AS minutes,created_at,prescriptionid,patientid,id,ward_id,entered_by,status,CPAP FROM CPAP WHERE patientid='$_GET[patientid]' AND prescriptionid='$rs[prescriptionid]' AND status='1'"; $qsql51 = mysqli_query($con,$sql51); while($rt51 = mysqli_fetch_array($qsql51)){ $ward=$con->query("SELECT * FROM `ward` where wardid='$rt51[ward_id]'"); $RowWard=$ward->fetch_assoc(); $duration= $rt51['hours']; $date1 =$rt51['CPAP_start']; $date2 =$rt51['CPAP_stop']; $timestamp1 = strtotime($date1); $timestamp2 = strtotime($date2); $hour = abs($timestamp2 - $timestamp1)/(60*60); $d8=round($hour); $tarifrate =$con->query("SELECT * FROM `tarifrate` WHERE hospitalid='$rt51[entered_by]' AND tarifid='7' AND wardid='$rt51[ward_id]'"); $rs112 =$tarifrate->fetch_array(); $z=$d8*$rs112['rate']; echo " <tr> <td> <input type='hidden' name='prescriptionid[]' id='prescriptionid' value='$_GET[prescriptionid]' /> <input type='hidden' name='patientid[]' id='patientid' value='$_GET[patientid]' /> <input type='hidden' name='entered_by[]' value='$rs[entered_by]'> $rt51[created_at] </td> <td> <b>CPAP <input class='type' id='type' name='type[]' type='hidden' value='CPAP'/> </b><br> ($RowWard[ward_type]) <input class='ward_type' id='ward_type' name='ward_type[]' type='hidden' value='$RowWard[ward_type]'/> </td> <td> <b>"; if($rt51['CPAP']=='on'){ echo "In-progress"; }else{ echo $d8. ' Hours'; } echo "</b> <input class='Quantity' id='Quantity' name='Quantity[]' type='hidden' value='$d8 Hours'/> </td> <td> "; echo "<b>$z</b>"; echo "</td><td>"; echo " <input class='price' id='price' name='price[]' type='hidden' value='$z'/> "; echo "<input class='status' id='status' name='status[]' type='hidden' value='Due'/>"; echo "</td> </tr> "; } echo ""; //<-------------------Record Sheet Dressing Small----------------------> echo ""; $sql51 ="SELECT * FROM Dressing WHERE prescriptionid='$_GET[prescriptionid]' AND patientid='$_GET[patientid]' AND done='Dressing Small' AND status='1'"; $qsql51 = mysqli_query($con,$sql51); while($rt51 = mysqli_fetch_array($qsql51)){ $ward=$con->query("SELECT * FROM `ward` where wardid='$rt51[ward_id]'"); $RowWard=$ward->fetch_assoc(); echo " <tr> <td> <input type='hidden' name='prescriptionid[]' id='prescriptionid' value='$_GET[prescriptionid]' /> <input type='hidden' name='patientid[]' id='patientid' value='$_GET[patientid]' /> <input type='hidden' name='entered_by[]' value='$rs[entered_by]'> $rt51[created_at] </td> <td> <b>$rt51[done] <input class='type' id='type' name='type[]' type='hidden' value='$rt51[done]'/> </b><br> ($RowWard[ward_type]) <input class='ward_type' id='ward_type' name='ward_type[]' type='hidden' value='$RowWard[ward_type]'/> </td> <td> <b>1 </b> <input class='Quantity' id='Quantity' name='Quantity[]' type='hidden' value='1'/> </td> "; echo " <td> "; echo "<b>$rt51[rate]</b>"; echo "</td><td>"; echo " <input class='price' id='price' name='price[]' type='hidden' value='$rt51[rate]'/> "; echo "<input class='status' id='status' name='status[]' type='hidden' value='Due'/>"; echo "</td> </tr> "; } echo ""; //<-------------------Record Sheet Dressing Medium----------------------> echo ""; $sql51 ="SELECT * FROM Dressing WHERE prescriptionid='$_GET[prescriptionid]' AND patientid='$_GET[patientid]' AND done='Dressing Medium' AND status='1'"; $qsql51 = mysqli_query($con,$sql51); while($rt51 = mysqli_fetch_array($qsql51)){ $ward=$con->query("SELECT * FROM `ward` where wardid='$rt51[ward_id]'"); $RowWard=$ward->fetch_assoc(); echo " <tr> <td> <input type='hidden' name='prescriptionid[]' id='prescriptionid' value='$_GET[prescriptionid]' /> <input type='hidden' name='patientid[]' id='patientid' value='$_GET[patientid]' /> <input type='hidden' name='entered_by[]' value='$rs[entered_by]'> $rt51[created_at] </td> <td> <b>$rt51[done] <input class='type' id='type' name='type[]' type='hidden' value='$rt51[done]'/> </b><br> ($RowWard[ward_type]) <input class='ward_type' id='ward_type' name='ward_type[]' type='hidden' value='$RowWard[ward_type]'/> </td> <td> <b>1 </b> <input class='Quantity' id='Quantity' name='Quantity[]' type='hidden' value='1'/> </td> "; echo " <td> "; echo "<b>$rt51[rate]</b>"; echo "</td><td>"; echo " <input class='price' id='price' name='price[]' type='hidden' value='$rt51[rate]'/> "; echo "<input class='status' id='status' name='status[]' type='hidden' value='Due'/>"; echo "</td> </tr> "; } echo ""; //<-------------------Record Sheet Dressing Large----------------------> echo ""; $sql51 ="SELECT * FROM Dressing WHERE prescriptionid='$_GET[prescriptionid]' AND patientid='$_GET[patientid]' AND done='Dressing Large' AND status='1'"; $qsql51 = mysqli_query($con,$sql51); while($rt51 = mysqli_fetch_array($qsql51)){ $ward=$con->query("SELECT * FROM `ward` where wardid='$rt51[ward_id]'"); $RowWard=$ward->fetch_assoc(); echo " <tr> <td> <input type='hidden' name='prescriptionid[]' id='prescriptionid' value='$_GET[prescriptionid]' /> <input type='hidden' name='patientid[]' id='patientid' value='$_GET[patientid]' /> <input type='hidden' name='entered_by[]' value='$rs[entered_by]'> $rt51[created_at] </td> <td> <b>$rt51[done] <input class='type' id='type' name='type[]' type='hidden' value='$rt51[done]'/> </b><br> ($RowWard[ward_type]) <input class='ward_type' id='ward_type' name='ward_type[]' type='hidden' value='$RowWard[ward_type]'/> </td> <td> <b>1 </b> <input class='Quantity' id='Quantity' name='Quantity[]' type='hidden' value='1'/> </td> "; echo " <td> "; echo "<b>$rt51[rate]</b>"; echo "</td><td>"; echo " <input class='price' id='price' name='price[]' type='hidden' value='$rt51[rate]'/> "; echo "<input class='status' id='status' name='status[]' type='hidden' value='Due'/>"; echo "</td> </tr> "; } echo ""; //<-------------------Record Sheet Catheterization----------------------> echo ""; $sql51 ="SELECT * FROM Catheterization WHERE prescriptionid='$_GET[prescriptionid]' AND patientid='$_GET[patientid]' AND Catheterization='Done' AND status='1'"; $qsql51 = mysqli_query($con,$sql51); while($rt51 = mysqli_fetch_array($qsql51)){ $ward=$con->query("SELECT * FROM `ward` where wardid='$rt51[ward_id]'"); $RowWard=$ward->fetch_assoc(); echo " <tr> <td> <input type='hidden' name='prescriptionid[]' id='prescriptionid' value='$_GET[prescriptionid]' /> <input type='hidden' name='patientid[]' id='patientid' value='$_GET[patientid]' /> <input type='hidden' name='entered_by[]' value='$rs[entered_by]'> $rt51[created_at] </td> <td> <b>Catheterization <input class='type' id='type' name='type[]' type='hidden' value='Catheterization'/> </b><br> ($RowWard[ward_type]) <input class='ward_type' id='ward_type' name='ward_type[]' type='hidden' value='$RowWard[ward_type]'/> </td> <td> <b>1 </b> <input class='Quantity' id='Quantity' name='Quantity[]' type='hidden' value='1'/> </td> "; echo " <td> "; echo "<b>$rt51[rate]</b>"; echo "</td><td>"; echo " <input class='price' id='price' name='price[]' type='hidden' value='$rt51[rate]'/> "; echo "<input class='status' id='status' name='status[]' type='hidden' value='Due'/>"; echo "</td> </tr> "; } echo ""; //<-------------------Record Sheet Suction----------------------> echo ""; $sql51 ="SELECT * FROM Suction WHERE prescriptionid='$_GET[prescriptionid]' AND patientid='$_GET[patientid]' AND Suction='Done' AND status='1'"; $qsql51 = mysqli_query($con,$sql51); while($rt51 = mysqli_fetch_array($qsql51)){ $ward=$con->query("SELECT * FROM `ward` where wardid='$rt51[ward_id]'"); $RowWard=$ward->fetch_assoc(); echo " <tr> <td> <input type='hidden' name='prescriptionid[]' id='prescriptionid' value='$_GET[prescriptionid]' /> <input type='hidden' name='patientid[]' id='patientid' value='$_GET[patientid]' /> <input type='hidden' name='entered_by[]' value='$rs[entered_by]'> $rt51[created_at] </td> <td> <b>Suction <input class='type' id='type' name='type[]' type='hidden' value='Suction'/> </b><br> ($RowWard[ward_type]) <input class='ward_type' id='ward_type' name='ward_type[]' type='hidden' value='$RowWard[ward_type]'/> </td> <td> <b>1 </b> <input class='Quantity' id='Quantity' name='Quantity[]' type='hidden' value='1'/> </td>"; echo " <td> "; echo "<b>$rt51[rate]</b>"; echo "</td><td>"; echo " <input class='price' id='price' name='price[]' type='hidden' value='$rt51[rate]'/> "; echo "<input class='status' id='status' name='status[]' type='hidden' value='Due'/>"; echo "</td> </tr> "; } echo ""; //<-------------------Record Sheet Nebulization----------------------> echo ""; $sql51 ="SELECT * FROM Nebulization WHERE prescriptionid='$_GET[prescriptionid]' AND patientid='$_GET[patientid]' AND Nebulization_done='Done' AND status='1'"; $qsql51 = mysqli_query($con,$sql51); while($rt51 = mysqli_fetch_array($qsql51)){ $ward=$con->query("SELECT * FROM `ward` where wardid='$rt51[ward_id]'"); $RowWard=$ward->fetch_assoc(); echo " <tr> <td> <input type='hidden' name='prescriptionid[]' id='prescriptionid' value='$_GET[prescriptionid]' /> <input type='hidden' name='patientid[]' id='patientid' value='$_GET[patientid]' /> <input type='hidden' name='entered_by[]' value='$rs[entered_by]'> $rt51[created_at] </td> <td> <b>Nebulization <input class='type' id='type' name='type[]' type='hidden' value='Nebulization'/> </b><br> ($RowWard[ward_type]) <input class='ward_type' id='ward_type' name='ward_type[]' type='hidden' value='$RowWard[ward_type]'/> </td> <td> <b>1 </b> <input class='Quantity' id='Quantity' name='Quantity[]' type='hidden' value='1'/> </td>"; echo "</b></td> <td> "; echo "<b>$rt51[rate]</b>"; echo "</td><td>"; echo " <input class='price' id='price' name='price[]' type='hidden' value='$rt51[rate]'/> "; echo "<input class='status' id='status' name='status[]' type='hidden' value='Due'/>"; echo "</td> </tr> "; } echo ""; //<-------------------Record Sheet Intubation----------------------> echo ""; $sql51 ="SELECT * FROM Intubation WHERE prescriptionid='$_GET[prescriptionid]' AND patientid='$_GET[patientid]' AND Intubation='Done' AND status='1'"; $qsql51 = mysqli_query($con,$sql51); while($rt51 = mysqli_fetch_array($qsql51)){ $ward=$con->query("SELECT * FROM `ward` where wardid='$rt51[ward_id]'"); $RowWard=$ward->fetch_assoc(); echo " <tr> <td> <input type='hidden' name='prescriptionid[]' id='prescriptionid' value='$_GET[prescriptionid]' /> <input type='hidden' name='patientid[]' id='patientid' value='$_GET[patientid]' /> <input type='hidden' name='entered_by[]' value='$rs[entered_by]'> $rt51[created_at] </td> <td> <b>Intubation <input class='type' id='type' name='type[]' type='hidden' value='Intubation'/> </b><br> ($RowWard[ward_type]) <input class='ward_type' id='ward_type' name='ward_type[]' type='hidden' value='$RowWard[ward_type]'/> </td> <td> <b>1 </b> <input class='Quantity' id='Quantity' name='Quantity[]' type='hidden' value='1'/> </td>"; echo " <td> "; echo "<b>$rt51[rate]</b>"; echo "</td><td>"; echo " <input class='price' id='price' name='price[]' type='hidden' value='$rt51[rate]'/> "; echo "<input class='status' id='status' name='status[]' type='hidden' value='Due'/>"; echo "</td> </tr> "; } echo ""; //<-------------------Record Sheet ivpcentralline----------------------> echo ""; $sql51 ="SELECT * FROM ivpcentralline WHERE prescriptionid='$_GET[prescriptionid]' AND patientid='$_GET[patientid]' AND ivp_done='Done' AND status='1'"; $qsql51 = mysqli_query($con,$sql51); while($rt51 = mysqli_fetch_array($qsql51)){ $ward=$con->query("SELECT * FROM `ward` where wardid='$rt51[ward_id]'"); $RowWard=$ward->fetch_assoc(); echo " <tr> <td> <input type='hidden' name='prescriptionid[]' id='prescriptionid' value='$_GET[prescriptionid]' /> <input type='hidden' name='patientid[]' id='patientid' value='$_GET[patientid]' /> <input type='hidden' name='entered_by[]' value='$rs[entered_by]'> $rt51[created_at] </td> <td> <b>ivpcentralline <input class='type' id='type' name='type[]' type='hidden' value='ivpcentralline'/> </b><br> ($RowWard[ward_type]) <input class='ward_type' id='ward_type' name='ward_type[]' type='hidden' value='$RowWard[ward_type]'/> </td> <td> <b>1 </b> <input class='Quantity' id='Quantity' name='Quantity[]' type='hidden' value='1'/> </td>"; echo " <td> "; echo "<b>$rt51[rate]</b>"; echo "</td><td>"; echo " <input class='price' id='price' name='price[]' type='hidden' value='$rt51[rate]'/> "; echo "<input class='status' id='status' name='status[]' type='hidden' value='Due'/>"; echo "</td> </tr> "; } echo ""; //<-------------------Record Sheet Ryles_tube----------------------> echo ""; $sql51 ="SELECT * FROM Ryles_tube WHERE prescriptionid='$_GET[prescriptionid]' AND patientid='$_GET[patientid]' AND Ryles_tube='Done' AND status='1'"; $qsql51 = mysqli_query($con,$sql51); while($rt51 = mysqli_fetch_array($qsql51)){ $ward=$con->query("SELECT * FROM `ward` where wardid='$rt51[ward_id]'"); $RowWard=$ward->fetch_assoc(); echo " <tr> <td> <input type='hidden' name='prescriptionid[]' id='prescriptionid' value='$_GET[prescriptionid]' /> <input type='hidden' name='patientid[]' id='patientid' value='$_GET[patientid]' /> <input type='hidden' name='entered_by[]' value='$rs[entered_by]'> $rt51[created_at] </td> <td> <b>Ryles_tube <input class='type' id='type' name='type[]' type='hidden' value='Ryles_tube'/> </b><br> ($RowWard[ward_type]) <input class='ward_type' id='ward_type' name='ward_type[]' type='hidden' value='$RowWard[ward_type]'/> </td> <td> <b>1 </b> <input class='Quantity' id='Quantity' name='Quantity[]' type='hidden' value='1'/> </td>"; echo " <td> "; echo "<b>$rt51[rate]</b>"; echo "</td><td>"; echo " <input class='price' id='price' name='price[]' type='hidden' value='$rt51[rate]'/> "; echo "<input class='status' id='status' name='status[]' type='hidden' value='Due'/>"; echo "</td> </tr> "; } echo ""; //<-------------------Record Sheet blood transfusion----------------------> echo ""; $sql51 ="SELECT * FROM bloodtransfusion WHERE prescriptionid='$_GET[prescriptionid]' AND patientid='$_GET[patientid]' AND Diagnosis='Diagnosis' AND status='1'"; $qsql51 = mysqli_query($con,$sql51); while($rt51 = mysqli_fetch_array($qsql51)){ $ward=$con->query("SELECT * FROM `ward` where wardid='$rt51[ward_id]'"); $RowWard=$ward->fetch_assoc(); echo " <tr> <td> <input type='hidden' name='prescriptionid[]' id='prescriptionid' value='$_GET[prescriptionid]' /> <input type='hidden' name='patientid[]' id='patientid' value='$_GET[patientid]' /> <input type='hidden' name='entered_by[]' value='$rs[entered_by]'> $rt51[created_at] </td> <td> <b>Blood Transfusion <input class='type' id='type' name='type[]' type='hidden' value='Blood Transfusion'/> </b><br> ($RowWard[ward_type]) <input class='ward_type' id='ward_type' name='ward_type[]' type='hidden' value='$RowWard[ward_type]'/> </td> <td> <b>1 </b> <input class='Quantity' id='Quantity' name='Quantity[]' type='hidden' value='1'/> </td>"; echo " <td> "; echo "<b>$rt51[rate]</b>"; echo "</td><td>"; echo " <input class='price' id='price' name='price[]' type='hidden' value='$rt51[rate]'/> "; echo "<input class='status' id='status' name='status[]' type='hidden' value='Due'/>"; echo "</td> </tr> "; } echo ""; //<-------------------Record Sheet FFPTransfusion----------------------> echo ""; $sql51 ="SELECT * FROM FFPTransfusion WHERE prescriptionid='$_GET[prescriptionid]' AND patientid='$_GET[patientid]' AND FFPTransfusion='Done' AND status='1'"; $qsql51 = mysqli_query($con,$sql51); while($rt51 = mysqli_fetch_array($qsql51)){ $ward=$con->query("SELECT * FROM `ward` where wardid='$rt51[ward_id]'"); $RowWard=$ward->fetch_assoc(); echo " <tr> <td> <input type='hidden' name='prescriptionid[]' id='prescriptionid' value='$_GET[prescriptionid]' /> <input type='hidden' name='patientid[]' id='patientid' value='$_GET[patientid]' /> <input type='hidden' name='entered_by[]' value='$rs[entered_by]'> $rt51[created_at] </td> <td> <b>FFP Transfusion <input class='type' id='type' name='type[]' type='hidden' value='FFP Transfusion'/> </b><br> ($RowWard[ward_type]) <input class='ward_type' id='ward_type' name='ward_type[]' type='hidden' value='$RowWard[ward_type]'/> </td> <td> <b>1 </b> <input class='Quantity' id='Quantity' name='Quantity[]' type='hidden' value='1'/> </td>"; echo " <td> "; echo "<b>$rt51[rate]</b>"; echo "</td><td>"; echo " <input class='price' id='price' name='price[]' type='hidden' value='$rt51[rate]'/> "; echo "<input class='status' id='status' name='status[]' type='hidden' value='Due'/>"; echo "</td> </tr> "; } echo ""; //<-------------------Record Sheet Dialysisnurse----------------------> echo ""; $sql51 ="SELECT * FROM Dialysis WHERE prescriptionid='$_GET[prescriptionid]' AND patientid='$_GET[patientid]' AND status='1'"; $qsql51 = mysqli_query($con,$sql51); while($rt51 = mysqli_fetch_array($qsql51)){ $ward=$con->query("SELECT * FROM `ward` where wardid='$rt51[ward_id]'"); $RowWard=$ward->fetch_assoc(); echo " <tr> <td> <input type='hidden' name='prescriptionid[]' id='prescriptionid' value='$_GET[prescriptionid]' /> <input type='hidden' name='patientid[]' id='patientid' value='$_GET[patientid]' /> <input type='hidden' name='entered_by[]' value='$rs[entered_by]'> $rt51[created_at] </td> <td> <b>Dialysis <input class='type' id='type' name='type[]' type='hidden' value='Dialysis'/> </b><br> ($RowWard[ward_type]) <input class='ward_type' id='ward_type' name='ward_type[]' type='hidden' value='$RowWard[ward_type]'/> </td> <td> <b>1 </b> <input class='Quantity' id='Quantity' name='Quantity[]' type='hidden' value='1'/> </td>"; echo " <td> "; echo "<b>$rt51[rate]</b>"; echo "</td><td>"; echo " <input class='price' id='price' name='price[]' type='hidden' value='$rt51[rate]'/> "; echo "<input class='status' id='status' name='status[]' type='hidden' value='Due'/>"; echo "</td> </tr> "; } echo ""; //<-------------------Record Sheet ect----------------------> echo ""; $sql51 ="SELECT * FROM ect WHERE prescriptionid='$_GET[prescriptionid]' AND patientid='$_GET[patientid]' AND ect='Done' AND status='1'"; $qsql51 = mysqli_query($con,$sql51); while($rt51 = mysqli_fetch_array($qsql51)){ $ward=$con->query("SELECT * FROM `ward` where wardid='$rt51[ward_id]'"); $RowWard=$ward->fetch_assoc(); echo " <tr> <td> <input type='hidden' name='prescriptionid[]' id='prescriptionid' value='$_GET[prescriptionid]' /> <input type='hidden' name='patientid[]' id='patientid' value='$_GET[patientid]' /> <input type='hidden' name='entered_by[]' value='$rs[entered_by]'> $rt51[created_at] </td> <td> <b>ETC <input class='type' id='type' name='type[]' type='hidden' value='ETC'/> </b><br> ($RowWard[ward_type]) <input class='ward_type' id='ward_type' name='ward_type[]' type='hidden' value='$RowWard[ward_type]'/> </td> <td> <b>1 </b> <input class='Quantity' id='Quantity' name='Quantity[]' type='hidden' value='1'/> </td>"; echo " <td> "; echo "<b>$rt51[rate]</b>"; echo "</td><td>"; echo " <input class='price' id='price' name='price[]' type='hidden' value='$rt51[rate]'/> "; echo "<input class='status' id='status' name='status[]' type='hidden' value='Due'/>"; echo "</td> </tr> "; } echo ""; //<-------------------Record Sheet Electrotherapy----------------------> echo ""; $sql51 ="SELECT * FROM Electrotherapy WHERE prescriptionid='$_GET[prescriptionid]' AND patientid='$_GET[patientid]' AND Electrotherapy='Done' AND status='1'"; $qsql51 = mysqli_query($con,$sql51); while($rt51 = mysqli_fetch_array($qsql51)){ $ward=$con->query("SELECT * FROM `ward` where wardid='$rt51[ward_id]'"); $RowWard=$ward->fetch_assoc(); echo " <tr> <td> <input type='hidden' name='prescriptionid[]' id='prescriptionid' value='$_GET[prescriptionid]' /> <input type='hidden' name='patientid[]' id='patientid' value='$_GET[patientid]' /> <input type='hidden' name='entered_by[]' value='$rs[entered_by]'> $rt51[created_at] </td> <td> <b>Electrotherapy <input class='type' id='type' name='type[]' type='hidden' value='Electrotherapy'/> </b><br> ($RowWard[ward_type]) <input class='ward_type' id='ward_type' name='ward_type[]' type='hidden' value='$RowWard[ward_type]'/> </td> <td> <b>1 </b> <input class='Quantity' id='Quantity' name='Quantity[]' type='hidden' value='1'/> </td>"; echo " <td> "; echo "<b>$rt51[rate]</b>"; echo "</td><td>"; echo " <input class='price' id='price' name='price[]' type='hidden' value='$rt51[rate]'/> "; echo "<input class='status' id='status' name='status[]' type='hidden' value='Due'/>"; echo "</td> </tr> "; } echo ""; //<-------------------Record Sheet Electrotherapylaser----------------------> echo ""; $sql51 ="SELECT * FROM Electrotherapylaser WHERE prescriptionid='$_GET[prescriptionid]' AND patientid='$_GET[patientid]' AND Electrotherapylaser='Done' AND status='1'"; $qsql51 = mysqli_query($con,$sql51); while($rt51 = mysqli_fetch_array($qsql51)){ $ward=$con->query("SELECT * FROM `ward` where wardid='$rt51[ward_id]'"); $RowWard=$ward->fetch_assoc(); echo " <tr> <td> <input type='hidden' name='prescriptionid[]' id='prescriptionid' value='$_GET[prescriptionid]' /> <input type='hidden' name='patientid[]' id='patientid' value='$_GET[patientid]' /> <input type='hidden' name='entered_by[]' value='$rs[entered_by]'> $rt51[created_at] </td> <td> <b>Electro Therapy Laser <input class='type' id='type' name='type[]' type='hidden' value='Electro Therapy Laser'/> </b><br> ($RowWard[ward_type]) <input class='ward_type' id='ward_type' name='ward_type[]' type='hidden' value='$RowWard[ward_type]'/> </td> <td> <b>1 </b> <input class='Quantity' id='Quantity' name='Quantity[]' type='hidden' value='1'/> </td>"; echo "</b></td> <td> "; echo "<b>$rt51[rate]</b>"; echo "</td><td>"; echo " <input class='price' id='price' name='price[]' type='hidden' value='$rt51[rate]'/> "; echo "<input class='status3' id='status3' name='status3[]' type='hidden' value='Paid'/>"; echo "</td> </tr> "; } echo ""; //<-------------------Record Sheet Physiotherapy----------------------> echo ""; $sql51 ="SELECT * FROM Physiotherapy WHERE prescriptionid='$_GET[prescriptionid]' AND patientid='$_GET[patientid]' AND Physiotherapy='Done' AND status='1'"; $qsql51 = mysqli_query($con,$sql51); while($rt51 = mysqli_fetch_array($qsql51)){ $ward=$con->query("SELECT * FROM `ward` where wardid='$rt51[ward_id]'"); $RowWard=$ward->fetch_assoc(); echo " <tr> <td> <input type='hidden' name='prescriptionid[]' id='prescriptionid' value='$_GET[prescriptionid]' /> <input type='hidden' name='patientid[]' id='patientid' value='$_GET[patientid]' /> <input type='hidden' name='entered_by[]' value='$rs[entered_by]'> $rt51[created_at] </td> <td> <b>Physiotherapy <input class='type' id='type' name='type[]' type='hidden' value='Physiotherapy'/> </b><br> ($RowWard[ward_type]) <input class='ward_type' id='ward_type' name='ward_type[]' type='hidden' value='$RowWard[ward_type]'/> </td> <td> <b>1 </b> <input class='Quantity' id='Quantity' name='Quantity[]' type='hidden' value='1'/> </td>"; echo "<td> "; echo "<b>$rt51[rate]</b>"; echo "</td><td>"; echo " <input class='price' id='price' name='price[]' type='hidden' value='$rt51[rate]'/> "; echo "<input class='status' id='status' name='status[]' type='hidden' value='Due'/>"; echo "</td> </tr> "; } echo ""; //<-------------------Record Sheet Dietician----------------------> echo ""; $sql51 ="SELECT * FROM Dietician WHERE prescriptionid='$_GET[prescriptionid]' AND patientid='$_GET[patientid]' AND Dietician='Done' AND status='1'"; $qsql51 = mysqli_query($con,$sql51); while($rt51 = mysqli_fetch_array($qsql51)){ $ward=$con->query("SELECT * FROM `ward` where wardid='$rt51[ward_id]'"); $RowWard=$ward->fetch_assoc(); echo " <tr> <td> <input type='hidden' name='prescriptionid[]' id='prescriptionid' value='$_GET[prescriptionid]' /> <input type='hidden' name='patientid[]' id='patientid' value='$_GET[patientid]' /> <input type='hidden' name='entered_by[]' value='$rs[entered_by]'> $rt51[created_at] </td> <td> <b>Dietician <input class='type' id='type' name='type[]' type='hidden' value='Dietician'/> </b><br> ($RowWard[ward_type]) <input class='ward_type' id='ward_type' name='ward_type[]' type='hidden' value='$RowWard[ward_type]'/> </td> <td> <b>1 </b> <input class='Quantity' id='Quantity' name='Quantity[]' type='hidden' value='1'/> </td>"; echo "</b></td> <td> "; echo "<b>$rt51[rate]</b>"; echo "</td><td>"; echo " <input class='price' id='price' name='price[]' type='hidden' value='$rt51[rate]'/> "; echo "<input class='status' id='status' name='status[]' type='hidden' value='Due'/>"; echo "</td> </tr> "; } echo ""; ?> <tr> <?php $addaspatient ="SELECT * FROM addaspatient WHERE patientid='$_GET[patientid]' AND prescriptionid='$_GET[prescriptionid]'"; $qaddaspatient = mysqli_query($con,$addaspatient); $raddaspatient = mysqli_fetch_array($qaddaspatient); if($raddaspatient['typevisit']=='IPD' || $raddaspatient['typevisit']=='Ipd_Emergency'){ ?> <td><p style='margin-top:150px;'>Due Amt</p></td> <td> <?php echo " <input type='text' name='DueAmt' id='CalAmt' class='form-control' readonly placeholder='Due Amt' style='margin-top:140px;'>"; ?> </td> <?php } ?> <td > <span style='float:right;'> <b>Gross Amt. :</b></span> <br> <span style='float:right;'> <b>Discount. :</b></span><br><br> <span style='float:right;'> <b>Grand Total :</b></span> <!-- <br><br>--> <!--<span style='float:right;'>--> <!-- <b>GST Final :</b></span>--> <br><br> <span style='float:right;'> <b>Payment Mode :</b></span> <br><br> <?php if($raddaspatient['typevisit']=='IPD' || $raddaspatient['typevisit']=='Ipd_Emergency'){ ?> <span style='float:right;'> <b>Pay :</b> </span> <?php } ?> </td> <td colspan='3'> <?php date_default_timezone_set("Asia/Kolkata"); //India time (GMT+5:30) $date= date('Y-m-d'); echo" <b><i class='fa fa-inr'></i> <span align='right' id='val'></b></span> <div class=''> </div> <input type='hidden' id='cBalance'> <div class=''><span><input type='text' name='discount' id='chDiscount' size='2' required class='form-control'></span></div> <div class=''> <input type='text' name='pricetotal1' size='2' id='result' required style='margin-top:5px;' class='form-control' readonly></span></div> <div class=''> <input type='hidden' name='Total_gst' size='2' id='result2' required style='margin-top:5px;' class='form-control'> <input type='hidden' name='saledate' size='2' id='' value='$date' required style='margin-top:5px;' class='form-control'></span></div> <div class='checkbox'> <select name='paymentmode' class='form-control'> <option value='Cash'>Cash</option> <option value='Card'>Card</option> <option value='UPI'>UPI</option> </select></span></div> <div class=''> <div class='Card box'><input name='CardHolder' id='CardHolder' class='CardHolder' type='text' placeholder='Enter Card Hoder' style='margin-top:5px;' /> <input name='CardNumber' id='CardNumber' class='CardNumber' type='text' placeholder='Enter Card Number' style='margin-top:5px;'/> </div></div> <div class=''> <div class='UPI box'><input name='UPI_Number' id='UPI_Number' class='UPI_Number' type='text' placeholder='Enter UPI Number' style='margin-top:5px;' /> </div></div> "; if($raddaspatient['typevisit']=='IPD' || $raddaspatient['typevisit']=='Ipd_Emergency'){ echo "<input type='text' name='PaidAmt' id='PaidAmt' class='form-control' placeholder='Amount' required> <input type='hidden' name='typevisit' value='$raddaspatient[typevisit]' class='form-control' readonly><br> "; } ?> <br> <br> </div> <script src="https://code.jquery.com/jquery-3.5.1.min.js"></script> <script> $(document).ready(function(){ $("select").change(function(){ $(this).find("option:selected").each(function(){ var optionValue = $(this).attr("value"); if(optionValue){ $(".box").not("." + optionValue).hide(); $("." + optionValue).show(); } else{ $(".box").hide(); } }); }).change(); }); </script> <script> $(document).on("change keyup blur", "#chDiscount", function() { var main2 = $('#GSTFinalAmt').val(); var disc2 = $('#chDiscount').val(); var dec2 = (disc2 / 100).toFixed(2); //its convert 10 into 0.10 var mult2 = main2 * dec2; // gives the value for subtract from main value var discont2 = main2 - mult2; $('#result2').val(discont2); }); </script> <script> $(document).on("change keyup blur", "#chDiscount", function() { var main = $('#cBalance').val(); var disc = $('#chDiscount').val(); var dec = (disc / 100).toFixed(2); //its convert 10 into 0.10 var mult = main * dec; // gives the value for subtract from main value var discont = main - mult; $('#result').val(discont); }); </script> <script> $(document).on("change keyup blur", "#PaidAmt", function() { var result = $('#result').val(); var PaidAmt = $('#PaidAmt').val(); // var dec = (disc / 100).toFixed(2); //its convert 10 into 0.10 // var mult = main * dec; // gives the value for subtract from main value var DueAmt = result - PaidAmt; $('#CalAmt').val(DueAmt); }); </script> <!--<b><i class='fa fa-inr'></i> <span align='right' id="DisVal"></b></span><br><br>--> <!--<span id="sum">0</span><br>--> <input type="hidden" id="total_value" name="TotalAmt" /> <input type='submit' name='signup' value='Pay' class='btn btn-success' style='float:right;'> </td> </tr> </table> </form> </div> </div> </div> </div></div> </div> </div> <!-- PAGE CONTENT ENDS --> </div><!-- /.col --> </div><!-- /.row --> </div><!-- /.page-content --> </div> </div><!-- /.main-content --> <?php include('../includes/footer.php'); ?> <a href="#" id="btn-scroll-up" class="btn-scroll-up btn btn-sm btn-inverse"> <i class="ace-icon fa fa-angle-double-up icon-only bigger-110"></i> </a> </div><!-- /.main-container --> <!-- basic scripts --> <!--[if !IE]> --> <script src="../assets/js/jquery-2.1.4.min.js"></script> <!-- <![endif]--> <!--[if IE]> <script src="../assets/js/jquery-1.11.3.min.js"></script> <![endif]--> <script type="text/javascript"> if('ontouchstart' in document.documentElement) document.write("<script src='../assets/js/jquery.mobile.custom.min.js'>"+"<"+"/script>"); </script> <script src="../assets/js/bootstrap.min.js"></script> <!-- page specific plugin scripts --> <script src="../assets/js/jquery.dataTables.min.js"></script> <script src="../assets/js/jquery.dataTables.bootstrap.min.js"></script> <script src="../assets/js/dataTables.buttons.min.js"></script> <script src="../assets/js/buttons.flash.min.js"></script> <script src="../assets/js/buttons.html5.min.js"></script> <script src="../assets/js/buttons.print.min.js"></script> <script src="../assets/js/buttons.colVis.min.js"></script> <script src="../assets/js/dataTables.select.min.js"></script> <!-- ace scripts --> <script src="../assets/js/ace-elements.min.js"></script> <script src="../assets/js/ace.min.js"></script> <!-- inline scripts related to this page --> <script type="text/javascript"> jQuery(function($) { //initiate dataTables plugin var myTable = $('#dynamic-table') //.wrap("<div class='dataTables_borderWrap' />") //if you are applying horizontal scrolling (sScrollX) .DataTable( { bAutoWidth: false, "aoColumns": [ { "bSortable": false }, null,null, { "bSortable": false } ], "aaSorting": [], //"bProcessing": true, //"bServerSide": true, //"sAjaxSource": "http://127.0.0.1/table.php" , //, //"sScrollY": "200px", //"bPaginate": false, //"sScrollX": "100%", //"sScrollXInner": "120%", //"bScrollCollapse": true, //Note: if you are applying horizontal scrolling (sScrollX) on a ".table-bordered" //you may want to wrap the table inside a "div.dataTables_borderWrap" element //"iDisplayLength": 50 select: { style: 'multi' } } ); $.fn.dataTable.Buttons.defaults.dom.container.className = 'dt-buttons btn-overlap btn-group btn-overlap'; new $.fn.dataTable.Buttons( myTable, { buttons: [ { "extend": "colvis", "text": "<i class='fa fa-search bigger-110 blue'></i> <span class='text'>Show/hide columns</span>", "className": "btn btn-white btn-primary btn-bold", columns: ':not(:first):not(:last)' }, { "extend": "copy", "text": "<i class='fa fa-copy bigger-110 pink'></i> <span class='text'>Copy to clipboard</span>", "className": "btn btn-white btn-primary btn-bold" }, { "extend": "csv", "text": "<i class='fa fa-database bigger-110 orange'></i> <span class='text'>Export to CSV</span>", "className": "btn btn-white btn-primary btn-bold" }, { "extend": "excel", "text": "<i class='fa fa-file-excel-o bigger-110 green'></i> <span class='text'>Export to Excel</span>", "className": "btn btn-white btn-primary btn-bold" }, { "extend": "pdf", "text": "<i class='fa fa-file-pdf-o bigger-110 red'></i> <span class='text'>Export to PDF</span>", "className": "btn btn-white btn-primary btn-bold" }, { "extend": "print", "text": "<i class='fa fa-print bigger-110 grey'></i> <span class='text'>Print</span>", "className": "btn btn-white btn-primary btn-bold", autoPrint: false, message: 'This print was produced using the Print button for DataTables' } ] } ); myTable.buttons().container().appendTo( $('.tableTools-container') ); //style the message box var defaultCopyAction = myTable.button(1).action(); myTable.button(1).action(function (e, dt, button, config) { defaultCopyAction(e, dt, button, config); $('.dt-button-info').addClass('gritter-item-wrapper gritter-info gritter-center white'); }); var defaultColvisAction = myTable.button(0).action(); myTable.button(0).action(function (e, dt, button, config) { defaultColvisAction(e, dt, button, config); if($('.dt-button-collection > .dropdown-menu').length == 0) { $('.dt-button-collection') .wrapInner('<ul class="dropdown-menu dropdown-light dropdown-caret dropdown-caret" />') .find('a').attr('href', '#').wrap("<li />") } $('.dt-button-collection').appendTo('.tableTools-container .dt-buttons') }); //// setTimeout(function() { $($('.tableTools-container')).find('a.dt-button').each(function() { var div = $(this).find(' > div').first(); if(div.length == 1) div.tooltip({container: 'body', title: div.parent().text()}); else $(this).tooltip({container: 'body', title: $(this).text()}); }); }, 500); myTable.on( 'select', function ( e, dt, type, index ) { if ( type === 'row' ) { $( myTable.row( index ).node() ).find('input:checkbox').prop('checked', true); } } ); myTable.on( 'deselect', function ( e, dt, type, index ) { if ( type === 'row' ) { $( myTable.row( index ).node() ).find('input:checkbox').prop('checked', false); } } ); ///////////////////////////////// //table checkboxes $('th input[type=checkbox], td input[type=checkbox]').prop('checked', false); //select/deselect all rows according to table header checkbox $('#dynamic-table > thead > tr > th input[type=checkbox], #dynamic-table_wrapper input[type=checkbox]').eq(0).on('click', function(){ var th_checked = this.checked;//checkbox inside "TH" table header $('#dynamic-table').find('tbody > tr').each(function(){ var row = this; if(th_checked) myTable.row(row).select(); else myTable.row(row).deselect(); }); }); //select/deselect a row when the checkbox is checked/unchecked $('#dynamic-table').on('click', 'td input[type=checkbox]' , function(){ var row = $(this).closest('tr').get(0); if(this.checked) myTable.row(row).deselect(); else myTable.row(row).select(); }); $(document).on('click', '#dynamic-table .dropdown-toggle', function(e) { e.stopImmediatePropagation(); e.stopPropagation(); e.preventDefault(); }); //And for the first simple table, which doesn't have TableTools or dataTables //select/deselect all rows according to table header checkbox var active_class = 'active'; $('#simple-table > thead > tr > th input[type=checkbox]').eq(0).on('click', function(){ var th_checked = this.checked;//checkbox inside "TH" table header $(this).closest('table').find('tbody > tr').each(function(){ var row = this; if(th_checked) $(row).addClass(active_class).find('input[type=checkbox]').eq(0).prop('checked', true); else $(row).removeClass(active_class).find('input[type=checkbox]').eq(0).prop('checked', false); }); }); //select/deselect a row when the checkbox is checked/unchecked $('#simple-table').on('click', 'td input[type=checkbox]' , function(){ var $row = $(this).closest('tr'); if($row.is('.detail-row ')) return; if(this.checked) $row.addClass(active_class); else $row.removeClass(active_class); }); /********************************/ //add tooltip for small view action buttons in dropdown menu $('[data-rel="tooltip"]').tooltip({placement: tooltip_placement}); //tooltip placement on right or left function tooltip_placement(context, source) { var $source = $(source); var $parent = $source.closest('table') var off1 = $parent.offset(); var w1 = $parent.width(); var off2 = $source.offset(); //var w2 = $source.width(); if( parseInt(off2.left) < parseInt(off1.left) + parseInt(w1 / 2) ) return 'right'; return 'left'; } /***************/ $('.show-details-btn').on('click', function(e) { e.preventDefault(); $(this).closest('tr').next().toggleClass('open'); $(this).find(ace.vars['.icon']).toggleClass('fa-angle-double-down').toggleClass('fa-angle-double-up'); }); /***************/ /** //add horizontal scrollbars to a simple table $('#simple-table').css({'width':'2000px', 'max-width': 'none'}).wrap('<div style="width: 1000px;" />').parent().ace_scroll( { horizontal: true, styleClass: 'scroll-top scroll-dark scroll-visible',//show the scrollbars on top(default is bottom) size: 2000, mouseWheelLock: true } ).css('padding-top', '12px'); */ }) </script> <script> function printDiv(GFG) { var divToPrint=document.getElementById('GFG'); var newWin=window.open('','Print-Window'); newWin.document.open(); newWin.document.write('<html><body onload="window.print()">'+divToPrint.innerHTML+'</body></html>'); newWin.document.close(); setTimeout(function(){newWin.close();},10); </script> <script> // $(document).on("change keyup blur", "#chDiscount", function() { // var main = $('#cBalance').val(); // var disc = $('#chDiscount').val(); // var dec = (disc / 100).toFixed(2); //its convert 10 into 0.10 // var mult = main * dec; // gives the value for subtract from main value // var discont = main - mult; // $('#result').val(discont); // }); </script> <script> // $(document).on("change keyup blur", "#chDiscount", function() { // var main = $('#cBalance').val(); // var disc = $('#chDiscount').val(); // var dec = (disc / 100).toFixed(2); //its convert 10 into 0.10 // var mult = main * dec; // gives the value for subtract from main value // var discont = main - mult; // $('#result2').val(discont); // }); // var table = document.getElementById("myTable"), sumVal2 = 0, sumVal1 = 0, sumVal3 = 0; // $(".price").each(function() { // sumVal2 += Number($(this).val()); // }); // document.getElementById("TAmt").innerHTML = "" + sumVal2; // $('#cBalance').val(sumVal2); // $('#TextTAmt').val(sumVal2); // console.log(sumVal2); // $(".price1").each(function() { // sumVal1 += Number($(this).val()); // }); // document.getElementById("val1").innerHTML = "" + sumVal1; // console.log(sumVal1); // $(".price3").each(function() { // sumVal3 += Number($(this).val()); // }); // document.getElementById("val3").innerHTML = "" + sumVal3; // console.log(sumVal3); // var table = document.getElementById("myTable"), sumVal2 = 0, sumVal1 = 0, sumVal3 = 0; // $(".price").each(function() { // sumVal2 += Number($(this).val()); // }); // document.getElementById("val2").innerHTML = "" + sumVal2; // console.log(sumVal2); // $('#result2').val(sumVal2); // // $('#cBalance').val(sumVal2); </script> <script type="text/javascript"> $(function() { $("#addAll").click(function() { var add = 0; $(".price").each(function() { add += Number($(this).val()); }); // $("#val").text("Rs : " +add); $('#total_value').val(add); var Disadd = 0; $(".DisPrice").each(function() { Disadd += Number($(this).val()); }); // $("#val").text("Rs : " +add); $('#Final_value').val(Disadd); }); }); $(function() { $("#addAll").click(function() { }); }); // $(document).ready(function(){ // //iterate through each textboxes and add keyup // //handler to trigger sum event // $(".txt").each(function() { // $(this).keyup(function(){ // calculateSum(); // }); // }); // }); // function calculateSum() { // var sum = 0; // //iterate through each textboxes and add the values // $(".txt").each(function() { // //add only if the value is number // if(!isNaN(this.value) && this.value.length!=0) { // sum += parseFloat(this.value); // } // }); // //.toFixed() method will roundoff the final sum to 2 decimal places // $("#sum").html(sum.toFixed(2)); // $('#total_value').val(sum); // } var close = document.getElementsByClassName("closebtn"); var i; for (i = 0; i < close.length; i++) { close[i].onclick = function(){ var div = this.parentElement; div.style.opacity = "0"; setTimeout(function(){ div.style.display = "none"; }, 600); } } </script> <script> var table = document.getElementById("myTable"), sumVal = 0; $(".price").each(function() { sumVal += Number($(this).val()); }); document.getElementById("val").innerHTML = "" + sumVal; $('#total_value').val(sumVal); // document.getElementById("NEWval").innerHTML = "" + sumVal; // $('#total_value2').val(sumVal); document.getElementById("val").innerHTML = "" + sumVal; $('#result').val(sumVal); document.getElementById("val").innerHTML = "" + sumVal; $('#cBalance').val(sumVal); console.log(sumVal); </script> <script> ///////////////////Dis Price/////////////////// var table2 = document.getElementById("myTable"), DissumVal = 0; $(".DisPrice").each(function() { DissumVal += Number($(this).val()); }); document.getElementById("DisVal").innerHTML = "" + DissumVal; $('#Final_value1').val(DissumVal); console.log(DissumVal); </script> </body> </html> <?php } ?>