<?php

include 'load.php';

?>

<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=0">
    <meta name="description" content="POS - Eat More Resturant   | Pos & Invetory System | Dashboard">
    <meta name="keywords" content="Eat More Resturant   | Pos & Invetory System | Dashboard">
    <meta name="author" content="Eat More Resturant   | Pos & Invetory System | Dashboard">
    <meta name="robots" content="noindex, nofollow">

    <title>Booking Payments List | Eat More Resturant   | Pos & Invetory System | Dashboard</title>

<?php
require_once 'headercss.php';
?>

</head>

<body>

    <div class="main-wrapper">
<?php
require_once 'header.php';
?>

        <?php
require_once 'navbar.php';
?>

        <div class="page-wrapper">
            <div class="content">
                <div class="page-header">
                    <div class="page-title">
                        <h4>Booking Payments List</h4>
                        <h6>Manage your Payments</h6>
                    </div>
                    <div class="page-btn">
                        <a href="bookingsettlemet.php" class="btn btn-added"><img src="assets/img/icons/plus.svg" alt="img" class="me-1">Add New Payment</a>
                    </div>
                </div>

                <div class="card">
                    <div class="card-body">
                        <div class="table-top">

                        </div>
						
						</div>
		
<?php 
	if(isset($_GET['customer'])){
		$customer = $_GET['customer'];

		$search = "AND customer='$customer'";
	}else{
		$search = "";
	}
?>

<hr>
		
  
                        <div class="table-responsive">
<table class="table" id="betable">
                                <thead>
                                    <tr>
                                        <th>#</th>
										<th>Room</th>
                                        <th>Customer</th>
                                        <th>Payment</th>
                                        <th>Date</th>
                                       
                                    </tr>
                                </thead>
                                <tbody>
                                    <?php

										$count=0;

										$stmt = $DB_con->prepare('SELECT * FROM mobileroombookingpaments,mobileroombooking,mobileproducts,mobilecustomers WHERE mobileroombookingpaments.booking_id=mobileroombooking.rbid AND mobileroombooking.room=mobileproducts.prid AND mobilecustomers.coid=mobileroombooking.customer');

										$stmt->execute();

										if($stmt->rowCount() > 0)

										{

										while($row=$stmt->fetch(PDO::FETCH_ASSOC))

										{

										extract($row);

										$count++;

										?>
                                    <tr>
                                        <td><?php echo $row['mobileroombookingpaments_id']; ?></td>
                                        <td><?php echo $row['proname']; ?></td>
                                        <td><?php echo $row['cname']; ?></td>
                                        <td>Rs.<?php echo $row['pay_amount']; ?></td>
                                        <td><?php echo $row['added_date']; ?></td>
                                    </tr> 
<?php 
} 
}
?>
                                </tbody>
                            </table>
                        </div>
                       
                    </div>
                </div>
            </div>
        </div>

    </div>
    </div>
    </div>
	
<?php require_once 'footerjs2.php'; ?>

</body>
</html>