<?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 - Pos & Invetory Systems">
<meta name="keywords" content="Pos & Invetory Systems">
<meta name="author" content="Pos & Invetory Systems">
<meta name="robots" content="noindex, nofollow">

<title>Sales Return List | Eat More Resturant   | Pos & Invetory System | Dashboard</title>


<?php
require_once 'headercss.php';
?>
</head>
<body>
<div id="global-loader">
<div class="whirly-loader"> </div>
</div>

<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>Sales Return List</h4>
<h6>Manage your Returns</h6>
</div>
<div class="page-btn">
<a href="createsales_return.php" class="btn btn-added"><img src="assets/img/icons/plus.svg" alt="img" class="me-2">Add New Sales Return</a>
</div>
</div>

<div class="table-responsive">
<table class="table" id="betable">
<thead>
<tr>
<th>#ID</th>
<th>Action</th>
<th>Return No</th>
<th>Bill No</th>
</tr>
</thead>
<tbody>
<?php

  $count=0;
  
  $sql = "SELECT * FROM tbl_return  ORDER BY return_id DESC";
  $rs=$conn->query($sql);
  while($row =$rs->fetch_array())
  {
	// print_r($row);
    $return_id = $row['return_id'];
    $order_id = $row['order_id'];

    // $GOsql = "SELECT * FROM mobileorders WHERE order_id ='$order_id'";
	//   $GOrs=$conn->query($GOsql);
	//   if($GOrow =$GOrs->fetch_array())
	//   {
	//     $orid = $GOrow[1];
	//   }
	
	$count++;
	
?>
<tr>
			<td><?php echo number_format($count,0); ?></td>
			<td><a href="returnreciept.php?rno=<?php echo $order_id; ?>" class="btn btn-danger btn-sm">View</a></td>
			<td><?php echo $return_id; ?></td>
			<td><?php echo $order_id; ?></td>
		</tr>

		<?php } ?>

</tbody>
</table>
</div>
</div>
</div>

</div>
</div>
</div>

<?php require_once 'footerjs.php'; ?>
	
</body>
</html>