-
Notifications
You must be signed in to change notification settings - Fork 9
/
srch_showbill.php
55 lines (49 loc) · 2.55 KB
/
srch_showbill.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
// echo $_POST['name']; die;
require 'config.php';
$condition = "";
$conn = connection();
if(isset($_POST['name']) && $_POST['name']!=""){
$condition.=" and bill_name like '".$_POST['name']."%'";
}
if(isset($_POST['type']) && $_POST['type']!=""){
$condition.=" and bill_type = '".$_POST['type']."'";
}
if(isset($_POST['bill_no']) && $_POST['bill_no']!=""){
$condition.=" and bill_id = '".$_POST['bill_no']."'";
}
$sql = "SELECT * FROM bill_records WHERE 0=0". $condition ."ORDER BY bill_entrydt DESC";
$data = $conn->query($sql);
$conn=null;
?>
<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>Total Amount</center></th>
<th><center>GSTIN</center></th>
<th><center>Transport 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_amt']."/-"; ?></strong></td>
<td><strong><input type="text" name="trans_no" value="<?php echo $row['bill_gst'];?>" onkeyup="fill_gst(<?php echo $row['bill_id']; ?>, this.value);" class="form-control input-xs"></strong></td>
<td><strong><input type="text" name="trans_no" value="<?php echo $row['bill_tchrg'];?>" onkeyup="fill_chrg(<?php echo $row['bill_id'];?>, this.value);" class="form-control input-xs"></strong></td>
<td><strong><input type="text" name="trans_no" value="<?php echo $row['bill_tno'];?>" onkeyup="fill_tno(<?php echo $row['bill_id']; ?>, this.value);" class="form-control input-xs"></td>
<td><strong><?php echo $row['bill_entrydt']; ?></td>
<td><center><button data-toggle="modal" onclick="view_bill(<?php echo $row['bill_id']; ?>)" data-target="#form-bp1" class="btn btn-danger text-center">View</button></center></td>
</tr>
<?php } ?>
</tbody>
</table>