forked from siamon123/warehouse-inventory-system
-
Notifications
You must be signed in to change notification settings - Fork 0
/
sales.php
55 lines (55 loc) · 1.92 KB
/
sales.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
<?php
require_once('includes/load.php');
if (!$session->isUserLoggedIn(true)) { redirect('index.php', false);}
?>
<?php
$name = "iphone";
$sales = find_all_sale();
?>
<?php include_once('layouts/header.php'); ?>
<div class="row">
<div class="col-md-12">
<div class="panel panel-default">
<div class="panel-heading clearfix">
<div class="pull-right">
<a href="add_sale.php" class="btn btn-primary">Add sale</a>
</div>
</div>
<div class="panel-body">
<table class="table table-bordered table-striped">
<thead>
<tr>
<th> Id </th>
<th> Product name </th>
<th> Quantity sold</th>
<th> Price </th>
<th> Date </th>
<th> Actions </th>
</tr>
</thead>
<tbody>
<?php foreach ($sales as $sale):?>
<tr>
<td><?php echo (int)$sale['id']; ?></td>
<td><?php echo remove_junk($sale['name']); ?></td>
<td><?php echo (int)$sale['qty']; ?></td>
<td><?php echo remove_junk($sale['price']); ?></td>
<td><?php echo remove_junk($sale['date']); ?></td>
<td>
<a href="edit_sale.php?id=<?php echo (int)$sale['id'];?>" class="btn btn-warning btn-xs" title="Edit">
<span class="glyphicon glyphicon-edit"></span>
</a>
<a href="delete_categorie.php?id=<?php echo (int)$sale['id'];?>" class="btn btn-danger btn-xs" title="Edit">
<span class="glyphicon glyphicon-trash"></span>
</a>
</td>
</tr>
<?php endforeach;?>
</tbody>
</table>
</div>
<div class="panel-footer"></div>
</div>
</div>
</div>
<?php include_once('layouts/footer.php'); ?>