<?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>Sales Receipt | 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 Receipt</h4>
<h6>your Sales Receipt</h6>
</div>
</div>

<div class="container" style="max-width: 40rem;">
				<div class="card">
				<div class="card-body">
				<div class="row">

<?php 
	
if (isset($_GET['order_id']))	
{
	
$order_id=$_GET['order_id'];

$stmt = $DB_con->prepare("SELECT o.order_id,o.pay_option,o.amount,o.card_no,o.customer,o.user_id,o.create_at,o.status ostatus,t.tempid,t.orderid torderid,t.proid,t.pro_price,t.pro_dis,t.pro_qty,t.user_id tuser_id FROM mobileorders o INNER JOIN mobiletemporarycart t ON o.order_id=t.orderid  WHERE o.order_id='".$_GET['order_id']."' group BY o.order_id DESC");

$stmt->execute();

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

{

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

{

extract($row);

?>
								<?php

								$stmt2 = $DB_con->prepare('SELECT * FROM mobilesettings where status="1" ORDER BY stid');

								$stmt2->execute();

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

								{

								while($row2=$stmt2->fetch(PDO::FETCH_ASSOC))

								{

								extract($row2);

								?>
								<div class="col-lg-2 col-sm-2 col-12">			
								<p class="text-center" style="font-weight;color:#2ecc40;"><?php if($row2['systemlogo']==""){$pro_img="assets/img/empty.png";}else{$pro_img="images/settings/".$row2['systemlogo'];} ?>
								<img src="<?php echo $pro_img; ?>" alt="<?php echo $row2['systemname']; ?>" style="width:120px;" /></p>
								</div>
								<div class="col-lg-10 col-sm-10 col-12">			
								<h3 class="text-center" style="font-weight:bold;color:#000000;">Friendly Paws - Animal Hostpital</h3>
								</div>
								<div class="col-lg-12 col-sm-12 col-12">
								<hr>
								<h3 class="text-center" style="font-weight:bold;color:#2ecc40;">Receipt Bill</h3>
								</div>
								<?php 
								} 
								}
								?>
								<hr>
								<div class="col-lg-4 col-sm-4 col-12">			
								<h6 class="text-center" style="font-weight:600;color:#000000;">Appointment No : </h6>
								</div>
								<div class="col-lg-8 col-sm-8 col-12">			
								<h6 class="text-center" style="font-weight:600;color:#000000;">Appointment Date/Time : </h6>
								</div>
								<hr>
								<div class="col-lg-5 col-sm-5 col-12">			
								<h5 class="text-left" style="font-weight:bold;color:#000000;text-decoration: underline;">Patient</h5>
								<h5 class="text-left" style="font-weight:bold;color:#000000;"></h5>
								</div>
								<div class="col-lg-4 col-sm-4 col-12">	
								<h5 class="text-right" style="font-weight:bold;color:#000000;text-decoration: underline;">Channel Doctor</h5>
								<h5 class="text-right" style="font-weight:bold;color:#000000;">
											  <br>
											  </h5>
								</div>
								<div class="col-lg-3 col-sm-3 col-12">			
								<h6 class="text-center" style="font-weight:bold;color:#000000;text-decoration: underline;">Type Of Pets</h6>
								<h6 class="text-center" style="font-weight:bold;color:#000000;"><</h6>
								</div>
								<hr>
								<div class="col-lg-6 col-sm-6 col-12">			
								<h6 class="text-left" style="font-weight:bold;color:#000000;">Species : </h6>
								</div>
								<div class="col-lg-6 col-sm-6 col-12">			
								<h6 class="text-center" style="font-weight:bold;color:#000000;">Services : </h6>
								</div>
								<hr>
								<div class="col-lg-12 col-sm-12 col-12">			
								<h5 class="text-center" style="font-weight:bold;color:#000000;text-decoration: underline;">Reason For Visit</h5>
								<p class="text-center" style="font-weight:bold;color:#000000;"></p>
								</div>
								<hr>
								<div class="col-lg-12 col-sm-12 col-12">			
								<h6 class="text-center" style="font-weight:600;color:#000000;">Bill Date/Time : </h6>
								<br>
								<h2 class="text-center">THANK YOU!</h2>
								</div>
					

					<div class="row mt-4">
						<a class="btn btn-secondary col-md-4" href="home.php">BACK TO HOME</a>
						<button class="btn btn-success col-md-8" onclick="printDiv('printableArea')">PRINT POS</button>
					</div>
					
					<div id="printableArea" style="display:none;">
					
					<?php

								$stmt2 = $DB_con->prepare('SELECT * FROM mobilesettings where status="1" ORDER BY stid');

								$stmt2->execute();

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

								{

								while($row2=$stmt2->fetch(PDO::FETCH_ASSOC))

								{

								extract($row2);

								?>
								<div class="col-lg-2 col-sm-2 col-12">			
								<p class="text-center" style="font-weight;color:#2ecc40;"><?php if($row2['systemlogo']==""){$pro_img="assets/img/empty.png";}else{$pro_img="images/settings/".$row2['systemlogo'];} ?>
								<img src="<?php echo $pro_img; ?>" alt="<?php echo $row2['systemname']; ?>" style="width:120px;" /></p>
								</div>
								<div class="col-lg-10 col-sm-10 col-12">			
								<h3 class="text-center" style="font-weight:bold;color:#000000;">Friendly Paws - Animal Hostpital</h3>
								</div>
								<div class="col-lg-12 col-sm-12 col-12">
								<hr>
								<h3 class="text-center" style="font-weight:bold;color:#2ecc40;">Receipt Bill</h3>
								</div>
								<?php 
								} 
								}
								?>
								<hr>
								<div class="col-lg-4 col-sm-4 col-12">			
								<h6 class="text-center" style="font-weight:600;color:#000000;">Appointment No : </h6>
								</div>
								<div class="col-lg-8 col-sm-8 col-12">			
								<h6 class="text-center" style="font-weight:600;color:#000000;">Appointment Date/Time : </h6>
								</div>
								<hr>
								<div class="col-lg-5 col-sm-5 col-12">			
								<h5 class="text-left" style="font-weight:bold;color:#000000;text-decoration: underline;">Patient</h5>
								<h5 class="text-left" style="font-weight:bold;color:#000000;"></h5>
								</div>
								<div class="col-lg-4 col-sm-4 col-12">	
								<h5 class="text-right" style="font-weight:bold;color:#000000;text-decoration: underline;">Channel Doctor</h5>
								<h5 class="text-right" style="font-weight:bold;color:#000000;">
											  <br>
											  </h5>
								</div>
								<div class="col-lg-3 col-sm-3 col-12">			
								<h6 class="text-center" style="font-weight:bold;color:#000000;text-decoration: underline;">Type Of Pets</h6>
								<h6 class="text-center" style="font-weight:bold;color:#000000;"><</h6>
								</div>
								<hr>
								<div class="col-lg-6 col-sm-6 col-12">			
								<h6 class="text-left" style="font-weight:bold;color:#000000;">Species : </h6>
								</div>
								<div class="col-lg-6 col-sm-6 col-12">			
								<h6 class="text-center" style="font-weight:bold;color:#000000;">Services : </h6>
								</div>
								<hr>
								<div class="col-lg-12 col-sm-12 col-12">			
								<h5 class="text-center" style="font-weight:bold;color:#000000;text-decoration: underline;">Reason For Visit</h5>
								<p class="text-center" style="font-weight:bold;color:#000000;"></p>
								</div>
								<hr>
								<div class="col-lg-12 col-sm-12 col-12">			
								<h6 class="text-center" style="font-weight:600;color:#000000;">Bill Date/Time : </h6>
								<br>
								<h2 class="text-center">THANK YOU!</h2>
								</div>
					</div>
					
					<?php 
					} 
					}
					}
					?>
			</div>
			</div>
			</div>	
        </div>

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


