D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
home3
/
encodto1
/
salvation.incrediblebengal.com
/
admin
/
Filename :
view_table_order.php
back
Copy
<?php include'config.php'; include'get_session_access.php'; include'function.php'; $page_title = "Customer Order Details."; $customer_phone = $_GET['cust_phone']; $order_date = $_SESSION['order_date'] = $_GET['order_date']; $order_id = $_GET['order_id']; // echo $customer_phone, $order_date; ?> <!DOCTYPE html> <html lang="en"> <head> <title>Print Order Details || Encode Restro </title> <?php include'style.php'; ?> </head> <body style=""> <div id="main-wrapper"> <div class=""> <div class="container py-2 px-5"> <div class="row"> <div class="col-xl-12 col-xxl-12 col-md-12"> <div class="row gx-0"> <div class="col-xl-12 col-md-12 col-sm-12 col-xs-12"> <div class="btn-group mb-3 float-right"> <a class="btn pdf_bttn px-5 py-2 fs-16" href="print-pdf/print-dineIn-order.php">Print PDF</a> </div> </div> <div class="col-xl-12 col-md-12 col-sm-12 col-xs-12"> <div class="card customer_details_card" id="customer_details"> <?php $t_amount = 0; $view_cust_info = mysqli_query($conn, "SELECT * FROM customer_details WHERE customer_phone = '$customer_phone'"); $res = mysqli_fetch_assoc($view_cust_info); $_SESSION['customer_phone'] = $res['customer_phone']; $_SESSION['customer_name'] = $res['customer_name']; ?> <ul class="list-inline"> <li class="list-inline-item border-bottom"> <div class="media align-items-center p-0"> <div class="media-body"> <h4 class="mb-0" style="background: #da477cc9;color: #fff;display: table;padding: 7px 50px 7px 15px;"><svg class="mr-2" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="#fff" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M5.52 19c.64-2.2 1.84-3 3.22-3h6.52c1.38 0 2.58.8 3.22 3"/><circle cx="12" cy="10" r="3"/><circle cx="12" cy="12" r="10"/></svg> <?php echo $res['customer_name'];?> </h4> </div> </div> </li> <li class="list-inline-item border-bottom"> <div class="media align-items-center"> <svg class="mr-2" xmlns="http://www.w3.org/2000/svg" width="13" height="13" viewBox="0 0 24 24" fill="none" stroke="#000000" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z"></path></svg> <h4 class="mb-0 text-black fs-13"> <?php echo $customer_phone; ?></h4> </div> </li> <li class="list-inline-item border-bottom"> <div class="media align-items-center"> <svg class="mr-2" xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="#49545e" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="10" r="3"/><path d="M12 21.7C17.3 17 20 13 20 10a8 8 0 1 0-16 0c0 3 2.7 6.9 8 11.7z"/></svg> <h4 class="mb-0 text-black fs-13">Siliguri</h4> </div> </li> <li class="list-inline-item border-bottom"> <div class="media align-items-center"> <svg class="mr-2" xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="#49545e" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="10"/><path d="M16.2 7.8l-2 6.3-6.4 2.1 2-6.3z"/></svg> <h4 class="mb-0 text-black fs-13">Post Office</h4> </div> </li> </ul> <div class="card-header"> <h4>Order Description: </h4> </div> <div class="card-body p-0"> <div class="table-responsive order-list"> <table class="table items-table customer_item_table mb-0"> <tbody> <tr style="background:#c3c3c3;color:#fff;line-height:1;"> <th class="my-0 font-w500 fs-16">Items</th> <th class="my-0 font-w500 fs-16">Qty</th> <th class="my-0 font-w500 fs-16">Price</th> <th class="my-0 font-w500 fs-16">Sub Total</th> </tr> <?php $orderList = mysqli_query($conn, "SELECT * FROM dinein_order_items WHERE customer_phone = '$customer_phone' AND order_id= '$order_id'"); while($row = mysqli_fetch_assoc($orderList)){ $food_name = $row['food_name']; ?> <tr> <td><?php echo $row['food_name']; ?></td> <td><?php echo $row['food_qty'] ?> X</td> <td><i class="fa fa-inr"></i> <?php echo $row['food_price'] ?></td> <td><i class="fa fa-inr"></i> <?php echo $row['food_subtotal'] ?></td> </tr> <?php } ?> <tr> <?php $view_dine_data = mysqli_query($conn, "SELECT * FROM dinein_order WHERE customer_phone = '$customer_phone' AND order_date = '$order_date'"); $rec = mysqli_fetch_assoc($view_dine_data); $table_id = $_SESSION['tableId'] = $rec['table_id']; $t_amount = $_SESSION['sum_amount'] = $rec['total_payment']; ?> <td class="text-dark font-w600 fs-20" style="margin:0;font-size:15px;font-weight:600;" colspan="3">Price Amount</td> <td class="text-dark font-w600 fs-20"><i class="fa fa-inr"></i> <?php echo $rec['total_payment']; ?></td> </tr> </tbody> </table> <table class="table items-table customer_item_table mb-0"> <tbody><tr style="background:#c3c3c3;color:#fff;line-height:1;"> <th style="width: 55%;" class="my-0 font-w500 fs-16">GST Rate</th> <th style="width: 15%;" class="my-0 font-w500 fs-16">Price Amount</th> <th style="width: 15%;" class="my-0 font-w500 fs-16">GST Amount</th> </tr> <?php $gstRate = $_SESSION['gstRate'] = 5; $gstAmount = $t_amount * $gstRate/100; $totalAmt = $t_amount + $gstAmount; ?> <tr> <td> <h4 class="my-0 text-secondary font-w600 fs-16" style="margin:0;font-size:15px;font-weight:600;"><?php echo $gstRate; ?>%</h4> </td> <td> <h4 class="my-0 text-secondary font-w600 fs-16" style="margin:0;font-size:15px;font-weight:600;"><i class="fa fa-inr"></i> <?php echo $t_amount; ?></h4> </td> <td> <h4 class="my-0 text-secondary font-w600 fs-16" style="margin:0;font-size:15px;font-weight:600;"><i class="fa fa-inr"></i> <?php echo $gstAmount; ?></h4> </td> </tr> <tr> <td class="text-dark font-w500 fs-18" style="margin:0;font-size:15px;font-weight:600;" colspan="2">Price Amount</td> <td class="text-dark font-w600 fs-18"><i class="fa fa-inr"></i> <?php echo $totalAmt; ?></td> </tr> </tbody> </table> </div> </div> </div> </div> </div> </div> </div> </div> </div> <?php include'footer.php'; ?> </body> </html>