UnknownSec Bypass
403
:
/
var
/
www
/
zenithentcare
/
stmedicosoftware
/ [
drwxrwxr-x
]
Menu
Upload
Mass depes
Mass delete
Terminal
Info server
About
name :
newrefund.php
<?php include "top1.php";?> <!-- /inner_content--> <div class="inner_content"> <!-- /inner_content_w3_agile_info--> <!-- breadcrumbs --> <div class="w3l_agileits_breadcrumbs"> <div class="w3l_agileits_breadcrumbs_inner"> <ul> <li><a href="dashboard.php">Dashboard</a><span>«</span></li> <li>MANAGE REFUND </li> </ul> </div> </div> <!-- //breadcrumbs --> <div class="inner_content_w3_agile_info two_in"> <table width="100%"> <tr> <td width="70%"> <h2 class="w3_inner_tittle">MANAGE REFUND</h2> </td> <td width="30%" align="right"><a href="opd_list.php" class="btn btn-primary"><i class="fa fa-list"></i> Opd List</a></td> </tr> </table> <!--/forms--> <!--/forms--> <div class="forms-main_agileits"> <!--/forms-inner--> <div class="forms-inner"> <!--/set-1--> <div class="set-1_w3ls"> <div class="col-md-12 button_set_one two agile_info_shadow graph-form"> <!-- <h3 class="w3_inner_tittle two">Inline Form </h3> --> <div class="grid-1"> <div class="form-body"> <div data-example-id="simple-form-inline"> <div align="cemter"> <!-- <button class="btn btn-warning" id="myBtn"><i class="fa fa-search"></i> Find Old Patient</button> --> </div> <input type="hidden" class="form-control1" id="hduhid" name="hduhid"> <input type="hidden" class="form-control1" id="hdfileno" name="hdfileno"> <div class="form-inline"> </div> <div> <table width="100%"> <tr> <td width="50%"> <p style="margin-top: 20px"></p> <div align="left">Date</div> <input class="form-control1" name="txtdate" id="txtdate" type="date" placeholder="" disabled="disabled" style="width: 100%; font-size: 14px" required /> </td> <td width="50%" align="right"> <p style="margin-top: 20px"></p> <div align="left">Type</div> <input class="form-control1" name="txttype" id="txttype" type="text" disabled="false" placeholder="" style="width: 100%; font-size: 14px" required /> </td> </tr> </table> </div> <div> <table width="100%"> <tr> <td width="50%"> <p style="margin-top: 20px"></p> <div align="left">Amount</div> <input class="form-control1" name="txtamount" id="txtamount" type="text" placeholder="" disabled="false" style="width: 100%; font-size: 14px" required /> </td> <td width="50%" align="right"> <p style="margin-top: 20px"></p> <div align="left">UHID</div> <input class="form-control1" name="txtuhid" id="txtuhid" type="text" disabled="false" placeholder="" style="width: 100%; font-size: 14px" required /> </td> </tr> </table> </div> <div> <table width="100%"> <tr> <td width="50%"> <p style="margin-top: 20px"></p> <div align="left">Discount</div> <input class="form-control1" name="txtdiscount" id="txtdiscount" type="text" placeholder="" disabled="false" style="width: 100%; font-size: 14px" required /> </td> <td width="50%" align="right"> <p style="margin-top: 20px"></p> <div align="left">Opd No.</div> <input class="form-control1" name="txtopdno" id="txtopdno" type="text" disabled="false" placeholder="" style="width: 100%; font-size: 14px" required /> </td> </tr> </table> </div> <div> <table width="100%"> <tr> <td width="50%"> <p style="margin-top: 20px"></p> <div align="left">Net Amount</div> <input class="form-control1" name="txtnetamount" id="txtnetamount" type="text" placeholder="" disabled="false" style="width: 100%; font-size: 14px" required /> </td> <td width="50%" align="right"> <p style="margin-top: 20px"></p> <div align="left">Patient Name</div> <input class="form-control1" name="txtpatientname" id="txtpatientname" type="text" disabled="false" placeholder="" style="width: 100%; font-size: 14px" required /> </td> </tr> </table> </div> <div> <table width="100%"> <tr> <td width="50%"> <p style="margin-top: 20px"></p> <div align="left">Refund Amount</div> <input class="form-control1" name="txtrefund" onkeyup="checkreceiveamount();" id="txtrefund" type="text" placeholder="" style="width: 100%; font-size: 14px" required /> </td> <td width="50%" align="right"> <p style="margin-top: 20px"></p> <div align="left">Age/Sex</div> <input class="form-control1" name="txtagesex" id="txtagesex" type="text" disabled="false" placeholder="" style="width: 100%; font-size: 14px" required /> </td> </tr> </table> </div> <div> <table width="100%"> <tr> <td width="50%"> <p style="margin-top: 20px"></p> <div align="left">Payment Mode</div> <select name="cmbpaymentmode" id="cmbpaymentmode" onchange="checkpaymentmode();" class="form-control1" style="font-size: 14px"> <option value="CASH">CASH</option> <option value="BANK">BANK</option> <option value="CHEQUE">CHEQUE</option> <option value="ONLINE">ONLINE</option> <option value="POS">POS</option> </select> </td> <td width="50%" align="right"> <p style="margin-top: 20px"></p> <div align="left">Mobile No</div> <input class="form-control1" name="txtmobileno" id="txtmobileno" type="text" disabled="false" placeholder="" style="width: 100%; font-size: 14px" required /> </td> </tr> </table> </div> <div> <table width="100%"> <tr> <td width="50%"> <p style="margin-top: 20px"></p> <div align="left">Bank</div> <select name="txtbank" id="txtbank" class="form-control1" style="font-size: 14px"> </select> </td> <td width="50%" align="right"> <p style="margin-top: 20px"></p> <div align="left">Address</div> <input class="form-control1" name="txtaddress" id="txtaddress" type="text" disabled="false" placeholder="" style="width: 100%; font-size: 14px" required /> </td> </tr> </table> </div> <div> <table width="100%"> <tr> <td width="50%"> <p style="margin-top: 20px"></p> <div align="left">Transaction No.</div> <input class="form-control1" name="txttransactionno" id="txttransactionno" type="text" placeholder="" style="width: 100%; font-size: 14px" required /> </td> <td width="50%" align="right"> </td> </tr> </table> </div> <div class="form-inline"> <div class="col-md-12 form-group" align="center"> <p style="margin-top: 20px"></p> <button type="submit" class="btn btn-default mt-4" id="btnsave" name="btnsave" onclick="saverefund();">Save</button> <button type="submit" class="btn btn-default" id="btnclear" name="btnclear" onclick="clear1()">CLEAR</button> </div> </div> </div> </div> </div> </div> <div class="clearfix"> </div> </div> <!--//set-1--> </div> <!--//forms-inner--> </div> <!--//forms--> </div> </div> </div> </div> <!-- banner --> <?php include "footer.php";?> <style> /* The Modal (background) */ .modal { display: none; /* Hidden by default */ position: fixed; /* Stay in place */ z-index: 1; /* Sit on top */ left: 0; top: 0; width: 100%; /* Full width */ height: 100vh; /* Full height */ overflow: auto; /* Enable scroll if needed */ background-color: rgb(0, 0, 0); /* Fallback color */ background-color: rgba(0, 0, 0, 0.4); /* Black w/ opacity */ } /* Modal Content/Box */ .modal-content { background-color: #fefefe; margin: 5% auto; /* 15% from the top and centered */ padding: 15px; border: 1px solid #888; width: 80%; /* Could be more or less, depending on screen size */ } /* The Close Button */ .close { color: #ff0000; float: right; font-size: 28px; font-weight: bold; } .close:hover, .close:focus { color: black; text-decoration: none; cursor: pointer; } </style> <script> $(document).ready(function() { getbank(""); getrefunddetails(); }); function getbank(val) { var identifier = 5; $.ajax({ type: "Post", url: "getalldepartment.php", data: '&identifier=' + identifier, success: function(res) { var data = JSON.parse(res); var sel = $("#txtbank"); sel.empty(); for (var i = 0; i < data.length; i++) { if (data[i].parcode == val) { sel.append('<option value="' + data[i].parcode + '" selected=true>' + data[i] .parname + '</option>'); } else { sel.append('<option value="' + data[i].parcode + '">' + data[i].parname + '</option>'); } } } }); } function checkpaymentmode() { var paymentmode = document.getElementById("cmbpaymentmode").value; if (paymentmode == "CASH") { document.getElementById("txtbank").disabled = true; document.getElementById("txtbank").value = "Select Bank"; document.getElementById("txttransactionno").disabled = true; } else { document.getElementById("txtbank").disabled = false document.getElementById("txttransactionno").disabled = false } } function getUrlVars() { var vars = [], hash; var hashes = window.location.href.slice(window.location.href.indexOf('?') + 1).split('&'); for (var i = 0; i < hashes.length; i++) { hash = hashes[i].split('='); vars.push(hash[0]); vars[hash[0]] = hash[1]; } return vars; } function getrefunddetails() { var id = getUrlVars()['id']; var op = getUrlVars()['op']; if(op=="Refund") { getopddetails(id); } else { getproceduredetails(id); } } function getproceduredetails(id) { if(jQuery.type(id)=="undefined") { return; } var identifier=2; if (id != "") { $.ajax({ method: 'POST', url: 'get_billtestdetails.php', data: '&billno=' + id+'&identifier=' + identifier, dataType: "JSON", success: function(data) { $('#hduhid').val(data.uhid); $('#hdfileno').val(data.voucherno); $('#txtuhid').val(data.suhid); $('#txtdate').val(data.trandate); $('#txttype').val("Procedure"); $('#txtamount').val(data.totalamount); $('#txtdiscount').val(data.discount); $('#txtopdno').val(data.svoucherno); $('#txtnetamount').val(data.nettotal); $('#txtpatientname').val(data.name); $('#txtrefund').val(data.receiveamt); $('#txtagesex').val(data.agey+''+data.pntageyrs+'/'+data.sex); $('#cmbpaymentmode').val(data.cashyacheque); $('#txtmobileno').val(data.mobile); $('#txtbank').val(data.bankname); $('#txtaddress').val(data.address1); $('#txttransactionno').val(data.chequeno); //$('#ddlpatienttype').val(data.patienttype); // $('#txtsuhid').val(data.appdate); } }); } } function checkreceiveamount() { var flag=false; var amount =Number(document.getElementById("txtnetamount").value); var refund =Number(document.getElementById("txtrefund").value); if (refund == "") $('#txtrefund').val("0"); if(refund>amount) { alert('refund amount can not be greater than net amount'); document.getElementById("txtrefund").focus(); flag=true; } return flag; } function getopddetails(id) { if(jQuery.type(id)=="undefined") { return; } if (id != "") { $.ajax({ method: 'POST', url: 'get_opddetails.php', data: '&id=' + id, dataType: "JSON", success: function(data) { $('#hduhid').val(data.uhid); $('#hdfileno').val(data.fileno); $('#txtuhid').val(data.suhid); $('#txtdate').val(data.opddate); $('#txttype').val("Opd"); $('#txtamount').val(data.amount); $('#txtdiscount').val(data.discount); $('#txtopdno').val(data.sfileno); $('#txtnetamount').val(data.netamount); $('#txtpatientname').val(data.name); $('#txtrefund').val(data.receiveamt); $('#txtagesex').val(data.sex); $('#cmbpaymentmode').val(data.paymentmode); $('#txtmobileno').val(data.mobile); $('#txtbank').val(data.bank); $('#txtaddress').val(data.address1); $('#txttransactionno').val(data.chequeno); //$('#ddlpatienttype').val(data.patienttype); // $('#txtsuhid').val(data.appdate); } }); } } function formatDate(dt) { var d, y, m; d = dt.getDate(); m = dt.getMonth() + 1; y = dt.getFullYear(); var ret = ''; if (d < 10) d = '0' + d; if (m < 10) m = '0' + m; ret = y + "-" + m + "-" + d; return ret; } function enabledisable(val) { if(val=="Yes") { $("#txtsuhid").prop('disabled', true); } else { $("#txtsuhid").prop('disabled', false); } } function getalldoctor(val) { $.ajax({ type: "Get", url: "get_alldoctor.php", success: function(res) { var data = JSON.parse(res); var sel = $("#ddlDoctorName"); sel.empty(); $("#ddlDoctorName").append('<option>Select Consultant</option>'); for (var i = 0; i < data.length; i++) { if (data[i].id == val) { sel.append('<option value="' + data[i].id + '" selected=true>' + data[i] .accountname + '</option>'); } else { sel.append('<option value="' + data[i].id + '">' + data[i].accountname + '</option>'); } } /// $("#state").html(data); } }); } function clear1() { document.getElementById("txtPatientName").value=""; document.getElementById("txtMobileNo").value=""; document.getElementById("txtAge").value=""; document.getElementById("ddlYears").value="Year"; document.getElementById("ddlGender").value="Male"; //document.getElementById("txtAppointmentDate").value=$date; document.getElementById("ddlDoctorName").value=""; document.getElementById("ddlpatienttype").value=""; document.getElementById("txtsuhid").value=""; document.getElementById("hdid").value=""; document.getElementById("hdappid").value=""; document.getElementById("ddlpatienttype").value="Yes"; $('#btnsave').text("SaveAppointment"); window.location.href="add_appointment.php"; } function saverefund() { var flag1= checkreceiveamount(); var flag = true; var inputField1 = document.getElementById("txtrefund"); if (inputField1.value == "") { flag = false; alert("Please enter refund amountr"); document.getElementById("txtrefund").focus(); return false; } if(flag1==true) { flag = false; return false; } var fileno = document.getElementById("hdfileno").value; var billtype = document.getElementById("txttype").value; var opddate = document.getElementById("txtdate").value; var amount = document.getElementById("txtamount").value; var discount = document.getElementById("txtdiscount").value; var netamount = document.getElementById("txtnetamount").value; var name = document.getElementById("txtpatientname").value; var refund = document.getElementById("txtrefund").value; var paymentmode = document.getElementById("cmbpaymentmode").value; var bank = document.getElementById("txtbank").value; var transaction = document.getElementById("txttransactionno").value; var btnopration = document.getElementById("btnsave").innerHTML; var text = "Do you want " + btnopration; if (confirm(text) == false) { flag = false; return false; } try { if (flag == true) { var urlgetcode = 'save_refund.php'; $.ajax({ method: 'POST', url: urlgetcode, data: '&fileno=' + fileno + '&opddate=' + opddate + '&amount=' + amount + '&discount=' + discount+'&netamount=' + netamount+'&name=' + name +'&refund=' + refund+'&paymentmode=' + paymentmode +'&bank=' + bank+'&transaction=' + transaction +'&billtype=' + billtype+'&btnopration=' + btnopration, dataType: 'json', async: true, cache: false, success: function(msg) { if (msg == "Record save successfully") { alert("Save Successfully"); window.location.href = "opd_list.php"; } else if (msg == "Refund already done") { alert("Refund already done"); } }, error: function(request) { alert(request.responseText); } }); } } catch (Error) { alert(Error); } return; } </script> <script> function showpatient() { var flag = true; var inputField1 = document.getElementById("txtsuhid"); if (inputField1.value == "") { flag = false; alert("Please enter uhid"); document.getElementById("txtsuhid").focus(); return false; } var uhid = document.getElementById("txtsuhid").value; try { if (flag == true) { var urlgetcode = 'get_patientdetails.php'; $.ajax({ method: 'POST', url: urlgetcode, data: '&suhid=' +uhid, dataType: 'json', async: true, cache: false, success: function(data) { if(data=="") { alert("No record found"); return; } $('#hdid').val(data.uhid); $('#txtPatientName').val(data.name); $('#txtMobileNo').val(data.mobile); $('#txtage').val(data.agey); $('#cmbyear').val(data.pntageyrs); $('#ddlGender').val(data.sex); }, error: function(request) { alert(request.responseText); } }); } } catch (Error) { alert(Error); } return; } // Get the modal var modal = document.getElementById("myModal"); // Get the button that opens the modal var btn = document.getElementById("myBtn"); var btnselect = document.getElementById("select"); // Get the <span> element that closes the modal var span = document.getElementsByClassName("close")[0]; // When the user clicks on the button, open the modal btn.onclick = function() { var table = $('#example').DataTable({ "ajax": "loadmaster_patient.php", "bPaginate": true, destroy: true, "bProcessing": true, "pageLength": 10, "columns": [{ mData: 'suhid' }, { mData: 'name' }, { mData: 'age' }, { mData: 'sex' }, { mData: 'mobile' }, { mData: 'address1' }, { mData: null, defaultContent: '<button class="btn btn-warning">Select</button>', targets: -1 } ] }); modal.style.display = "block"; table.on('click', 'button', function(e) { var currentRow = $(this).closest("tr"); var col1 = currentRow.find("td:eq(0)").text(); modal.style.display = "none"; document.getElementById("txtsuhid").value = col1; showpatient(); document.getElementById("ddlpatienttype").value = "No"; $("#ddlpatienttype").prop('disabled', true); }); } function isNumberKey(evt, element) { var charCode = (evt.which) ? evt.which : event.keyCode if (charCode > 31 && (charCode < 48 || charCode > 57) && !(charCode == 46 || charCode == 8)) return false; else { var len = $(element).val().length; var index = $(element).val().indexOf('.'); if (index > 0 && charCode == 46) { return false; } if (index > 0) { var CharAfterdot = (len + 1) - index; if (CharAfterdot > 3) { return false; } } } return true; } function refresh() { myModal.ajax.reload(); } function closemodalpopup(val) { modal.style.display = "none"; // getpatientdetails(val); showpatient(); } // When the user clicks on <span> (x), close the modal span.onclick = function() { modal.style.display = "none"; } // When the user clicks anywhere outside of the modal, close it window.onclick = function(event) { if (event.target == modal) { modal.style.display = "none"; } } </script>
Copyright © 2025 - UnknownSec