Server IP : 162.240.98.243 / Your IP : 18.217.147.193 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/ |
Upload File : |
<?php include("dbconnection.php"); if(isset($_GET[delid])) { $sql ="DELETE FROM patient_invace WHERE invaceid='$_GET[delid]'"; $qsql=mysqli_query($con,$sql); if(mysqli_affected_rows($con) == 1) { echo "<script>alert('Deleted successfully..');</script>"; } } ?> <!-- /.card-header --> <div class="card-body"> <table id="myTable" class="table table-bordered table-hover" > <thead> <tr> <th><strong>Created At <br>Created By</strong></th> <th><strong>Medicine & Charges</strong></th> <th><strong>Status</strong></th> <th><strong><section class="content-header">Action</section> </strong></th> </tr> </thead> <?php include("dbconnection.php"); $sql ="SELECT * FROM addaspatient WHERE patientid='$_GET[patientid]' AND prescriptionid='$_GET[prescriptionid]'"; $qsql = mysqli_query($con,$sql); while($rs = mysqli_fetch_array($qsql)) { $sqlpatient2 = "SELECT * FROM medicine_slot WHERE prescriptionid='$rs[prescriptionid]' AND action='Disperse' OR prescriptionid='$rs[prescriptionid]' AND action='Paid'"; $qsqlpatient2 = mysqli_query($con,$sqlpatient2); while($rsp2 = mysqli_fetch_array($qsqlpatient2)) { $sqlpatient1 = "SELECT * FROM site_users WHERE userno='$rsp2[entered_by]'"; $qsqlpatient1 = mysqli_query($con,$sqlpatient1); while($rsn = mysqli_fetch_array($qsqlpatient1)) { $sql1 ="SELECT * FROM medicine_inventory WHERE medicine_id='$rsp2[medicine_id]' AND Batch_number='$rsp2[batchno]' "; $qsql1 = mysqli_query($con,$sql1); while($rh1 = mysqli_fetch_array($qsql1)) { $sql191 ="SELECT * FROM medicine_stok WHERE medicine_id='$rh1[medicine_id]'"; $qsql191 = mysqli_query($con,$sql191); while($rh191 = mysqli_fetch_array($qsql191)) { if($rh191['Category']=='Injectable'){ $sizefinal=$rh1[mrp]/$rh191[size]; $pricetotal=$sizefinal*$rsp2[quantitygiven]; } if($rh191['Category']=='IV Fluid'){ $sizefinal=$rh1[mrp]/$rh191[size]; $pricetotal=$sizefinal*$rsp2[quantitygiven]; } if($rh191['Category']=='Capsule'){ $sizefinal=$rh1[mrp]/$rh191[size]; $pricetotal=$sizefinal*$rsp2[quantitygiven]; } if($rh191['Category']=='Tablet'){ $sizefinal=$rh1[mrp]/$rh191[size]; $pricetotal=$sizefinal*$rsp2[quantitygiven]; } if($rh191['Category']=='Syrup'){ $sizefinal=$rh1[mrp]/$rh191[size]; $pricetotal=$sizefinal*$rsp2[quantitygiven]; } if($rh191['Category']=='Powder'){ $sizefinal=$rh1[mrp]/$rh191[size]; $pricetotal=$sizefinal*$rsp2[quantitygiven]; } if($rh191['Category']=='Ointment'){ $sizefinal=$rh1[mrp]/$rh191[size]; $pricetotal=$sizefinal*$rsp2[quantitygiven]; } if($rh191['Category']=='Drop'){ $sizefinal=$rh1[mrp]/$rh191[size]; $pricetotal=$sizefinal*$rsp2[quantitygiven]; } if($rh191['Category']=='Solution'){ $sizefinal=$rh1[mrp]/$rh191[size]; $pricetotal=$sizefinal*$rsp2[quantitygiven]; } if($rh191['Category']=='Patch'){ $sizefinal=$rh1[mrp]/$rh191[size]; $pricetotal=$sizefinal*$rsp2[quantitygiven]; } echo " <tbody> <tr> <td> $rsp2[created_at] <br>$rsn[name]</td> <td> "; echo "<b>Name: </b>$rh191[DRUGS_name] (<b>$rh191[Category]</b>)"; echo "<br><b>Price: </b>$pricetotal <input type='text' class='txtCal' /><br>"; echo "</td> <td> ";$usertype=$rsp2['action']; if($usertype == 'Paid'){ echo "Paid"; } else{ echo "Due <b>$pricetotal</b>"; } echo "</td> <td><section class='content-header'><a href='medicinebill.php?prescriptionid=$rs[prescriptionid]&patientid=$rs[patientid]&srno=$rsp2[srno]' >View</a> <br> <a href='billing.php?prescriptionid=$rs[prescriptionid]&patientid=$rs[patientid]&srno=$rsp2[srno]'>Edit</a></section></td> </tr> "; } } } } } ?> </tbody> <tfoot> <tr> <td><span><b>TOTAL :</b></span></td> <td><b>Rs.<span id="total_sum_value"></span></b></td> </tr> </tfoot> </table> <br> <a href="#"><h1 Align="center"><i class="fa fa-file-pdf-o" aria-hidden="true"></i> View All </h1></h1></a> </div> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script> <script> $(document).ready(function(){ $("#myTable").on('keyup', '.txtCal', function () { alert('1'); var calculated_total_sum = 0; $("#myTable .txtCal").each(function () { var get_textbox_value = $(this).val(); if ($.isNumeric(get_textbox_value)) { calculated_total_sum += parseFloat(get_textbox_value); } }); $("#total_sum_value").html(calculated_total_sum); }); }); </script>