Server IP : 162.240.98.243 / Your IP : 18.191.176.5 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/Pharmacy/ |
Upload File : |
<br> <table id="example2" id ="demo" class="table table-bordered table-hover"> <thead> <tr> <th>Date & Time</th> <th>Invoice</th> <th>Paid Amount</th> <th>Due Amount</th> <th>Action</th> </tr> </thead> <tbody> <?php $hospital_course_Bill=$con->query("SELECT * FROM `hospitalDueAmt` WHERE prescriptionid='$_GET[prescriptionid]' AND patientid='$_GET[patientid]' ORDER BY `id` DESC"); while($rowBill=$hospital_course_Bill->fetch_assoc()){ $DueAmt=round($rowBill['DueAmt']); ?> <tr> <td><?php echo $rowBill['createdBy']; ?></td> <td><?php echo $rowBill['invoice']; ?></td> <td><?php echo $rowBill['Pay']; ?></td> <td><?php echo $DueAmt; ?></td> <td> <?php if($rowBill['DueAmt']=='0'){ echo "Paid"; ?> <?php }else{?> <a href='Print_admissioninvoice.php?prescriptionid=<?php echo $_GET['prescriptionid']; ?>&patientid=<?php echo $_GET['patientid']; ?>&invoice=<?php echo $rowBill['invoice']; ?>&id=<?php echo $rowBill['id'] ?>'>View</a> <?php } ?> </td> </tr> <?php } ?> </tbody> </table> <!-- /.card-header --> <form method="post" enctype="multipart/form-data"> <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> <th><strong> Status</strong></th> <th><strong><section class="content-header">Action</section> </strong></th> </tr> <?php include('master_hospital_Course_durtion.php'); ?> <?php $Hospital=$con->query("SELECT * FROM `hospital_course_Bill` Where prescriptionid=$_GET[prescriptionid] AND patientid=$_GET[patientid]"); $RowHosBill=$Hospital->fetch_assoc(); if($RowHosBill['TotalAmt']==$_POST['TotalAmount']){ ?> <tr> <td>Total Amount :- <i class='fa fa-inr'></i> <b><span align='right' id="val2"></span> /-</b> <input type='hidden' name='TotalAmount' id='result2'/> </td></tr> <tr><td>Due Amount :- <i class='fa fa-inr'></i> <b> <span align='right' id="val1"></span> /-</b> <input type='hidden' name='DueAmount' id='result1' /> </td></tr> <tr><td>Paid Amount :- <i class='fa fa-inr'></i> <b> <span align='right' id="val3"></span> /-</b> <input type='hidden' name='PaidAmount' id='result3' /> </td> </td> </tr> <tr><td><a href='HospitalCoursePay.php?prescriptionid=<?php echo $_GET['prescriptionid'] ?>&patientid=<?php echo $_GET['patientid'] ?>' class='btn btn-info'>Pay</a> </td></tr> <?php }else{ ?> <tr> <td>Due Amount :- <i class='fa fa-inr'></i> <b> <?php echo $RowHosBill['DueAmt'] ?> /-</b></td> </tr> <tr><td><a href='HospitalCourseDuePay.php?prescriptionid=<?php echo $_GET['prescriptionid'] ?>&patientid=<?php echo $_GET['patientid'] ?>&invoice=<?php echo $RowHosBill['invoice']; ?>' class='btn btn-info'>Pay</a> </td></tr> <?php } ?> </table> </form> <br> <a href="#"> <script> var table = document.getElementById("myTable"), sumVal2 = 0, sumVal1 = 0, sumVal3 = 0; $(".price2").each(function() { sumVal2 += Number($(this).val()); }); document.getElementById("val2").innerHTML = "" + sumVal2; console.log(sumVal2); $('#result2').val(sumVal2); // $('#cBalance').val(sumVal2); $(".price1").each(function() { sumVal1 += Number($(this).val()); }); document.getElementById("val1").innerHTML = "" + sumVal1; console.log(sumVal1); $('#result1').val(sumVal1); $(".price3").each(function() { sumVal3 += Number($(this).val()); }); document.getElementById("val3").innerHTML = "" + sumVal3; console.log(sumVal3); $('#result3').val(sumVal3); </script>