Server IP : 162.240.98.243 / Your IP : 18.118.151.255 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 : |
<?php include("dbconnection.php"); require_once('../../DBManager.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>"; } } if(isset($_POST['saveAmt'])) { for ($j = 0; $j < count($_POST['srno']); $j++) { $srno = $_POST['srno'][$j]; $discount = $_POST['discount']; $pricetotal1=$_POST['pricetotal1']; $price= $_POST['ConsumPrice'][$j]; $paymentmode= $_POST['paymentmode']; $action=$_POST['action']; $c = $price - ($price * ($discount / 100)); $today=date('Y-m-d'); $sql2="UPDATE consumable_slot SET discount='$discount',pricetotal='$c',UpgradeAmt='$c',price='$price',paymentmode='$paymentmode',action_consumable='$_POST[action]',saledate='$today' WHERE Con_Slot_id='$srno'"; $qsql2 = mysqli_query($con,$sql2); } } if(isset($_GET['Consumable_srno'])){ $CalAmt=$_POST['CalAmt']; $srno = $_GET['Consumable_srno']; $consumable_charge="UPDATE consumable_charge SET CalculateAmt='0',PaymenyStatus='Clear' WHERE srno='$srno'"; $qconsumable_charge = mysqli_query($con,$consumable_charge); if($qconsumable_charge==1){ echo "<script>alert('Paid successfully..');</script>"; echo "<script>window.location='showpage_consumable_invoice.php?prescriptionid=$_GET[prescriptionid]&patientid=$_GET[patientid]&srno=$_GET[Consumable_srno]'</script>;</script>"; } } if(isset($_POST['saveAmt'])){ for ($i = 0; $i < count($_POST['batchno']); $i++) { $ConsumableName= $_POST["ConsumableName"][$i]; $Category= $_POST["Category"][$i]; $qtyGiven= $_POST["qtyGiven"][$i]; $price= $_POST["ConsumPrice"][$i]; $updated_at=date("F d, Y / h:i:s A"); $created_at=date("F d, Y / h:i:s A"); $batchno= $_POST["batchno"][$i]; $HSN= $_POST["HSN"][$i]; $GSTfinal= $_POST["GSTfinal"][$i]; $gstper= $_POST["gstper"][$i]; $expireDate= $_POST["expireDate"][$i]; $DisPrice= $_POST["DisPrice"][$i]; $srno = $_POST['srno'][$i]; $Fprice = $_POST['ConFprice'][$i]; $invoice=mt_rand(1000,99999); $PaidAmt=$_POST['PaidAmt']; $typevisit=$_POST['typevisit']; $CalAmt=round($_POST['CalAmt']); $Consumable_id = $_POST['Consumable_id'][$i]; $inventory_id = $_POST['inventory_id'][$i]; $Fgst=$_POST['Con_Fgst'][$i]; $discount = $_POST['discount']; $res = $price - ($price * ($discount / 100)); $GST_res = $GSTfinal - ($GSTfinal * ($discount / 100)); $sql="INSERT INTO `consumable_charge`(`prescriptionid`, `patientid`, `hospitalid`, `consumable_id`,`ConsumableName`, `inventory_id`, `invoice_No`,`expireDate`, `Qty`, `price`,`discount`, `Category`, `batch_no`, `HSN_no`, `TotalAmt`, `FinalAmt`, `GST`, `GSTPercantage`, `DiscountPrice`, `PriceTotal1`, `GST_Total`, `GST_Final_Amt`, `PaymentMode`, `srno`, `srno2`, `CardHolder`, `CardNo`, `UPI_NO`, `Sale_date`, `PaidAmt`, `TypeVisit`, `CalculateAmt`, `FinalGST`, `PaymenyStatus`,`entered_by`, `created_at`, `updated_at`) VALUES ('$_GET[prescriptionid]', '$_GET[patientid]','$_POST[userno]','$Consumable_id','$ConsumableName','$inventory_id','$invoice','$expireDate','$qtyGiven','$price','$_POST[discount]','$Category','$batchno','$HSN','$_POST[TotalAmt]','$Fprice','$GSTfinal','$gstper','$res','$_POST[pricetotal1]','$GST_res','$_POST[ConsumableTotalGST]','$_POST[paymentmode]','$_POST[srno2]','$srno','$_POST[CardHolder]','$_POST[CardNumber]','$_POST[UPI_Number]','$_POST[saledate]','$PaidAmt','$typevisit','$CalAmt','$Fgst','$_POST[action]','$_POST[entered_by]','$created_at','$updated_at')"; echo $sql; $Con_result=mysqli_query($con,$sql); $last_id = $con->insert_id; } ?> <!-- /.card-header --> <div class="card-body"> <?php if($Con_result==1){ echo "<script>window.location='showpage_consumable_invoice.php?prescriptionid=$_GET[prescriptionid]&patientid=$_GET[patientid]&srno=$_POST[srno2]'</script>;</script>"; }else{ echo '<div class="alert"> <span class="closebtn">×</span> <strong>Not!</strong> Allowed. </div>'; } } ?> <?php $sqlMS = "SELECT * FROM consumable_slot WHERE prescriptionid='$_GET[prescriptionid]' AND action_consumable='Paid'"; $qMS = mysqli_query($con,$sqlMS); $rMS = mysqli_fetch_array($qMS); if($rMS['action_consumable']=='Paid'){ ?> <table> <thead> <th>Date & Time</th> <th>Invoice</th> <th>Towards</th> <th>Action</th> </thead> <tbody> <form method="post" enctype='multipart/form-data' <?php $medicine_charge="SELECT * FROM `consumable_charge` WHERE prescriptionid='$_GET[prescriptionid]' AND patientid='$_GET[patientid]' AND status='1'"; $QMc=mysqli_query($con,$medicine_charge); while($RowMc=mysqli_fetch_array($QMc)){ $sqlpatient = "SELECT * FROM consumable_slot WHERE prescriptionid='$RowMc[prescriptionid]' AND patientid='$RowMc[patientid]'"; $qsqlpatient = mysqli_query($con,$sqlpatient); if($rsp = mysqli_fetch_array($qsqlpatient)) { $site_users = "SELECT * FROM site_users WHERE userno='$rsp[entered_by]'"; $qSU = mysqli_query($con,$site_users); if($rSU = mysqli_fetch_array($qSU)){ ?> <tr> <td><?php echo $RowMc['created_at']; ?></td> <td><?php echo $RowMc['srno']; ?> <input type='hidden' name='srno' value='<?php echo $RowMc['srno']; ?>'> </td> <td> <lable> Sale</lable> <br> <?php if( $RowMc['TypeVisit']=='IPD'){ $ClaerAmt=$con->query("SELECT * FROM `consumable_charge` Where prescriptionid='$_GET[prescriptionid]' AND patientid='$_GET[patientid]' AND srno2='$RowMc[srno]'"); if($RowClearAmt=$ClaerAmt->fetch_assoc()){ ?> <b style='color:red;'> Due <?php echo $RowMc['CalculateAmt']; ?> <input type='hidden' name='CalculateAmt' value='<?php echo $RowMc['CalculateAmt']; ?>'> </b> <?php } } ?> </td> <td><?php echo "<a href='showpage_consumable_invoice.php?prescriptionid=$_GET[prescriptionid]&patientid=$_GET[patientid]&srno=$RowMc[srno]'><i class='fa fa-eye' aria-text='true' style='font-size:20px; color:orange;padding:10px'></i></a> "; ?> <?php if($RowMc['TypeVisit']=='IPD'){ $ClaerAmt=$con->query("SELECT * FROM `consumable_charge` Where PaymenyStatus='Due' AND prescriptionid='$_GET[prescriptionid]' AND patientid='$_GET[patientid]' AND srno2='$RowMc[srno]'"); if($RowClearAmt=$ClaerAmt->fetch_assoc()){ ?> <a href='billingset.php?Consumable_srno=<?php echo $RowMc['srno'] ?>&prescriptionid=<?php echo $_GET['prescriptionid'] ?>&patientid=<?php echo $_GET['patientid'] ?>' class='btn btn-info'>Pay</a> <?php } } ?> </td> </tr> <?php }}} ?> <!--<tr><td>Total Due</td><td>250</td></tr>--> <!--return data--> <?php $RetuneMedicine="SELECT * FROM `RetuneConsumable` WHERE PrescriptionId=$_GET[prescriptionid] AND PatientId=$_GET[patientid] AND Status='1'"; $QRM=mysqli_query($con,$RetuneMedicine); while($RowRM=mysqli_fetch_array($QRM)) { ?> <tr> <td><?php echo $RowRM['CreatedAt']; ?></td> <td><?php echo $RowRM['ReturnId']; ?></td> <td> <lable> Return</lable> </td> <td><?php echo "<a href='PaidReturnConsumable.php?ReturnId=$RowRM[ReturnId]&prescriptionid=$_GET[prescriptionid]&patientid=$_GET[patientid]'><i class='fa fa-eye' aria-text='true' style='font-size:20px; color:orange; padding:10px'></i></a> "; ?></td> </tr> <?php } ?> </tbody> </form> </table> <?php } ?> <br> <?php $sqlMS = "SELECT * FROM consumable_slot WHERE prescriptionid='$_GET[prescriptionid]' AND action_consumable='Disperse' "; $qMS = mysqli_query($con,$sqlMS); $rMS = mysqli_fetch_array($qMS); if($rMS['action_consumable']=='Disperse'){ ?> <table style='width:100%' class="table table-bordered table-hover"> <form method="post" enctype='multipart/form-data'> <table id="myTable" class="table table-bordered table-hover" style='width:100%;'> <thead style='width:100%;'> <tr> <th><strong>Created Towards</strong></th> <th><strong>Consumable Details</strong></th><th><strong>Batch Number</strong></th><th><strong>HSN Code</strong></th> <th><strong>Expiry Date</strong></th><th><strong>Quantity</strong></th><th><strong>MRP</strong></th> <th><strong>GST</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 consumable_slot WHERE prescriptionid='$_GET[prescriptionid]' AND action_consumable='Disperse' OR prescriptionid='$_GET[prescriptionid]' AND action_consumable='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 consumable_inventory WHERE Consumable_id='$rsp2[consumable_id]' AND batchno='$rsp2[batchno]'"; $qsql1 = mysqli_query($con,$sql1); while($rh1 = mysqli_fetch_array($qsql1)) { $sql191 ="SELECT * FROM consumable_stock WHERE Consumable_id='$rh1[Consumable_id]'"; $qsql191 = mysqli_query($con,$sql191); while($rh191 = mysqli_fetch_array($qsql191)) { $sizefinal=$rh1[mrp]/$rh191[Size]; $pricetotal1=$sizefinal*$rsp2[qtyGiven]; $pricetotal=round($pricetotal1); ?> <?php if($rsp2['action_consumable']=='Disperse' ){ echo " <tbody> <tr> <td> $rsp2[created_at] <br>$rsn[name] <input name='userno' class='name' type='hidden' value='$rsn[userno]' /><br> <input name='entered_by' class='name' type='hidden' value='$rsn[entered_by]' /><br> </td> <td> "; echo "<b></b>$rh191[ConsumableName] "; echo "<br> <b>"; $disGST=$pricetotal/100; $GSTfinal1=$disGST*$rh1[gst]; $GSTfinal=round($GSTfinal1) ; $GRANDTOTAL=$rsp2[pricetotal]; echo " <br> <b>"; echo" <input type='hidden' name='action' value='Paid'> <input type='hidden' id='srno' name='srno[]' value='$rsp2[Con_Slot_id]'> <input type='hidden' id='srno2' name='srno2' value='$rsp2[Con_Slot_id]'> <input class='DisPrice' id='DisPrice' type='hidden' name='DisPrice[]' value='$rsp2[pricetotal]'/> <input type='hidden' value='$rh1[Consumable_id]' name='Consumable_id[]'> <input type='hidden' value='$rh1[inventory_id]' name='inventory_id[]'> <input class='ConsumPrice' id='ConsumPrice$rsp2[consumable_id]' type='hidden' name='ConsumPrice[]' value='$pricetotal' style='color:red;'/> <input class='ConFprice' id='ConFprice$rsp2[consumable_id]' type='hidden' name='ConFprice[]' />"; ?> <script> $(document).on("change keyup blur", "#Con_chDiscount", function() { var Con_main21 = $('#ConsumPrice<?php echo $rsp2['consumable_id'] ?>').val(); var Con_disc21 = $('#Con_chDiscount').val(); var Con_dec21 = (Con_disc21 / 100).toFixed(2); //its convert 10 into 0.10 var Con_mult21 = Con_main21 * Con_dec21; // gives the value for subtract from main value var Con_discont21 = Con_main21 - Con_mult21; $('#ConFprice<?php echo $rsp2['consumable_id'] ?>').val(Con_discont21); }); </script> <input class='Con_Fgst' id='Con_Fgst<?php echo $rsp2['Con_Slot_id'] ?>' type='hidden' name='Con_Fgst[]' style='color:red;' /> <?php echo" <input name='ConsumableName[]' class='ConsumableName' type='hidden' value='$rh191[ConsumableName]' /> <input name='Category[]' class='Category' type='hidden' value='$rh191[Category]' /> <input name='qtyGiven[]' id='qty' class='qtyGiven' type='hidden' value='$rsp2[qtyGiven]' /> <input name='batchno[]' class='batchno' type='hidden' value='$rh1[batchno]' /> <input name='HSN[]' class='HSN' type='hidden' value='$rh1[HSN]' /> <input name='GSTfinal[]' id='Consumablegst$rsp2[Con_Slot_id]' class='Consumablegst' type='hidden' value='$GSTfinal' /> <input name='gstper[]' id='gstper' class='gstper' type='hidden' value='$rh1[gst]' /> <input name='expireDate[]' id='expireDate' class='expireDate' type='hidden' value='$rh1[expiryDate]' /> "; echo "</td> <td>$rh1[batchno]</td> <td>$rh1[HSN]</td> <td>$rh1[expiryDate]</td> <td>$rsp2[qtyGiven] </td><td>"; echo "$pricetotal"; echo "</td><td><b>$rh1[gst] % </b><br> $GSTfinal </td> <td>"; $consumable_charge="SELECT * FROM consumable_charge Where AND prescriptionid='$_GET[prescriptionid]' AND patientid='$_GET[patientid]' AND batch_no='$rh1[batchno]'"; $qconsumable_charge=mysqli_query($con,$consumable_charge); $RowMedicineCharge=mysqli_fetch_assoc($qconsumable_charge); $status=$RowMedicineCharge['status']; $batchNumber=$RowMedicineCharge['batch_no']; if($status == '1'){ echo "Paid"; } else{ echo "Due"; } echo "</td> <td><section class='content-header'>"; if($batchNumber == ''){ echo "<a href='billing.php?inventory_id=$rh1[inventory_id]&prescriptionid=$_GET[prescriptionid]&patientid=$_GET[patientid]&Con_Slot_id=$rh1[Con_Slot_id]&batchno=$rh1[batchno]&srno=$rsp2[srno]&mcid=$RowMedicineCharge[id]' ><i class='fa fa-pencil-square-o' style='font-size:30px;'></i></a>"; //echo "| <a href='medicinebill.php?prescriptionid=$rs[prescriptionid]&patientid=$rs[patientid]&srno=$rsp2[srno]' ><i class='fa fa-eye' style='font-size:30px;'></i></a>"; } else{ echo "<a href='add_medicine_qty.php?inventory_id=$rh1[inventory_id]&prescriptionid=$_GET[prescriptionid]&patientid=$_GET[patientid]&Con_Slot_id=$rh1[Con_Slot_id]&batchno=$rh1[batchno]&srno=$rsp2[srno]&mcid=$RowMedicineCharge[id]' >Return</a>"; } echo " <br> </section></td> </tr> "; } } } } } ?> </tbody> <?php ?> <tfoot> <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='CalAmt' id='Con_CalAmt' class='form-control' readonly placeholder='Due Amt' style='margin-top:140px;'>"; ?> </td> <?php } ?> <td colspan=7> <span style='float:right;'> <b>Gross Amt. :</b></span> <br> <span style='float:right;'> <b>GST . :</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='ConsumablePrice'></b></span> <div class=''> </div> <div class=''> <b><i class='fa fa-inr'></i> <span align='right' id='ConAddGST'></span></div> <input type='hidden' id='Con_cBalance'> <div class=''><span><input type='text' name='discount' id='Con_chDiscount' size='2' required></span></div> <div class=''> <input type='text' name='pricetotal1' size='2' id='Con_result' required style='margin-top:5px;' readonly></span></div> <div class=''> <input type='hidden' name='ConsumableTotalGST' size='2' id='ConsumableTotalGST' required style='margin-top:5px;'> <input type='hidden' name='saledate' size='2' id='' value='$date' required style='margin-top:5px;'></span></div> <div class='checkbox'> <select name='paymentmode'> <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='ConPaidAmt' class='form-control' placeholder='Amount' required> <input type='hidden' name='typevisit' value='$raddaspatient[typevisit]' class='form-control' readonly><br> "; } ?> <br> <br> </div> </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", "#Con_chDiscount", function() { var Con_main2 = $('#Con_GSTFinalAmt').val(); var Con_disc2 = $('#Con_chDiscount').val(); var Con_dec2 = (Con_disc2 / 100).toFixed(2); //its convert 10 into 0.10 var Con_mult2 = Con_main2 * Con_dec2; // gives the value for subtract from main value var Con_discont2 = Con_main2 - Con_mult2; $('#ConsumableTotalGST').val(Con_discont2); }); </script> <script> $(document).on("change keyup blur", "#Con_chDiscount", function() { var Con_main = $('#Con_cBalance').val(); var Con_disc = $('#Con_chDiscount').val(); var Con_dec = (Con_disc / 100).toFixed(2); //its convert 10 into 0.10 var Con_mult = Con_main * Con_dec; // gives the value for subtract from main value var Con_discont = Con_main - Con_mult; $('#Con_result').val(Con_discont); }); </script> <script> $(document).on("change keyup blur", "#ConPaidAmt", function() { var Con_Con_result = $('#Con_result').val(); var Con_PaidAmt = $('#ConPaidAmt').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 Con_DueAmt = Con_Con_result - Con_PaidAmt; $('#Con_CalAmt').val(Con_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="Contotal_value" name="TotalAmt" /> <input type="hidden" id="CosuableDisPrice" name="FinalAmt" /> <input type="hidden" id="Con_GSTFinalAmt" name="Con_GSTFinalAmt" /> </td> </tr> </tfoot> </table> <?php $consumable_slot = "SELECT * FROM consumable_slot WHERE prescriptionid='$_GET[prescriptionid]' AND patientid='$_GET[patientid]' AND action_consumable='Disperse'"; $qMS = mysqli_query($con,$consumable_slot); $rMS = mysqli_fetch_array($qMS); if($rMS['action']=='Disperse' ) ?> <b> <input id="addAll" type="submit" name="saveAmt" value="Pay" /><br /> </form> <?php } } ?> </table> <br> <script type="text/javascript" src="http://ajax.microsoft.com/ajax/jQuery/jquery-1.4.2.min.js"> </script> <script type="text/javascript"> $(function() { $("#addAll").click(function() { var add = 0; $(".ConsumPrice").each(function() { add += Number($(this).val()); }); // $("#val").text("Rs : " +add); $('#Contotal_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"), Con_sumVal = 0; $(".ConsumPrice").each(function() { Con_sumVal += Number($(this).val()); }); document.getElementById("ConsumablePrice").innerHTML = "" + Con_sumVal; $('#Contotal_value').val(Con_sumVal); // document.getElementById("NEWval").innerHTML = "" + sumVal; // $('#total_value2').val(sumVal); document.getElementById("ConsumablePrice").innerHTML = "" + Con_sumVal; $('#Con_result').val(Con_sumVal); document.getElementById("ConsumablePrice").innerHTML = "" + Con_sumVal; $('#Con_cBalance').val(Con_sumVal); console.log(Con_sumVal); </script> <script> ///////////////////Dis Price/////////////////// var table2 = document.getElementById("myTable"), Con_DissumVal = 0; $(".DisPrice").each(function() { Con_DissumVal += Number($(this).val()); }); document.getElementById("DisVal").innerHTML = "" + Con_DissumVal; $('#CosuableDisPrice').val(Con_DissumVal); console.log(Con_DissumVal); </script> <script> ////////////////////GST Final Value////////////////// var table3 = document.getElementById("myTable"), Con_sumGST = 0; $(".Consumablegst").each(function() { Con_sumGST += Number($(this).val()); console.log(Con_sumGST); }); document.getElementById("ConAddGST").innerHTML = "" + Con_sumGST; $('#Con_GSTFinalAmt').val(Con_sumGST) console.log(Con_sumGST); </script> <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/1.4.3/jquery.min.js"></script> <style> .alert { padding: 20px; background-color: #f44336; color: white; opacity: 1; transition: opacity 0.6s; margin-bottom: 15px; } .alert.success {background-color: #04AA6D;} .alert.info {background-color: #2196F3;} .alert.warning {background-color: #ff9800;} .closebtn { margin-left: 15px; color: white; font-weight: bold; float: right; font-size: 22px; line-height: 20px; cursor: pointer; transition: 0.3s; } .closebtn:hover { color: black; } </style>