<?php
include("../db/cn.php");
$order_id = $_GET['order_id'];
$res = mysqli_query($connection, "SELECT * FROM log_user_sales WHERE order_id='$order_id' AND status='refund'");
?>
<!DOCTYPE html>
<html>
<head>
<title>Refund Details</title>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
</head>
<body class="bg-light">
<div class="container mt-5">
<h3 class="mb-4">Refund Details for Order #<?= $order_id; ?></h3>
<table class="table table-bordered bg-white text-center">
<thead class="table-dark">
<tr>
<th>Product Name</th><th>Quantity</th><th>Amount (Rs)</th><th>Date</th>
</tr>
</thead>
<tbody>
<?php while($row = mysqli_fetch_assoc($res)) { ?>
<tr>
<td><?= $row['product_name']; ?></td>
<td><?= $row['product_quantity']; ?></td>
<td><?= $row['net_amount']; ?></td>
<td><?= $row['date_time']; ?></td>
</tr>
<?php } ?>
</tbody>
</table>
<a href="report_r.php" class="btn btn-dark">Back to Report</a>
</div>

    <link rel="stylesheet" href="../css/responsive-mobile.css">
    <script src="../js/responsive-mobile.js"></script>
</body>
</html>
