<?php include("conn.php");?>
<?php include("common/head.php");?>
<?php
 if(isset($_POST["employee_ids"]))  
 {  
      $data=$_POST['employee_ids'];
  
      $sql = "SELECT * FROM inventory WHERE id = '".$_POST["employee_ids"]."'";  
      $result = mysqli_query($conn, $sql);  
      while ($row=mysqli_fetch_array($result)) {
        $data=$row['item_id'];
        $price=$row['price'];
        $item_name=$row['item_name'];
        $datein=$row['datein'];
        $supply=$row['supply'];
        $supply_contact=$row['supply_contact'];
        $brand=$row['brand'];
        $by=$row['by'];
        $quantity=$row['quantity'];
        $unit_value=$row['unit_value'];
        $unit=$row['unit'];
        $total=$unit_value*$price;

        $sql1="select * from users where id='$by' ";
        $result1 = mysqli_query($conn,$sql1)or die( mysqli_error($conn));
        $row1=mysqli_fetch_array($result1);
        $fname=$row1['fname'];
        $sname=$row1['sname'];

        $real_id=substr($data,-2);
     $ord = sprintf('%03d',$real_id);  

     $sql2="SELECT * FROM currency ";
     $result2 = mysqli_query($conn,$sql2)or die( mysqli_error($conn));
     $row2=mysqli_fetch_array($result2) ;
     $currency=$row2['curency'];
      }}
?>
<div class="reciept-title text-center">
                       <p style="font-size:20px;">Order Details</p>
                   
                   <p>Order Id: <?php echo $data ?></p>
                   <p>Date: <?php echo $datein ?></p>
<p>Item Name: <?php echo $item_name ?></p>
<p>Supplier: <?php echo $supply ?></p>
<p>Supplier Number: <?php echo $supply_contact ?></p>
<p>Bulk Quantity: <?php echo $unit_value." ".$unit ?></p>
<p>Per Cost: <?php echo $currency ."". number_format($price,2) ?></p>
<p>Total Cost: <?php echo $currency ."". number_format($total,2) ?></p>
<p>Bill Prepared By: <?php echo $fname." ".$sname ?></p>
</div>
<div class="activate-itme text-center m-5">


     </div>
