forked from matteveland/inventory_old
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstock_report.php
64 lines (51 loc) · 1.6 KB
/
stock_report.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
57
58
59
60
61
62
63
<?php
/**
* stock_report.php
*
* @package default
*/
$page_title = 'Stock Report';
require_once 'includes/load.php';
// Checkin What level user has permission to view this page
page_require_level(3);
$all_categories = find_all('categories');
if ( isset($_POST['update_category'] ) ) {
$products = find_products_by_category((int)$_POST['product-category']);
} else {
$products = join_product_table();
}
?>
<?php include_once 'layouts/header.php'; ?>
<div class="row">
<div class="col-md-6">
<?php echo display_msg($msg); ?>
</div>
</div>
<div class="row">
<div class="col-md-6">
<div class="panel">
<div class="panel-heading">
</div>
<div class="panel-body">
<form class="clearfix" method="post" action="stock_report_process.php">
<div class="form-group">
<label class="form-label">Category</label>
<div class="input-group">
<select class="form-control" name="product-category">
<option value="">All Categories</option>
<?php foreach ($all_categories as $cat): ?>
<option value="<?php echo (int)$cat['id'] ?>">
<?php echo $cat['name'] ?></option>
<?php endforeach; ?>
</select>
</div>
<div class="form-group">
<button type="submit" name="submit" class="btn btn-primary">Generate Report</button>
</div>
</div>
</form>
</div>
</div>
</div>
</div>
<?php include_once 'layouts/footer.php'; ?>