-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathsrch_bill.php
51 lines (45 loc) · 1.84 KB
/
srch_bill.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
<?php
// echo $name = $_POST['name']; die;
require 'config.php';
$conn = connection();
if(isset($_POST['name']) && $_POST['name']!=""){
$condition.=" and bill_name like '".$_POST['name']."%'";
}
if(isset($_POST['bill']) && $_POST['bill']!=""){
$condition.=" and bill_id = ".$_POST['bill']."";
}
$sql = "SELECT * FROM bill_records WHERE 0=0 ". $condition ." ORDER BY bill_entrydt DESC";
$data = $conn->query($sql);
?>
<table class="table table-condensed table-hover table-bordered table-striped">
<thead>
<tr>
<th><center>S. no.</center></th>
<th><center>Bill no.</center></th>
<th><center>Name</center></th>
<th><center>GSTIN</center></th>
<th><center>Total Amount</center></th>
<th><center>Transportation Charge</center></th>
<th><center>Transport no.</center></th>
<th><center>Entry Date</center></th>
<th><center>Action</center></th>
</tr>
</thead>
<tbody style="color:black;">
<?php $s=0;
foreach ($data as $row){ $s++; ?>
<tr>
<td><center><?php echo $s; ?></center></td>
<td><center><strong><?php echo $row['bill_id']; ?></strong></center></td>
<td><strong><?php echo ucwords($row['bill_name']); ?></strong></td>
<td><strong><?php echo $row['bill_gst']; ?></strong></td>
<td><strong><?php echo $row['bill_amt']; ?></strong></td>
<td><strong><?php echo $row['bill_tchrg']; ?></strong></td>
<td><strong><?php echo $row['bill_tno']; ?></strong></td>
<td><strong><input type="text" name="trans_no" class="form-control input-xs"></td>
<td><strong><?php echo $row['bill_entrydt']; ?></td>
<td><center><button data-toggle="modal" data-target="#" class="btn btn-danger disabled text-center">View</button></center></td>
</tr>
<?php } ?>
</tbody>
</table>