-
Notifications
You must be signed in to change notification settings - Fork 0
/
Inventory_cashierpage.php
56 lines (49 loc) · 1.29 KB
/
Inventory_cashierpage.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
<?php
session_start();
//include 'navigation.php';
include 'connection.php';
$date= date('Y-m-d', strtotime('-7 days'));
$conn=connect();
$sql= "SELECT * from products WHERE updated_at>'$date'";
$prod=$conn->query($sql);
$sql= "SELECT COUNT(*) as products FROM products";
$total_products= mysqli_fetch_assoc($conn->query($sql));
$sql= "SELECT SUM(quantity) as total_bought FROM products";
$total_bought= mysqli_fetch_assoc($conn->query($sql));
$sql= "SELECT SUM(sold) as total_sold FROM products";
$total_sold= mysqli_fetch_assoc($conn->query($sql));
$stock_available= $total_bought['total_bought']-$total_sold['total_sold'];
?>
<html>
<head>
<title> </title>
<link rel="stylesheet" type="text/css" href="style1.css">
<style>
body {
background-color: lightblue;
}
</style>
</head>
<body>
<table class="styled-table">
<thead>
<tr>
<!-- <th>Name</th>
<th>Points</th> -->
<caption> <h1> Inventory </h1> </caption>
</tr>
</thead>
<tbody>
<tr>
<td>Dom</td>
<td>6000</td>
</tr>
<tr class="active-row">
<td>Melissa</td>
<td>5150</td>
</tr>
<!-- and so on... -->
</tbody>
</table>
</body>
</html>