-
Notifications
You must be signed in to change notification settings - Fork 0
/
deliverReport.php
79 lines (77 loc) · 2.9 KB
/
deliverReport.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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
<!DOCTYPE html>
<html lang="en" dir="ltr">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Easy System : Deliver Report</title>
<link rel="stylesheet" href="./res/css/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/v/bs4/jszip-2.5.0/dt-1.10.18/b-1.5.2/b-flash-1.5.2/b-html5-1.5.2/b-print-1.5.2/r-2.2.2/datatables.min.css"/>
</head>
<body>
<?php
require_once './tasks/checkSession.php';
require_once './res/content/navBar.php';
?>
<div class="container">
<div class="row">
<div class="col-md-12">
<div class="pb-2 mt-4 mb-2 border-bottom">
<h2>Deliver Report</h2>
</div>
</div>
</div>
<div class="row">
<div class="col-md-12">
<table class="table table-bordered">
<thead>
<tr>
<th>Item ID</th>
<th>Location</th>
<th>Deliver Date & Time</th>
<th>Deliver Note</th>
<th>MRN</th>
<th>Qty</th>
</tr>
</thead>
<tbody>
<?php
require_once("./setup/config.php");
$result=mysqli_query($link,"SELECT stock.itemID, d.location, d.dateTime, d.qty, d.dNote, d.mrn, d.location FROM item_stock stock, item_delivered d WHERE stock.itemID = d.itemID");
while ($row=mysqli_fetch_array($result)) {
echo '<tr>';
echo '<td>' . $row['itemID'] . '</td>';
echo '<td>' . $row['location'] . '</td>';
$dateTime= new DateTime($row['dateTime']);
$dateTime->setTimezone(new DateTimeZone('Asia/Colombo'));
$lkDateTime = $dateTime->format('Y-m-d - g:i A');
echo '<td>' . $lkDateTime . '</td>';
echo '<td>' . $row['dNote'] . '</td>';
echo '<td>' . $row['mrn'] . '</td>';
echo '<td>' . $row['qty'] . '</td>';
echo '</tr>';
}
mysqli_close($link);
?>
</tbody>
</table>
</div>
</div>
</div>
<!-- scripts -->
<script src="./res/js/jquery-3.3.1.min.js" charset="utf-8"></script>
<script src="./res/js/bootstrap.min.js" charset="utf-8"></script>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.36/pdfmake.min.js"></script>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.36/vfs_fonts.js"></script>
<script type="text/javascript" src="https://cdn.datatables.net/v/bs4/jszip-2.5.0/dt-1.10.18/b-1.5.2/b-flash-1.5.2/b-html5-1.5.2/b-print-1.5.2/r-2.2.2/datatables.min.js"></script>
<script type="text/javascript">
// data table settings
$(document).ready(function() {
$('.table').DataTable( {
dom: 'Bfrtip',
buttons: ['pdf','excel','print'],
responsive: true
} );
} );
</script>
</body>
</html>