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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
|
<!DOCTYPE html> <html> <head> <?php require_once '../include/head.php'; ?> <?php require_once '../include/checkuser.php'; ?> <?php require_once '../include/Nav_bar.php'; ?> <?php include_once '../include/DBConnect.php'; ?> <script> $(function() { $('.date-picker').datetimepicker({pickTime: false}); $('.stun').select2(); }); </script> </head> <?php $invoice_id; $startdate = date('Y-m-d'); $enddate = date('Y-m-d'); $today = date('Y-m-d'); ?> <body> <!-- line between nav bar and content --> <div class="text-right"> <ul class="breadcrumb"> <li class="active">Receipt</li> </ul> </div>
<div class="container-fluid pathways-container"> <div> <table border="0" width="100%"> <tr> <td><h2>Receipt</h2></td> <td><a href="receipt_search.php" class="btn pull-right"><i class="icon-plus"></i> Add</a></td> </tr> </table> </div> <div class="pathways-search"> <form id="search_form" class="form-inline" action="" method="POST"> <div class="pathways-inline-block"> <label class="">Date</label> <div class="input-append date-picker"> <input id="start_date" class="dateISO" type="text" maxlength="200" data-format="yyyy-MM-dd" name="startdate" value="<?php if (isset($_POST['go'])) echo $_POST['startdate']; else echo $startdate; ?>" style="width:90px" required> <span class="add-on"> <i class="icon-calendar" data-date-icon="icon-calendar" data-time-icon="icon-time"></i> </span> </div>
<label class="" >To</label> <div class="input-append date-picker"> <input id="end_date" class="dateISO" type="text" maxlength="200" data-format="yyyy-MM-dd" name="enddate" value="<?php if (isset($_POST['go'])) echo $_POST['enddate']; else echo $enddate; ?>" style="width:90px" required> <span class="add-on"> <i class="icon-calendar" data-date-icon="icon-calendar" data-time-icon="icon-time"></i> </span> </div> </div> <div class="pathways-inline-block"> <button class="btn" name="go" value="go" style="margin-left:30px" type="submit">Search</button> </div> </form> </div> <?php if (isset($_POST['go'])) { $startdate = $_POST['startdate']; $enddate = $_POST['enddate']; $Tdata = false; ?> <form id="search_form" class="form-inline" action="" method="POST"> <table class="table table-striped table-bordered table-hover table-condensed" id="tablehead"> <thead> <tr> <th style="min-width:50px; width:5%"></th> <th style="min-width:50px; width:5%">Type</th> <th style="min-width:50px;">Receipt_Code</th> </tr> </thead> <tbody> <?php $query = "select receipt_id, receipt_code, is_normal from receipt where deleted = 0 and receipt_date between '$startdate' and '$enddate' "; $result = $dbh->query($query); $result->setFetchMode(PDO::FETCH_OBJ); while ($row = $result->fetch()) { $Tdata = true; ?> <tr> <td> <div class="btn-group" data-toggle="buttons"> <a href="receipt_View.php?id=<?= $row->receipt_id ?>" class="btn"><i class="icon-eye-open"></i> View</a> <!--a href="receipt_Edit.php?id=<?php // $row->receipt_id ?>" class="btn">Edit</a--> </div> </td> <td> <h5><?php if($row->is_normal == 0) echo 'normal'; else echo'C C'; ?></h5> </td> <td> <h5><?= $row->receipt_code ?></h5> </td> </tr> <?php } if ($Tdata == FALSE) { ?> <tr><td colspan = "5"><h5>No Receipt searched</h5></td></tr> <?php } ?> </tbody> </table> </form> <?php } ?> </div> <!-- /container --> </body> </html>
|