<script src="https://cdnjs.cloudflare.com/ajax/libs/Dropify/0.2.2/js/dropify.min.js" integrity="sha512-8QFTrG0oeOiyWo/VM9Y8kgxdlCryqhIxVeRpWSezdRRAvarxVtwLnGroJgnVW9/XBRduxO/z1GblzPrMQoeuew==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>

<script>

function printDiv(printableArea){
	
var printContents = document.getElementById(printableArea).innerHTML;
var originalContents = document.body.innerHTML;

document.body.innerHTML = printContents;

window.print();

document.body.innerHTML = originalContents;

}

</script>

<script src="assets/js/jquery-3.6.0.min.js"></script>

<script src="assets/js/feather.min.js"></script>

<script src="assets/js/jquery.slimscroll.min.js"></script>

<script src="assets/js/jquery.dataTables.min.js"></script>
<script src="assets/js/dataTables.bootstrap4.min.js"></script>

<script src="assets/js/bootstrap.bundle.min.js"></script>

<script src="assets/plugins/select2/js/select2.min.js"></script>

<script src="assets/plugins/sweetalert/sweetalert2.all.min.js"></script>
<script src="assets/plugins/sweetalert/sweetalerts.min.js"></script>

<script src="assets/js/script.js"></script>
</body>
</html>