<?php include("conn.php");?>
<?php include("common/head.php");?>
<?php
 if(isset($_POST["employee_ids"]))  
 {  
      $data=$_POST['employee_ids'];
      $page=$_POST['page'];
  
      $sql = "SELECT * FROM orders_details WHERE orderid = '".$_POST["employee_ids"]."'";  
      $result = mysqli_query($conn, $sql);  
      while ($row=mysqli_fetch_array($result)) {
        $data=$row['orderid'];
        $contact=$row['contact'];
        $customer_name=$row['costomer_name'];
        $price=$row['amount'];
        $status=$row['status'];
        $date=$row['date'];
        $payment_method=$row['payment_method'];
        $total=$row['amount'];

        $data_encode=base64_encode($data);

       


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

      }}



?>
<div class="activate-itme  m-5">
  <h4 class="text-center">Payment Confirmation</h4>
  <h6>I <?php echo $by ?> Confirms the payment of <?php echo $currency."".number_format($price,2)?> </h6>
     <form   method="post" class="text-dark">
                <div class="form-group">
                  <label for="exampleFormControlInput1">Customer Name</label>
                  <input type="text" class="form-control" name="name" id="exampleFormControlInput1" value="<?php echo $customer_name?>"  disabled>
                  <input type="hidden" name="by" value="<?php echo $by ?>">
                </div>
  
                <div class="form-group">
                  <label for="exampleFormControlInput1">Amount Payable </label>
                  <input type="text" class="form-control" value="<?php echo 'GHC'."".number_format($price,2)?>" name="price" id="exampleFormControlInput1" disabled>
                </div>

                
                <input type="hidden" name="id" value="<?php echo $data_encode ?>">
                <input type="hidden" name="date" value="<?php echo date("F j, Y") ?>">
                
                  <button class="btn btn-success btn-sm"  name="submit">Confirm Payment</button>
        <a href="<?php echo $page ?>" class=" btn btn-secondary btn-sm m-2">Cancel</a>
    </form>


     </div>
